<!--

var NS4 = (document.layers) ? 1 : 0;
var IE4 = (document.all) ? 1 : 0;
var NS5 = (document.getElementById) ? 1 : 0;

FONT_NORMAL = 12;
FONT_SMALLEST = 9;
FONT_LARGEST = 15;
COLUMA_NORMAL = 1;
MAX_COLUMAS = 2;

col2Width = '100%';
col1Width = '100%';
colWidth = 0;

// FUNCIONES PARA CAMBIO DINAMICO DE TAMAÑO DE FONTS

var gMinSize = 0;
var gNumSizes = 10;
var gCurSize = 5;

function SetSize()
{
	var sz = 14;
	
	switch (gCurSize) {
	case 0:
		sz = 9;
		break;
	case 1:
		sz = 10;
		break;
	case 2:
		sz = 11;
		break;
	case 3:
		sz = 12;
		break;
	case 4:
		sz = 13;
		break;
	case 5:
		sz = 14;
		break;
	case 6:
		sz = 15;
		break;
	case 7:
		sz = 16;
		break;
	case 8:
		sz = 17;
		break;
	case 9:
		sz = 18;
		break;
	}
	
	if (NS4) {
		document.classes.itStyle.Normal.fontSize = sz;
		document.classes.itStyle.Bold.fontSize = sz;
                document.classes.itStyle.Italica.fontSize = sz;
                document.classes.itStyle.BoldItalica.fontSize = sz;

	} else if (IE4) {
		var styleSheetObj = document.styleSheets(0);

		styleSheetObj.addRule(".Normal","font-size:" + sz + "px");
		styleSheetObj.addRule(".Bold","font-size:" + sz + "px");
                styleSheetObj.addRule(".Italica","font-size:" + sz + "px");
                styleSheetObj.addRule(".BoldItalica","font-size:" + sz + "px");
	} else {
 		var styleSheetObj = document.getElementById("itStyle");
		
		styleSheetObj.appendChild (document.createTextNode(".Normal { font-size:" + sz + "px } "));
		styleSheetObj.appendChild (document.createTextNode(".Bold { font-size:" + sz + "px } "));
		styleSheetObj.appendChild (document.createTextNode(".Italica { font-size:" + sz + "px } "));
		styleSheetObj.appendChild (document.createTextNode(".BoldItalica { font-size:" + sz + "px } "));
	}
}

function cambiarTamano(tam,masomenos) {
	for (j=0; j<document.styleSheets.length; j++) {
		
	  if (document.all)
		miRegla = document.styleSheets[j].rules;
	  else
		miRegla = document.styleSheets[j].cssRules;
		
	
	  for (i=0; reg=miRegla[i]; i++) {
		size = reg.style.fontSize;
		//alert(size);
		if ((size!='') && ((size.indexOf('px')>0) || (size.indexOf('pt')>0))) {
			if (masomenos == 0) 
		  		size=parseFloat(size)+tam+'px';
			else
				size=parseFloat(size)-tam+'px';
		  reg.style.fontSize=size;
		  
		}
	  }
	  
	}
}

function SetBigger()
{
	if (gCurSize < gNumSizes-1) {
		gCurSize++;
		//SetSize();
		cambiarTamano(gCurSize,0);
	}
}

function SetSmaller()
{
	if (gCurSize > gMinSize) {
		gCurSize--;
		//SetSize();
		cambiarTamano(gCurSize,1);
	}
}


//FUNCIONES DE IMPRESION ESPECIFICAS DE LA NOTA

function printArticle(file, tipo) {
	if (tipo == 1) {

	}

	if (tipo == 2) {
		//printWindow('contentView');
		window.open('../../../print.asp?file=' + file,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
	}
}

function printArticleCompleto(file, tipo, C, P, N, V) {
	if (tipo == 1) {

	}

	if (tipo == 2) {
		//printWindow('contentView');
		window.open('../../../print.asp?file=' + file +'&C=' + C + '&P=' + P +'&N=' + N +'&V=' + V,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
	}
}

function printArticleDemo(file, tipo) {
	if (tipo == 1) {

	}

	if (tipo == 2) {
		//printWindow('contentView');
		window.open('../../../printDemo.asp?file=' + file,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
	}
}

function printArticleNew(file, tipo) {
	if (tipo == 1) {

	}

	if (tipo == 2) {
		//printWindow('contentView');
		window.open('../../../printNew.asp?file=' + file,'Imprimir','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');
	}
}

function saveArticle(dd, mm, yy, file) {

		window.open('../../../guardar/guardar.asp?dia=' + dd + '&mes=' + mm + '&anio=' + yy + '&archivo=' + file,'SAVE','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');

}

function saveArticleCompleto(dd, mm, yy, file, C, P, N, V) {

		window.open('../../../guardar/guardar.asp?dia=' + dd + '&mes=' + mm + '&anio=' + yy + '&archivo=' + file +'&C=' + C +'&P=' + P + '&N=' + N +'&V=' + V,'SAVE','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');

}

function saveArticleNew(dd, mm, yy, file) {

		window.open('../../../guardar/guardar.asp?dia=' + dd + '&mes=' + mm + '&anio=' + yy + '&archivo=' + file,'SAVE','resizable=yes,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=1,alwaysRaised=yes,width=560,height=600');

}


function envioAmigo(file) {

	window.open('../../../email/default.asp?file=' + file,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');

}

function envioAmigoCompleto(file,C,P,N,V) {

	window.open('../../../email/default.asp?file=' + file +'&C=' + C + '&P='+ P + '&N=' + N + '&V=' + V,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');

}

function envioAmigoNew(file) {

	window.open('../../../email/defaultNew.asp?file=' + file,'Email','resizable=no,scrollbars=yes,dependent=yes,screenX=200,screenY=200,status=0,alwaysRaised=yes,width=320,height=500');

}


function guardarFavoritoNota(dia,mes,anio,archivo,I,C,P,N) {

        window.open('../../../favoritos/guardarNota.asp?dia='+ dia +'&mes='+ mes +'&anio='+ anio +'&archivo='+archivo +'&I='+ I +'&C='+ C +'&P='+ P +'&N='+ N,'Favoritos','resizable=no,scrollbars=no,dependent=yes,screenX=431,screenY=300,status=0,alwaysRaised=yes,width=431,height=300');
}

function GotoFav(w,anio,mes,dia){
	//parent.parent.areaPageview.botoneraPV.location = "/Demos/ElUniversalMX/ediciones/"+ anio +"/"+ mes +"/"+ dia +"/botoneraMiDiario.asp?I=0&V=1024&displayMode=0&load=" + w;
	parent.parent.areaPageview.botoneraPV.location = "/ediciones/"+ anio +"/"+ mes +"/"+ dia +"/botoneraMiDiario.asp?I=0&V=1024&displayMode=0&load=" + w;
	
}
//FUNCIONES DE REDIRECCIONAMIENTO

function gotoPage(I, secc){

	parent.parent.areaPageview.botoneraPV.location = "botonerapg.asp?I=" + I + "&pageMode=0&section=" + secc

}


function GotoFav(w,anio,mes,dia){
	//parent.parent.areaPageview.botoneraPV.location = "/ediciones/"+ anio +"/"+ mes +"/"+ dia +"/botoneraMiDiario.asp?I=0&V=1024&displayMode=0&load=" + w;
	parent.parent.areaPageview.botoneraPV.location = "/ediciones/"+ anio +"/"+ mes +"/"+ dia +"Fav/botoneraMiDiario.asp?I=0&V=1024&displayMode=0&load=" + w;
}


//FUNCION IR A NOTA

function gotoNote(i,n)
{
	parent.botoneraArticulo.location = "botoneraArticulo.asp?I="+i+"&N="+n+ "&V=" + parent.parent.header.vers;
}

function gotoNoteB(dd, mm, yy, i, n)
{
    if(dd<10){
     dd = '0' + dd;
    }
    
    if(mm<10){
     mm = '0' + mm;
    }    
	parent.botoneraArticulo.location = '/ediciones/' + yy + '/' + mm + '/' + dd + '/botoneraArticulo.asp?I='+i+'&N='+n+ '&V=' + parent.parent.header.vers;
}

//FUNCION IR A NOTA INVOCANDO PV

function gotoNotePV(i,n)
{
	parent.botoneraArticulo.location = "botoneraArticulo.asp?I="+i+"&N="+n+ "&V=" + parent.parent.header.vers;
	
	parent.parent.areaPageview.botoneraPV.location = "botonerapg.asp?I=" + i + "&pageMode=0&noFirstStory=1"
}

function gotoNotePVB(dd, mm, yy, i,n)
{
	parent.botoneraArticulo.location = "/ediciones/" + yy + "/" + mm + "/" + dd + "/botoneraArticulo.asp?I="+i+"&N="+n+ "&V=" + parent.parent.header.vers;
	
	parent.parent.areaPageview.botoneraPV.location = "/ediciones/" + yy + "/" + mm + "/" + dd + "/botonerapg.asp?I=" + i + "&pageMode=0&noFirstStory=1"
}


// Detección de Navegador/Version NetS >4/IE >4

function DetectBrowser() {
	if (document.layers) {
		//Netscape comunicator 4
		
		layerRef="document.layers";
		styleSwitch="";
	
		prnt_i = "[";
		prnt_f = "]";
	
		offsetX = 337;
		offsetY = -2 + self.pageYOffset;
	}

	if (document.getElementById) {
		//Netscape Navigator 5
	
		layerRef="document.getElementById";
		styleSwitch=".style";
    
		prnt_i = "(";
		prnt_f = ")";
	
		offsetX = 337;
		offsetY = -2 + self.pageYOffset;
	}

	if (document.all) {
		//IE 4 0 >

		layerRef="document.all";
		styleSwitch=".style";

		prnt_i = "[";
		prnt_f = "]";
	
		offsetX =337;
		offsetY = -2 + document.body.scrollTop;
	}
}

//FUNCIONES PARA MOSTRAR MENUS DESPLEGABLES

function showLayer(layerName)
{
	
	DetectBrowser();
		
	if (layerRef != '') {
		eval(layerRef+ prnt_i + '"'+layerName+'"'+ prnt_f +styleSwitch+'.left =' + offsetX);
		eval(layerRef+ prnt_i + '"'+layerName+'"'+ prnt_f +styleSwitch+'.top =' + offsetY);
		eval(layerRef+ prnt_i + '"'+layerName+'"'+ prnt_f +styleSwitch+'.visibility="visible"');
	}
		
}

function hideLayer(layerName)
{
	if (layerRef != '') {
		eval(layerRef+ prnt_i +'"'+layerName+'"'+ prnt_f +styleSwitch+'.visibility="hidden"');
	}
}


function OcultaNota()
{
	
	if (IE4) {
	DetectBrowser();
	if (layerRef != '') {
		eval(layerRef+ prnt_i + '"LayerNt"'+ prnt_f +styleSwitch+'.visibility="hidden"');
		parent.botoneraArticulo.OcultaBarra();
	}
	}
	
}


function MuestraNota()
{
	if (IE4) {
	DetectBrowser();
	parent.botoneraArticulo.MuestraBarra();
	eval(layerRef + '["LayerNt"]' + styleSwitch + '.visibility="visible"');
	}

}


function OcultaBarra()
{
	if (IE4) {
	DetectBrowser();
	if (layerRef != '') {
		eval(layerRef+ prnt_i + '"LayerArt"'+ prnt_f +styleSwitch+'.visibility="visible"');
	}

	}

}


function MuestraBarra()
{

	if (IE4) {

	DetectBrowser();

	if (layerRef != '') {
		eval(layerRef+ prnt_i +'"LayerArt"'+ prnt_f +styleSwitch+'.visibility="hidden"');
	}

	}
}

function envioAmigo_layer()
{
	DetectBrowser();
	eval(layerRef+ prnt_i + '"Email"'+ prnt_f +styleSwitch+'.top =' + offsetY);
	
	eval(layerRef+ prnt_i + '"Email"'+ prnt_f +styleSwitch+'.visibility="visible"');
	
	OcultaFavoritos();
}


function OcultaEnvio()
{
	DetectBrowser();
	if (layerRef != '') {
		eval(layerRef+ prnt_i + '"Email"'+ prnt_f +styleSwitch+'.visibility="hidden"');
		}
}

function Favorito_layer()
{
	DetectBrowser();
	eval(layerRef+ prnt_i + '"favs"'+ prnt_f +styleSwitch+'.top =' + offsetY);
	
	eval(layerRef+ prnt_i + '"favs"'+ prnt_f +styleSwitch+'.visibility="visible"');
	
	OcultaEnvio();
}

function OcultaFavoritos()
{
	DetectBrowser();
	if (layerRef != '') {
		eval(layerRef+ prnt_i + '"favs"'+ prnt_f +styleSwitch+'.visibility="hidden"');
		}
}

//ASIGNACION DE COOKIES

function assign_Cookie(I, N) {

	var usersession = GetCookie('user_session');

	var day = new Date();
	var hora = day.getHours();
	var mins = day.getMinutes();
	var segs = day.getSeconds();
	var mili = day.getMilliseconds();

    // set expiry date to 1 day from now.

    var largeExpDate = new Date ();

	largeExpDate.setTime(largeExpDate.getTime() + (1460 * 24 * 3600 * 1000));

	var v_pages = I + '-' + N;

	if (usersession != null) {

		var usr_s = usersession.split("");

		v_pages = usersession + ',' + I + '-' + N;

	}

	SetCookie('user_session', v_pages, null,'');

}

function notificacion()
{
	DetectBrowser();
	if (parent.parent.parent.header.notificado == 0) {
		if(parent.parent.parent.header.totalNotasP >= 1) {
			eval(layerRef+ prnt_i + '"notificacion"'+ prnt_f +styleSwitch+'.visibility="visible"');
			parent.parent.parent.header.EstadoNotificado();
			setTimeout('OcultarLayer_notificacion()', 10900);
		}
	}
}

function OcultarLayer_notificacion()
{
	DetectBrowser();
	eval(layerRef+ prnt_i + '"notificacion"'+ prnt_f +styleSwitch+'.visibility="hidden"');
	
}

function NotasProgramadas() {
//		parent.parent.areaPageview.PageView.location="../../../notas/VerificarPalabra.asp?diax=" + dia + "&mesx=" + mes + "&annox=" + anio;
		parent.parent.areaPageview.botoneraPV.location = "botoneraMiDiario.asp?I=&V=&displayMode=4&notasProgramadas=1";
		parent.parent.areaContentview.contentView.location="../../../../ediciones/Ayudas/ver-notas.htm";
}

// -->