
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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// D-i-s-e-ñ-o-J:u:a:n:C:a:r:l:o:s:T:o:v:a:r::C+O+L+O+M+B+I+A+2+0+0+3


function Ventana(archivo) {
  var Ruta = "instalation_" + archivo + ".htm";
  var Ventana = window.open(Ruta,"Ventana","scrollbars=yes,status=yes,width=790,height=480,resizable");
}

function VentanaEsp(archivo) {
  var Ruta = "instalacion_" + archivo + ".htm";
  var Ventana = window.open(Ruta,"Ventana","scrollbars=yes,status=yes,width=790,height=480,resizable");
}

function EnvieEsp() {
  var nombre = document.forms[0].elements['nombre'];
  var correo = document.forms[0].elements['correo'];
  var correoConf = document.forms[0].elements['correoConf'];
  var ciudad = document.forms[0].elements['ciudad'];
  var pais = document.forms[0].elements['pais'];
  var comentarios = document.forms[0].elements['comentarios'];

	if(nombre.value == "")
	{
		alert("Por favor ingrese su nombre.");
		nombre.focus();
		return false;		
	}

	if(correo.value == "") { 
		alert("Por favor ingrese su correo electrónico.");
		correo.focus();
		return false;
	}
	if(correo.value.indexOf("@") == -1 || correo.value.indexOf(".") == -1) { 
		alert("Su correo electrónico no es valido.\nPor favor verifique la información."); 
		correo.focus(); 
		return false;
	}
	if(correoConf.value == "") { 
		alert("Por favor confirme nuevamente su correo.");
		correoConf.focus();
		return false;
	}
	if(correoConf.value.indexOf("@") == -1 || correoConf.value.indexOf(".") == -1) { 
		alert("Su correo electrónico confirmado no es valido.\nPor favor verifique la información."); 
		correoConf.focus(); 
		return false;
	}
	if(correo.value != correoConf.value) { 
		alert("El correo electrónico confirmado es diferente del original.\nPor favor verifique la información.");
		correoConf.focus();
		return false;
	}
	if(ciudad.value == "") { 
		alert("Por favor ingrese la ciudad donde reside.");
		ciudad.focus();
		return false;
	}
	if(pais.value == "") { 
		alert("Por favor ingrese el país donde reside.");
		pais.focus();
		return false;
	}
	if(comentarios.value == "") { 
		alert("Por favor ingrese sus comentarios.");
		comentarios.focus();
		return false;
	}


    document.forms[0].action = "envio.php";
    document.forms[0].method = "post";
    document.forms[0].submit();
    return true;

  //var Seguro = confirm("Nombre: " + nombre.value +"\nE-mail: " + correo.value +"\n\n¿Es correcta esta información?");
  //if (Seguro == true) {
  //  document.forms[0].action = "envio.php";
  //  document.forms[0].method = "post";
  //  document.forms[0].submit();
  // }
  //else {
  //  document.forms[0].elements['nombre'].focus();
  //}
}

function EnvieEng() {
  var name = document.forms[0].elements['name'];
  var mail = document.forms[0].elements['mail'];
  var mailConf = document.forms[0].elements['mailConf'];
  var city = document.forms[0].elements['city'];
  var country = document.forms[0].elements['country'];
  var comments = document.forms[0].elements['comments']; 


	if(name.value == "")
	{
		alert("Please fill in your name.");
		name.focus();
		return false;		
	}

	if(mail.value == "") { 
		alert("Please fill in your e-mail.");
		mail.focus();
		return false;
	}
	if(mail.value.indexOf("@") == -1 || mail.value.indexOf(".") == -1) { 
		alert("You e-mail is not valid.\nPlease verify your information."); 
		mail.focus(); 
		return false;
	}
	if(mailConf.value == "") { 
		alert("Please confirm your e-mail again.");
		mailConf.focus();
		return false;
	}
	if(mailConf.value.indexOf("@") == -1 || mailConf.value.indexOf(".") == -1) { 
		alert("Your confirmed e-mail is not valid.\nPlease verify your information."); 
		mailConf.focus(); 
		return false;
	}
	if(mail.value != mailConf.value) { 
		alert("Your confirmed e-mail is different from the first one.\nPlease verify its writing.");
		mailConf.focus();
		return false;
	}
	if(city.value == "") { 
		alert("Please fill in your city.");
		city.focus();
		return false;
	}
	if(country.value == "") { 
		alert("Please fill in your country.");
		country.focus();
		return false;
	}
	if(comments.value == "") { 
		alert("Please fill in your comments.");
		comments.focus();
		return false;
	}	


    document.forms[0].action = "e-send.php";
    document.forms[0].method = "post";
    document.forms[0].submit();
    return true;

  //var Seguro = confirm("Name: " + name.value +"\nE-mail: " + mail.value +"\n\nPlease verify your data.");
  //if (Seguro == true) {
  //  document.forms[0].action = "e-send.php";
  //  document.forms[0].method = "post";
  //  document.forms[0].submit();
  // }
  //else {
  //  document.forms[0].elements['name'].focus();
  // }
}
