<!--
var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
var NS5 = (document.getElementById) ? 1 : 0;
var Active = 0;

// Detección de sistema MAC/PC

var appVer = navigator.appVersion;

if (appVer.indexOf("Mac") != -1) {
	//Mac
	Mac = 1;
} else {
	//PC
	Mac = 0;
}

if (navigator.appName == "Netscape") {
	layerRef="document.layers";
  	styleSwitch="";
    } else {
    	layerRef="document.all";
    	styleSwitch=".style";
    }

function Imprimir(file, tipo) {

		window.open('/herramientas/print.asp?file=' + file + '&who=' + tipo,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
}

function Guardar_Secc(file, tipo) {

		window.open('/herramientas/guardar.asp?file=' + file + '&who=' + tipo,'Guardar','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
}


function Enviar_Amigo(file, tipo) {

		window.open('/herramientas/mail.asp?file=' + file + '&who=' + tipo,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');
}


function ImprimirAvance(idAvance) {

		window.open('/herramientas/print_avances.asp?idAvance=' + idAvance,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
}

function Guardar_Avance(idAvance) {

		window.open('/herramientas/guardar_avances.asp?idAv=' + idAvance,'Guardar','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
}


function Enviar_Avances(idAvance) {

		window.open('/herramientas/mail_avances.asp?idAv=' + idAvance,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');
}

function ventanaAd()
{
var myWindow = window.open('/ad/redirect.asp?id=2','Unifertes','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=470,height=335');
}

function ventanaEdiciones()
{
	window.open('/anteriores.asp','vEdiciones','resizable=yes,scrollbars=no,dependent=yes,screenX=20,screenY=20,status=0,alwaysRaised=yes,width=270,height=362,resizable=no');
}

function ventanaPersonaje()
{
	window.open('/servicios/contactoPersonaje.asp','Personaje','resizable=yes,scrollbars=no,dependent=yes,screenX=20,screenY=20,status=0,alwaysRaised=yes,width=440,height=360,resizable=no');
}

function ventanaAvance(id)
{
  	window.open("/avances/default.asp?id="+id,"vAvance",'toolbar=no,menubar=no,width=600,height=400,scrollbars=yes,resizable=yes');
}

function ventanaEncuesta(Id)
{
	window.open('/Encuesta/VerResultadosPop.asp?IdEnc='+ Id,'Resultados','resizable=yes,scrollbars=no,width=230,height=350');
}

function ventanaEncuesta2(Id)
{
	window.open('/Encuesta/VerResultadosPop2.asp?IdEnc='+ Id,'Resultados','resizable=yes,scrollbars=no,width=230,height=300');
}

function ventanaEncuesta_n(Id)
{
	window.open('/Encuesta/VerResultadosPop_n.asp?IdEnc='+ Id,'Resultados','resizable=yes,scrollbars=no,width=230,height=300');
}

function openAudioWindow(pagina) {
	var date = new Date ();
  	window.open(pagina,date.getTime(),'toolbar=no,menubar=no,width=352,height=170,scrollbars=no,resizable=no');
}

function ventanaWeil(ruta,img) {
	var date = new Date ();
	window.open("/ventanaWeil.asp?ruta="+ruta+"&img="+img,date.getTime(),'width=352,height=170,toolbar=no,menubar=no,scrollbars=no,resizable=yes');
}

function buscarSeccion(dd, mm, yy, I, N)
{
        window.open('/ediciones/' + yy + '/' + mm + '/' + dd + '/default.asp?I='+ I +'&N='+ N, '', 'resizable=yes,scrollbars=yes');
}

function go()
{
    var URL = document.busq.pastedic.options[document.busq.pastedic.selectedIndex].value;
    parent.parent.location.href = URL;
}

// FUNCIONES PARA CAMBIAR EL COLOR DE LAS CELDAS DE UNA TABLA (IE)

function onOver(src,clrOver)
{
	if (navigator.appName != "Netscape")
	{
		if (!src.contains(event.fromElement))
		{
			src.style.cursor = 'hand';
			src.bgColor = clrOver;
		}
	}
        else
        {
	        src.style.backgroundColor = clrOver;
        }
}

function onOut(src,clrIn)
{
	if (navigator.appName != "Netscape")
	{
		if (!src.contains(event.toElement))
		{
			src.style.cursor = 'default';
			src.bgColor = clrIn;
     		}
	}
        else
        {
	        src.style.backgroundColor = clrIn;
        }
}


// FUNCIONES DE MACROMEDIA PARA HACER SWAP DE IMAGENES

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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_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];}
}

// FUNCIONE PARA ABRIR LA AYUDA

var H_URL_BASE='',H_TOPIC='',H_KEY='',L_H_TEXT='',H_FILTER='',H_BRAND='',bSearch=false;
var H_CONFIG='',L_H_APP='',L_CONTACTUS_URL='';
var H_BURL='../../../Ayudas/General.htm',H_TARG='',H_VER='1.7';
var h_win,H_OTHER='',bResize=true;

function DoHelp(iNm) {
	var sQP='?',W,H,sWD,sc=screen.width,bIE4PC;
	var agent = navigator.userAgent.toLowerCase();
	var app = navigator.appName.toLowerCase();
	sQP+='H_VER='+H_VER;
	if (H_BRAND!='') sQP+='&BrandID='+H_BRAND
	if (H_FILTER!='') sQP+='&Filter='+H_FILTER
	sQP+=(bSearch) ? '&SEARCHTERM='+escape(H_KEY)+'&S_TEXT='+escape(L_H_TEXT):'&TOPIC='+H_TOPIC
	if (typeof(v1)!="undefined") sQP+='&v1='+escape(v1)
	else sQP+='&v1='+escape(document.location.protocol + "//" + document.location.hostname)
	sQP+='&v2='+escape(document.location.search);
	if (typeof(H_CONFIG) != "undefined" && (self.name == null || self.name == "" || self.name == "msnMain")) self.name = H_CONFIG.substring(0,H_CONFIG.indexOf("."));
	sQP+='&tmt='+escape(window.name);

	if (sc<=800) sQP+="&sp=1";
	W=(sc<= 800 && agent.indexOf("mac")==-1)?180:230;
	H=(agent.indexOf("windows")>0 && agent.indexOf("aol")>0) ? screen.availHeight-window.screenTop-22:screen.availHeight//*AOL

	var agent_isMSN = false, vi = agent.indexOf('msn ');
	if (vi > -1) {

	agent_isMSN = agent.substring(vi+4);
	agent_isMSN = parseFloat(agent_isMSN.substring(0,agent_isMSN.indexOf(";")));
	agent_isMSN = (agent_isMSN != NaN && agent_isMSN >= 6)

	}
	if (agent_isMSN){
	window.external.showHelpPane(H_URL_BASE+'/frameset.asp'+sQP+'&H_APP='+escape(L_H_APP)+'&INI='+H_CONFIG,W)
	}
	else if (agent.indexOf('webtv')>0 || agent.indexOf('msn companion')>0){
	top.location.replace(H_URL_BASE+'/frameset.asp'+sQP+'&H_APP='+escape(L_H_APP)+'&INI='+H_CONFIG)
	}
	else {
	sWD="toolbar=0,status=0,menubar=0,width="+W+",height="+H+",left="+(sc-W)+",top=0,resizable=1";
	bResize=false;
	bIE4PC = agent.indexOf("msie 4")>0 && agent.indexOf("aol")<0 && agent.indexOf("mac")<0
	if (H_TARG=='') H_TARG = (bIE4PC)?'_help17':'_help';
	if (iNm != null) H_TARG+=iNm;
	if (bIE4PC && h_win!=null && !h_win.closed) h_win.location.replace(H_BURL+sQP)
	else h_win=window.open(H_BURL+sQP,H_TARG,sWD);
	if (h_win && agent.indexOf("mac")<0 && app.indexOf("netscape")<0) h_win.opener=self//*IE5+PC
	}
}


//FUNCION IMPRIMIR

function printPV(name) {
	window.open('printPV.asp?pageview='+name,'printPV','scrollbars=yes, width=700, height=550, resizable=no');
}

function printWindow(framep) {
	bV = parseInt(navigator.appVersion);
	if (bV >= 4) {
		eval('window.parent.' + framep + '.focus()');
		eval('parent.' + framep + '.print()');
	}
	
}

//INSERCION COOKIES


function getCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
      endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;
        while (i < clen) {
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg)
                        return getCookieVal (j);
                i = document.cookie.indexOf(" ", i) + 1;
                        if (i == 0)
                                break;
                }
   return null;
}

function SetCookie (name, value) {
        var argv = SetCookie.arguments;
        var argc = SetCookie.arguments.length;
        var expires = (argc > 2) ? argv[2] : null;
        var path = (argc > 3) ? argv[3] : null;
        var domain = (argc > 4) ? argv[4] : null;
        var secure = (argc > 5) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) + 
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
        ((path == null) ? "" : ("; path=" + path)) +
        ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
}

//FUNCION PARA DESHABILITAR EL BOTON DERECHO

function disableButton() {

	if(window.Event)
		document.captureEvents(Event.MOUSEUP);function nocontextmenu()
		{
			event.cancelBubble=true
			event.returnValue=false;return false;
		}
		function norightclick(e)
		{
			if(window.Event)
			{
				if(e.which==2||e.which==3)
				return false;
			}
			else
				if(event.button==2||event.button==3)
				{
					event.cancelBubble=true
					event.returnValue=false;return false;
				}
		}
		document.oncontextmenu=nocontextmenu;document.onmousedown=norightclick;


}

function envioImg(ruta, dd,mm,aaaa,img)
{
	window.open(ruta +'Email/envioImg.asp?dia=' + dd + '&mes='+ mm +'&anio='+ aaaa +'&imagen='+ img,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');
}

function buscarEdicion(dd, mm, yy, I)
{
       // window.open('http://infotech04:96/ediciones/' + yy + '/' + mm + '/' + dd + '/default.asp?I='+ I +'&N=1', '', 'resizable=yes,scrollbars=yes');
       window.open('http://128.241.247.85/ediciones/' + yy + '/' + mm + '/' + dd + '/default.asp?I='+ I +'&N=1', '', 'resizable=yes,scrollbars=yes');
}

function buscarEdicionEst(dd, mm, yy)
{
        //window.open('http://infotech04:96/ediciones/' + yy + '/' + mm + '/' + dd + '/default.htm', '', 'resizable=yes,scrollbars=yes');
        window.open('http://128.241.247.85/ediciones/' + yy + '/' + mm + '/' + dd + '/default.htm', '', 'resizable=yes,scrollbars=yes');
}


function guardarFavoritoImg(dia,mes,anio,archivo, titulo, leyenda, w, h) {

        window.open('favoritos/guardarImg.asp?dia='+ dia +'&mes='+ mes +'&anio='+ anio +'&archivo='+archivo +'&titulo='+ titulo +'&leyenda='+ leyenda +'&w='+ w +'&h='+ h, 'Favoritos','resizable=no,scrollbars=no,dependent=yes,screenX=435,screenY=350,status=0,alwaysRaised=yes,width=435,height=350');
}

function buscarNotaEdicion(dd, mm, yy, I, N)
{
        //window.open('http://infotech04:96/ediciones/' + yy + '/' + mm + '/' + dd + '/default.asp?I='+ I +'&N='+N+'&noFirstStory=1', '', 'resizable=yes,scrollbars=yes');
        window.open('http://http://128.241.247.85/ediciones/' + yy + '/' + mm + '/' + dd + '/default.asp?I='+ I +'&N=1', '', 'resizable=yes,scrollbars=yes');
}

// -->
