﻿//
//
//   ARCHIVO DE SCRIPTS DE SINCRONIZE.COM
//
//
//

//Fade de los menús de navegación -- 03 de Enero del 2006
<!--
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];}
}
//-->

//Abrir Ventana - 28 de Julio del 2006
navegador="IE"
function abrirVentana(direccion,nombre,ancho,alto,tamano,retorna,nocentrado,parametros)
{
	var izq,arr,ventana,tamanoventana
	if (tamano=="") {
		if (navegador=="NetS") {
			tamano="0"
		}
		else {
			tamano="1"
		}
	}
	if (navegador=="NetS") {
		izq = screen.availLeft
		arr = screen.availTop
		ancho=parseInt(ancho)+18;
		alto=parseInt(alto)+45;
	}
	else if (navegador=="Opera") {
		izq = 0
		arr = 0
		ancho=parseInt(ancho)+25;
		alto=parseInt(alto)+18;
	}
	else {
		izq = 0
		arr = 0
	}
	
	tamanoventana=""
	altodef=alto
	if (ancho>=screen.availWidth) {
		ancho=(screen.availWidth*95)/100
	}
	if (alto>=screen.availHeight) {
		altodef=(screen.availHeight*95)/100
	}
	arr = arr + Math.round(((screen.availHeight-altodef)/2))
	izq = izq + Math.round(((screen.availWidth-ancho)/2))
	
	if (navegador>="NetS") {
		if (navegador=="NetS") {
			if (tamano!="1") {
				tamanoventana="outer"
			}
			if (alto>=screen.availHeight) {
				altodef=((screen.availHeight-55)*95)/100
				arr=15
			}
			else {
				ancho=ancho+8
			}
		}
		if (navegador=="Opera") {
			arr=10
		}
	}

	parametros="top="+arr+",left=" + izq + ',' + parametros;

	ventana=window.open(direccion,nombre,tamanoventana+"height="+altodef+","+tamanoventana+"width="+ancho+"," + parametros)
	ventana.focus();
	if (retorna==1) {
		return ventana;
	}
}

//Reloj -- 01 de Agosto del 2006
function mueveReloj(){
    momentoActual = new Date()
    hora = momentoActual.getHours()
    minuto = momentoActual.getMinutes()
    segundo = momentoActual.getSeconds()

    diaSemana = TraeNombreDia(momentoActual.getDay())
    diaMes = momentoActual.getDate()
    nombreMes = TraeNombreMes(momentoActual.getMonth())

    str_segundo = new String (segundo)
    if (str_segundo.length == 1)
       segundo = "0" + segundo

    str_minuto = new String (minuto)
    if (str_minuto.length == 1)
       minuto = "0" + minuto

    str_hora = new String (hora)
    if (str_hora.length == 1)
       hora = "0" + hora

    horaImprimible = diaSemana + ", " + diaMes + " de " + nombreMes + "; " + hora + ":" + minuto + ":" + segundo

    document.forms[0].reloj.value = horaImprimible

    setTimeout("mueveReloj()",1000)
}

function TraeNombreDia(dianum)
{
    switch(dianum)
    {
        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";
    }
}

function TraeNombreMes(mesnum)
{
    switch(mesnum)
    {
        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";
    }
}
//Fin reloj

