<!--//

function SwapImg(org, over){

	var tmp = over.split(".");

	eval("document." + org + ".src = 'imagens/layout/" + tmp[0] + "_over." + tmp[1] + "'");

}

function desSwap(org, over){

	eval("document." + org + ".src = 'imagens/layout/" + over + "'");

}



function AbrePopUpFoto(sPagina,sNome,sParametros){

	window.open(sPagina,sNome,sParametros);

}



function Confirma(sMsg){

	var tmp = confirm(sMsg);

	if (!tmp) return false;

}



function AbrePopUpGaleria(varPathFotos,raiz){

	window.open(raiz + 'g_popupimg.php?img=' + varPathFotos + '&','Visualizador','toolbar=0, location=0, directories=0, status=1, menubar=0, scrollbars=0, resizable=1, width=10, height=10, top=10, left=10');

}



function AbrePopUpFoto(caminho, download, raiz){

	window.open(raiz + 'popupimg.php?caminho=' + caminho + '&download=' + download + '&','Visualizador','toolbar=0, location=0, directories=0, status=1, menubar=0, scrollbars=0, resizable=1, width=10, height=10, top=10, left=10');

}



function Obrigatorios(sForm){

	var obrigatorios = eval("sForm._obrigatorios.value");

	if (obrigatorios != ""){

		obrigatorios = obrigatorios.split(",");

		for (var i = 0; i < obrigatorios.length; i++){

			if (eval("sForm." + obrigatorios[i] + ".value") == ""){

				alert("Campo obrigatório não preenchido!");

				eval("sForm." + obrigatorios[i] + ".focus();");

				return false;

				break;

			}

		}

	}

}



function ValidaEmail(Wparam){

	if (Wparam.value != ""){

		if (Wparam.value.indexOf('@', 0) == -1 || Wparam.value.indexOf('.', 0) == -1) { 

			alert("E-mail invalido!");

			Wparam.focus()

			return false;

		}

	}

}



function SoNumeros(){

		if (document.all)

			var Tecla = event.keyCode;

		else 

			if (document.layers)

				var Tecla = e.which;

		if ((Tecla > 47 && Tecla < 58) || (Tecla > 95 && Tecla < 106)){

			return true;

		}else{

			if (Tecla != 8 && Tecla != 46 && Tecla != 37 && Tecla != 39 && Tecla != 36 && Tecla != 35 && Tecla != 9)

				return false;

			else

				return true;

		}

	}



//-->
