//****************************************************** 
// Função    : montaMascara
// Descrição : Devolve o tipo de formatação solicitada
// Parâmetros: C - CEP / T - Telefone 
// Exemplo   : onKeyPress="javascript:montaMascara('campo', 'Tipo' );"
//******************************************************
function montaMascara( qualCampo, tpMascara ) 
{			   					   

	var objCampo = eval( 'document.forms(0).' + qualCampo );
	var teclaSeparador;
							   
	if( tpMascara == 'C' )	
		teclaSeparador = 5;
	else
		teclaSeparador = 2;
	
	if ( document.all ) // Internet Explorer
		tecla = event.keyCode;
	else if( document.layers ) // Nestcape
		tecla = event.which;
	
	if( objCampo.value.length == teclaSeparador || ( tpMascara == 'T' && objCampo.value.length == 7 ) )
	{
		if( tecla == 45 ) // Caracter -
			return true;
		else
		{
			objCampo.value += "-";	
			return false;
		}
	}

	if ( tecla > 47 && tecla < 58 ) // numeros de 0 a 9	
		return true;
	else if ( tecla != 8 ) // backspace
		event.keyCode = 0;
	else
		return true;
}


function video(URL)
{
	var width = 320;
	var height = 240;
	var left = 99
	var top = 99
	window.open(URL,'b2evedeo', 'width='+width+', height='+height+', top='+top+', left='+left+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=no');
}