//	*************************************************************************************************
//					MOSTRAR LA FECHA ACTUAL EN LA PAGINA		
//	*************************************************************************************************

function fecha ()
{
	var hoy = new Date();
	dia = hoy.getDate();
	mes = hoy.getMonth();
	anyo = hoy.getYear();
	
	if (mes == "0") convertir_mes = "Enero";
	else if (mes == "1") convertir_mes = "Febrero";
	else if (mes == "2") convertir_mes = "Marzo";
	else if (mes == "3") convertir_mes = "Abril";
	else if (mes == "4") convertir_mes = "Mayo";
	else if (mes == "5") convertir_mes = "Junio";
	else if (mes == "6") convertir_mes = "Julio";
	else if (mes == "7") convertir_mes = "Agosto";
	else if (mes == "8") convertir_mes = "Septiembre";
	else if (mes == "9") convertir_mes = "Octubre";
	else if (mes == "10") convertir_mes = "Noviembre";
	else convertir_mes = "Diciembre";
	document.write (dia + " de " + convertir_mes + " de " + anyo);
}

//	*************************************************************************************************
//				MOSTRAR LA RESOLUCIÓN DEL MONITOR DEL USUARIO		
//	*************************************************************************************************

function resolucion ()
{
	document.write("Su configuración: " + screen.width + "x" + screen.height + " , ")
}

//	*************************************************************************************************
// 				MOSTRAR EL SISTEMA OPERATIVO DEL USUARIO  		
//	*************************************************************************************************

function sistemaop ()
{
	document.write(navigator.appName)
	document.write(navigator.appVersion)
}

//	*************************************************************************************************
//			AUN NO SE SI SE UTILIZA ESTE SCRIPT EN LA PAGINA (reloads the window if Nav4 resized)
//	*************************************************************************************************

function MM_reloadPage(init) {
	  
	if (init==true) with (navigator) {
		if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
			}
		}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);

//	*************************************************************************************************
//			TEXTOS EN LA BARRA DE ESTADO
//	*************************************************************************************************

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

//	*************************************************************************************************
//			FUNCIONES DE INTERCAMBIO DE IMAGENES PARA BOTONES POR EJEMPLO
//	*************************************************************************************************

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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];}
}


//	*************************************************************************************************
//			ENVIA UN COMANDO A UNA VENTANA, POR EJEMPLO PARA CERRARLA
//	*************************************************************************************************
function EnviaComando(ventana, comando) {
    return eval(ventana+"."+comando);
}

//	*************************************************************************************************
//			CIERRA LA VENTANA ACTIVA EN ESE MOMENTO
//	*************************************************************************************************

function tmt_winComm(bers, ord) {
    return eval(bers + "." + ord);
}

//	*************************************************************************************************
//			DISPLAY WINDOW, muestra una ventana nueva, de tamaño ajustable, posición centrada y atributos a seleccionar. 
//	*************************************************************************************************

function displayWindow(theURL,winName,width,height,features) { //v3.1
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
    newWindow.focus();
// Opciones completas: 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes' [Por defecto: 'location=yes, scrollbars=yes'] opcional resizable=yes
}

//	*************************************************************************************************
//			TMP_LAYERBOXOUT, carga una capa y su contenido, y la muestra apareciendo desde el centro a los extremos. 
//	*************************************************************************************************

function tmt_LayerBoxOut(targetNN, targetIE, dur, incr) {
    transNo = parseInt(1);
    arHidden = new Array(1, 3, 14, 16);
    if (document.all) {
        target = eval(targetIE);
        target.style.filter = "revealTrans(duration=" + dur + ",transition=1)";
        endState = "hidden";
        for (i = 0; i < arHidden.length; i++) {
            if (arHidden[i] == transNo) {
                endState = "visible";
                target.style.visibility = "hidden";
            }
        }
        target.filters.revealTrans.apply();
        target.style.visibility = endState;
        target.filters.revealTrans.play();
    }
    if (document.layers) {
        target = eval(targetNN);
        if (incr == 0) {
            target.origLeft = target.clip.left;
            target.origTop = target.clip.top;
            target.origRight = target.clip.right;
            target.origBottom = target.clip.bottom;
            mSecs = dur * 1000;
            intval = 100;
            visits = (mSecs / intval);
            fullW = target.clip.width;
            fullH = target.clip.height;
            halfW = fullW / 2;
            halfH = fullH / 2;
            alternateW = alternateH = true;
            incW = halfW / visits;
            incrementW = (incW >= 1) ? parseInt(incW) : 0;
            xtraPixW = Math.round((incW - incrementW) * visits);
            incH = halfH / visits;
            incrementH = (incH >= 1) ? parseInt(incH) : 0;
            xtraPixH = Math.round((incH - incrementH) * visits);
            target.clip.left += halfW;
            target.clip.right -= halfW;
            target.clip.top += halfH;
            target.clip.bottom -= halfH;
            target.visibility = "show";
            if ((target.clip.left - target.origLeft) <= incrementW) {
                target.clip.left = target.origLeft;
                target.clip.right = target.origRight;
            } else {
                if (xtraPixW > 0) {
                    if (xtraPixW <= visits) {
                        if (alternateW) {
                            target.clip.left--;
                            target.clip.right++;
                            xtraPixW--;
                        }
                        alternateW = !alternateW;
                    } else {
                        target.clip.left--;
                        target.clip.right++;
                        xtraPixW--;
                    }
                }
                target.clip.left -= incrementW;
                target.clip.right += incrementW;
            }
            if ((target.clip.top - target.origTop) <= incrementH) {
                target.clip.top = target.origTop;
                target.clip.bottom = target.origBottom;
            } else {
                if (xtraPixH > 0) {
                    if (xtraPixH <= visits) {
                        if (alternateH) {
                            target.clip.top--;
                            target.clip.bottom++;
                            xtraPixH--;
                        }
                        alternateH = !alternateH;
                    } else {
                        target.clip.top--;
                        target.clip.bottom++;
                        xtraPixH--;
                    }
                }
                target.clip.top -= incrementH;
                target.clip.bottom += incrementH;
            }
            visits--;
        } else {
            if ((target.clip.left - target.origLeft) <= incrementW) {
                target.clip.left = target.origLeft;
                target.clip.right = target.origRight;
            } else {
                if (xtraPixW > 0) {
                    if (xtraPixW <= visits) {
                        if (alternateW) {
                            target.clip.left--;
                            target.clip.right++;
                            xtraPixW--;
                        }
                        alternateW = !alternateW;

                    } else {
                        target.clip.left--;
                        target.clip.right++;
                        xtraPixW--;
                    }
                }
                target.clip.left -= incrementW;
                target.clip.right += incrementW;
            }
            if ((target.clip.top - target.origTop) <= incrementH) {
                target.clip.top = target.origTop;
                target.clip.bottom = target.origBottom;
            } else {
                if (xtraPixH > 0) {
                    if (xtraPixH <= visits) {
                        if (alternateH) {
                            target.clip.top--;
                            target.clip.bottom++;
                            xtraPixH--;
                        }
                        alternateH = !alternateH;
                    } else {
                        target.clip.top--;
                        target.clip.bottom++;
                        xtraPixH--;
                    }
                }
                target.clip.top -= incrementH;
                target.clip.bottom += incrementH;
            }
            visits--;
        }
        if (target.clip.left == target.origLeft && target.clip.top == target.origTop) {
        } else {
            setTimeout("tmt_LayerBoxOut(\"" + targetNN + "\",\"" + targetIE + "\",\"" + dur + "\",1)", dur);
        }
    }
}