function traer_logeo()
{
	document.form2.login.value = window.opener.document.form1.login.value;
	document.form2.passwd.value = window.opener.document.form1.passwd.value;
	document.form2.action="login.php";
	document.form2.submit();
	
	var date = new Date();
	date.setTime(date.getTime()+(60*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
	document.cookie = "galleta_login="+window.opener.document.form1.login.value+expires+"; path=/";
}

function confirmar_url(url,texto)
{
	if (confirm (texto)) {self.location=url;}
}

function url_self()
{
	var text;
	
	text=location.href;
	var array_text=text.split("?");
    return array_text[0];
}

function Permut (flag,img) {
  if (document.images) {
       if (document.images[img].permloaded) {
           if (flag==1) document.images[img].src = document.images[img].perm.src
           else document.images[img].src = document.images[img].perm.oldsrc
       }
  }
}
function preloadPermut (img,adresse) {
  if (document.images) {
       img.onload = null;
       img.perm = new Image ();
       img.perm.oldsrc = img.src;
       img.perm.src = adresse;
       img.permloaded = true;
  }
}

function poner_reloj()
{
 var Digital=new Date();
 var hours=Digital.getHours();
 var minutes=Digital.getMinutes();
 var seconds=Digital.getSeconds();
 var reloj=document.getElementById("clock");

 if (hours<=9)
   hours="0"+hours;

 if (minutes<=9)
   minutes="0"+minutes;

 if (seconds<=9)
   seconds="0"+seconds;

  myclock=hours+":" + minutes + ":" + seconds;

  reloj.innerHTML=myclock;
  setTimeout("poner_reloj()",1000);
}
function openZoom(url,w,h)
{
  var str="height="+h+",width="+w+", toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no";
  window.open(url,"_blank",str);
}


function redireccionar(dia) 
{
	if (dia == 1)location.href="http://www.canal56.com/lunes.html");
	if (dia == 2)location.href="http://www.canal56.com/martes.html");
	if (dia == 3)location.href="http://www.canal56.com/miercoles.html");
	if (dia == 4)location.href="http://www.canal56.com/jueves.html");
	if (dia == 5)location.href="http://www.canal56.com/viernes.html");
	if (dia == 6)location.href="http://www.canal56.com/sabado.html");
	if (dia == 7)location.href="http://www.canal56.com/domingo.html");
}