function MaskEdit(src, mask){
	var i = src.value.length;
	var saida = mask.substring(0,1);
	var texto = mask.substring(i)
	if (texto.substring(0,1) != saida){
		src.value += texto.substring(0,1);
	};
}

function SoNumero(){
	if(event.keyCode<48 || event.keyCode>57){
		event.returnValue=false;
	};
}
function AbreForm(vfnURL, vfnLargura, vfnAltura){
	var vT;
	var vL;
	var vNome;
	var vVetor;
	vT = (window.screen.height/2) - (vfnAltura/2);
	vT = (vT-40);
	vL = (window.screen.width/2) - (vfnLargura/2);	
	window.open(vfnURL, '_blank', 'width='+ vfnLargura +', height='+ vfnAltura +', left='+ vL +', top='+vT);	
}

function AbreScrollForm(vfnURL, vfnLargura, vfnAltura){
	var vT;
	var vL;
	var vNome;
	var vVetor;
	vT = (window.screen.height/2) - (vfnAltura/2);
	vT = (vT-40);
	vL = (window.screen.width/2) - (vfnLargura/2);	
	window.open(vfnURL, '_blank', 'scrollbars=yes width='+ vfnLargura +', height='+ vfnAltura +', left='+ vL +', top='+vT);
}

function proximo()
{
	document.getElementById("1").style.display = "none";
	document.getElementById("2").style.display = "inline";
}

function anterior()
{
	document.getElementById("1").style.display = "inline";
	document.getElementById("2").style.display = "none";
}

/*function AbreFormModal(vfnURL, vfnLargura, vfnAltura){
	vfnAltura = vfnAltura + 20;
	var vT;
	var vL;
	var vNome;
	var vVetor;
	vVetor = vfnURL.split(".");
	vNome = vVetor[0]+vfnLargura+vfnAltura;
	vT = (window.screen.height/2) - (vfnAltura/2);
	vT = (vT-40);
	vL = (window.screen.width/2) - (vfnLargura/2);
	//alert( "../util/frame_generico.php?arq=" + vfnURL );
	showModalDialog("../util/frame_generico.php?arq=" + vfnURL, 'LZicaSD'+vNome, "dialogHeight: "+ vfnAltura +"px; dialogWidth: "+ vfnLargura +"px; dialogTop: "+ vT +"px; dialogLeft: "+ vL +"px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
}*/