// JavaScript Document

function validaEmail(checkStr)
{var nI, sS, nN, nP;
 // Arroba ...
 sS = "@"; nN = 0; nP = 0;
 for(nI = 0; nI < checkStr.length; nI++)
 { if(checkStr.charAt(nI) == sS) 
  { nN++; nP = nI;
  }
 }
 if(nN == 0) return (false);
 if(nN > 1)  return (false);
 var nPArroba = nP;
 // Punto ...
 sS = "."; nN = 0; nP = 0;
 for(nI = 0; nI < checkStr.length; nI++)
 { if(checkStr.charAt(nI) == sS) 
  { nN++; nP = nI;
  }
 }
 if(nN == 0) return (false);
 var nPPunto = nP;
 // Posicion Arroba/Punto ...
 if(nPArroba > nPPunto) return (false);
 //
 return (true);
}

function ir_a(pag){	
	top.location.href=pag;	
}

function printPage(){
	window.print();
}

function resaltar(src){
	src.style.cursor="hand";
	src.bgColor="#E5E5E5";
}

function apagar(src){
	src.bgColor="#FFFFFF";
}

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];}}
}

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.01
  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 && d.getElementById) x=d.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 popup(page,name) {
  window.open(page,name,'width=500,height=425,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}

function info(ref) {
	top.location.href='naus_info.asp?ref=' + ref;	
}

function openSendInfo(URL,winName,features) { 
  window.open(URL,winName,features);
}

/* TimeStamp */
var time = new Date();
	ordval= (time.getTime());
	var hoy = new Date();
	function dia (hoy){
	var hoy_dia = hoy.getDay();
	switch(hoy_dia){
	case 0: return "Domingo";
	case 1: return "Lunes";
	case 2: return "Martes";
	case 3: return "Miércoles";
	case 4: return "Jueves";
	case 5: return "Viernes";
	case 6: return "Sábado";
	return "";}
}

function mes(hoy){
	var hoy_mes = hoy.getMonth();
	switch(hoy_mes){
	case 0: return "enero";
	case 1: return "febrero";
	case 2: return "marzo";
	case 3: return "abril";
	case 4: return "mayo";
	case 5: return "junio";
	case 6: return "julio";
	case 7: return "agosto";
	case 8: return "septiembre";
	case 9: return "octubre";
	case 10: return "noviembre";
	case 11: return "diciembre";
	return "";}
	}	  
	var yearNr=hoy.getYear();
	if(yearNr < 2000) Year = 1900 + yearNr;
	else Year = yearNr;

	function ShowTime()
	{
	var TimerKey
	var now = new Date()
	var Hours = now.getHours()
	var Minutes = now.getMinutes()
	var Seconds = now.getSeconds()
	/*TimeDisplay.innerText = ((Hours > 12) ? Hours - 12 : Hours) + ((Minutes < 10) ? ":0" : ":") + Minutes + ((Seconds < 10) ? ":0" : ":") + Seconds + ((Hours > 12) ? " PM" : " AM")*/
	TimeDisplay.innerText = Hours + ((Minutes < 10) ? ":0" : ":") + Minutes + ((Seconds < 10) ? ":0" : ":") + Seconds
	TimerKey = setTimeout("ShowTime()",1000)
	
	}
/* TimeStamp */