function notice(){
menutext.style.left=document.body.scrollLeft+event.clientX
menutext.style.top=document.body.scrollTop+event.clientY
menutext.style.visibility="visible"
return false
}
function hidenotice(){
menutext.style.visibility="hidden"
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function servicio(valor){
	cual = document.getElementById('servicio').style;
	if (valor == "Generadores" || valor == "Motobombas") {
			cual.display = "block";
	}else {
			cual.display = "none";
	}	
}

function validaContacto(){

	if (document.formcontacto.nombre.value==""){
		alert("Se requiere su nombre");
		document.formcontacto.nombre.focus();
		return false;
	}
	
	if (document.formcontacto.fono.value==""){
		alert("Se requiere su Fono");
		document.formcontacto.fono.focus();
		return false;
	}
	
	email=document.formcontacto.email.value;
	if(email==""){
		alert("Debe escribir su email para recibir sus datos.");
		document.formcontacto.email.focus();
		return false;
	}
	else{
		var atSign = Number(String([email]).indexOf("@"));
		var closeDot = Number(String([email]).indexOf(".", atSign));
		if (String([email]).indexOf("@") == -1 || String([email]).indexOf(".") == -1) {
			alert("Email invalido.");
			document.formcontacto.email.focus();
			return false;
		}else if (closeDot-atSign<=1){
			alert("Email invalido.");
			document.formcontacto.email.focus();
			return false;
		}
	}
		

}

