// JavaScript Document

function confirma(texto) {
	if (confirm(texto))
		return true
	else
		return false;
}

function LmOver(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#000000";
elem.style.cursor = 'hand'}

function LmOut(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";}

function LmDown(elem, clr)
{elem.style.backgroundColor = clr;
elem.children.tags('A')[0].style.color = "#FFFFFF";}

function LmUp(path)
{location.href = path;}

function carga(form)
{form.submit();}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,status=1,menubar=0,resizable=0,width=630,height=300');");
}

function popUp2(URL) {
day = new Date();
id = day.getTime();
ttw = screen.availWidth - 50;
tth = screen.availHeight - 100;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,status=1,menubar=0,resizable=0,top=0,left=0,width=" + ttw + ",height=" + tth + "');");
}

function popUp3(URL, pixelwid, pixelhei) {
day = new Date();
id = day.getTime();
ttw = (screen.availWidth/2) - pixelwid;
tth = (screen.availHeight/2) - pixelhei;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,status=1,menubar=0,resizable=0,top=" + tth + ",left=" + ttw + ",width=" + pixelwid + ",height=" + pixelhei + "');");
}

function popUp4(URL, pixelwid, pixelhei, absTop, absLeft) {
day = new Date();
id = day.getTime();
ttw = pixelwid;
tth = pixelhei;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,status=0,menubar=0,resizable=0,top=" + absTop + ",left=" + absLeft + ",width=" + ttw + ",height=" + tth + "');");
}

function popUp5(URL, pixelwid, pixelhei, absTop, absLeft) {
day = new Date();
id = day.getTime();
ttw = pixelwid;
tth = pixelhei;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,status=0,menubar=0,resizable=0,top=" + absTop + ",left=" + absLeft + ",width=" + ttw + ",height=" + tth + "');");
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' debe contener una direccion de e-mail valida.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' debe ser un numero.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' debe contener un numero entre '+min+' y '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es requerido.\n'; }
  } if (errors) alert('Han ocurrido los siguientes errores:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function verfecha() {
var today = new Date()
var DayW = today.getDay()
var DateW = today.getDate()



var MonthW = today.getMonth()



var YearW = today.getYear()



var DayString = "no hay dia"




if (DayW == 0) {



	DayString = "Domingo"



	}



  else if (DayW == 1) {



     DayString = "Lunes"



	}



  else if (DayW == 2) {



     DayString = "Martes"



	}



  else if (DayW == 3) {



     DayString = "Miercoles"



	}



  else if (DayW == 4) {



     DayString = "Jueves"



	}



  else if (DayW == 5) {



     DayString = "Viernes"



  	}



  else if (DayW == 6) {



     DayString = "Sábado"



  	}



     else DayString = "Problemas"







MonthString = "Se desconoce el mes"







  if (MonthW == 0) {



     MonthString = "Enero"




	}



  else if (MonthW == 1) {



     MonthString = "Febrero"



  	}




  else if (MonthW == 2) {



     MonthString = "Marzo"



	}



  else if (MonthW == 3) {



     MonthString = "Abril"



	}



  else if (MonthW == 4) {



     MonthString = "Mayo"



	}



  else if (MonthW == 5) {




     MonthString = "Junio"



	}



  else if (MonthW == 6) {



     MonthString = "Julio"



	}



  else if (MonthW == 7) {



     MonthString = "Agosto"



	}



  else if (MonthW == 8) {



     MonthString = "Septiembre"



	}



  else if (MonthW == 9) {



     MonthString = "Octubre"



	}




  else if (MonthW == 10) {



     MonthString = "Noviembre"



 	}



  else if (MonthW == 11) {



     MonthString = "Diciembre"



	}



  else MonthString = ""







var DateString = ""







   DateString = "" + ((DateW < 10) ? "0" : "") + DateW





var YearString = "Se desconoce el año."

YearW = YearW + 0000

YearString = "" + YearW
hoy = new Date();
//document.write("" + DayString + " " + DateString + " " + MonthString  + " "
//	+ YearString + "")
document.write(hoy.getDate() + "/" + eval(hoy.getMonth()+1) + "/" + hoy.getFullYear());
  }

function time()
{
   hoy = new Date();
   ann = hoy.getFullYear();
   mes = hoy.getMonth()+1;
   dia = hoy.getDate();
   hor = hoy.getHours();
   min = hoy.getMinutes();
   seg =  hoy.getSeconds();
  
   if (min < 10) min = "0"+min
   if (seg < 10) seg = "0"+seg

   window.status = dia+"/"+ mes+"/"+ ann+"  "+ hor+":"+ min+":"+ seg
   setTimeout('time()',1001);
}