closetime = 600;
function ver_chat()
{
	url = "login.php"
	width = 550;  // width of window in pixels
	height = 350; // height of window in pixels
	delay = 0.00;    // time in seconds before popup opens
	timer = setTimeout("Start(url, width, height)", delay*10000);
}
function entrar()
{
	url = "entra.php"
	width = 400;  // width of window in pixels
	height = 250; // height of window in pixels
	delay = 0.00;    // time in seconds before popup opens
	timer = setTimeout("Start(url, width, height)", delay*10000);
}
function entrar_admin()
{
	url = "../admin/entra_admin.php"
	width = 400;  // width of window in pixels
	height = 230; // height of window in pixels
	delay = 0.00;    // time in seconds before popup opens
	timer = setTimeout("Start(url, width, height)", delay*10000);
}
function salir_admin()
{
	url = "ha_salido.php"
	width = 398;  // width of window in pixels
	height = 178; // height of window in pixels
	delay = 0.00;    // time in seconds before popup opens
	timer = setTimeout("Start(url, width, height)", delay*10000);
}


function Start(URL, WIDTH, HEIGHT)
 {
	Xpos=(screen.width - WIDTH)/2; 
	Ypos=(screen.height - HEIGHT)/2; 
	windowprops = "left=" + Xpos + ",top=" + Ypos + ",width=" + WIDTH + ",height=" + HEIGHT;
	popup = window.open(URL, "popup", windowprops);
	//if (closetime) setTimeout("popup.close();", closetime*1000);
}
function carga()
{
	formbusca.txt_busca.focus()
	return;
}
function buscar()
{
	if (formbusca.txt_busca.value=="")
	{
		alert("Debe Especificar una palabra a buscar")
		formbusca.txt_busca.focus();
		return;
	}
		formbusca.action="buscador_general.php"
		formbusca.submit();
}
function muestraSeg()
  {
  hoyseg=new Date();
  document.formi.seg.value=hoyseg.getSeconds();
  setTimeout("muestraSeg()",1000);
  }

//Muestra minutos
function muestraMin()
  {
  hoymin=new Date();
  document.formi.min.value=hoymin.getMinutes();
  setTimeout("muestraMin()",1000);
  }

//Muestra horas
function muestraHour()
  {
  hoyhour=new Date();
  document.formi.hour.value=hoyhour.getHours();
  setTimeout("muestraHour()",1000);
  }

//Muestra día
function muestraDay()
  {
  hoyday=new Date();
  document.formi.day.value=hoyday.getDate();
  setTimeout("muestraDay()",1000);
  }

//Muestra mes
function muestraMon()
  {
  hoymonth=new Date();
  document.formi.month.value=hoymonth.getMonth();
  
  if(document.formi.month.value==0){
   document.formi.month.value="Enero"
  }else if(document.formi.month.value==1){
   document.formi.month.value="Febrero"
  }else if(document.formi.month.value==2){
   document.formi.month.value="Marzo"
  }else if(document.formi.month.value==3){
   document.formi.month.value="Abril"
  }else if(document.formi.month.value==4){
   document.formi.month.value="Mayo"
  }else if(document.formi.month.value==5){
   document.formi.month.value="Junio"
  }else if(document.formi.month.value==6){
   document.formi.month.value="Julio"
  }else if(document.formi.month.value==7){
   document.formi.month.value="Agosto"
  }else if(document.formi.month.value==8){
   document.formi.month.value="Septiembre"
  }else if(document.formi.month.value==9){
   document.formi.month.value="Octubre"
  }else if(document.formi.month.value==10){
   document.formi.month.value="Noviembre"
  }else{
   document.formi.month.value="Diciembre"
  }
  
  setTimeout("muestraMon()",1000);
  }

//Muestra semana
function muestraSem()
  {
  hoysem=new Date();
  document.formi.sem.value=hoysem.getDay();
  
  
  if(document.formi.sem.value==0){
   document.formi.sem.value="Domingo"
  }else if(document.formi.sem.value==1){
   document.formi.sem.value="Lunes"
  }else if(document.formi.sem.value==2){
   document.formi.sem.value="Martes"
  }else if(document.formi.sem.value==3){
   document.formi.sem.value="Miércoles"
  }else if(document.formi.sem.value==4){
   document.formi.sem.value="Jueves"
  }else if(document.formi.sem.value==5){
   document.formi.sem.value="Viernes"
  }else{
   document.formi.sem.value="Sábado"
  }
  setTimeout("muestraSem()",1000);
  }

//Muestra año
function muestraYear()
  {
  hoyyear=new Date();
  document.formi.year.value=hoyyear.getFullYear();
  
  if ((document.formi.hour.value==0)&&(document.formi.min.value==0)&&(document.formi.seg.value==0)&&(document.formi.day.value==1)&&(document.formi.month.value=="Enero"))
  	{
  	alert("Feliz año " + document.formi.year.value);
  	return true;
  	}
  setTimeout("muestraYear()",1000);
  }