var DHTML = (document.getElementById || document.all || document.layers)
/************************************
 * OBTENER DOMINIO DEL SITIO        *
 ************************************/
dominio = document.domain.toLowerCase();
pUrl = document.location.href.toLowerCase();
var site ;
//var dominio = "www.elnorte.com";
if (dominio.indexOf('.com') < 0) {
    siteMenu = 'http://'+ dominio + '/stageenlineagc';
    if (dominio == 'intranetsgc' || dominio == 'intraneteditoragc') site = 'elnorte';
    else if (dominio == 'intranetreformagc') site = 'reforma';
    else if (dominio == 'intranetmuralgc') site = 'mural';
    else site = 'palabra';
}
else {
    siteMenu = 'http://'+dominio
    
   // alert(pUrl.indexOf('/plazaconsulta=reforma/'))
    
    if ( pUrl.indexOf('plazaconsulta=elnorte') != -1) siteMenu = 'http://www.elnorte.com'
    else if ( pUrl.indexOf('plazaconsulta=reforma') != -1) siteMenu = 'http://www.reforma.com'
    else if ( pUrl.indexOf('plazaconsulta=mural') != -1) siteMenu = 'http://www.mural.com'
    else if ( pUrl.indexOf('plazaconsulta=palabra') != -1) siteMenu = 'http://www.palabra.com'
    
    if (dominio.indexOf('busquedas') == -1){
        site = dominio.replace("www.","");
        site = site.replace("gruporeforma.","");
        site = site.replace("envivo.","");
        site = site.replace(".com","");
    }
    else {
        if (pURL.indexOf('/elnorte/') != -1) site = 'elnorte'
        else if (pURL.indexOf('/reforma/') != -1) site = 'reforma'
        else if (pURL.indexOf('/mural/') != -1) site = 'mural'
        else if (pURL.indexOf('/palabra/') != -1) site = 'palabra'
    }
}

siteMenu = siteMenu.replace("comercial","www");
siteMenu = siteMenu.replace("gruporeforma","www");



//alert(pUrl + '\n' + site + '\n' + siteMenu)
if(dominio.indexOf('.com') < 0) pathBotonesMM='http://'+dominio+'/stageenlineagc/';
else pathBotonesMM = 'http://www.'+site+'.com/'



/************************************
 * FUNCION HERRAMIENTAS PLAYERS MM  *
 ************************************/
function votaMM(direccion){
    LeftPosition = (screen.width) ? (screen.width-640)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-440)/2 : 0;
    window.open(pathBotonesMM + direccion + '&PlazaVoto=' + site,'paginaweb','top=' + TopPosition +',left=' + LeftPosition + ',width=640,height=440,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}
function enviarMM(titulo,categoria,subcategoria,URL2){
  baseAddressMM=document.location.href;
  baseAddressMM=baseAddressMM.toLowerCase();
  plazasMM=new Array('elnorte','reforma','mural','palabra');
  plazaconsultaMM='';
  for(var i=0;i<plazasMM.length;i++){
    urMM=baseAddressMM.search('plazaconsulta='+plazasMM[i]);
    if(urMM>-1){
      plazaconsultaMM=plazasMM[i];
      break;}}
  if(plazaconsultaMM!=''){
    URL2=URL2+'/default.htm?plazaconsulta='+plazaconsultaMM;
    pathBotonesMM = pathBotonesMM.replace(site,plazaconsultaMM);}
  LeftPosition=(screen.width)?(screen.width-440)/2:0;
  TopPosition=(screen.height)?(screen.height-460)/2:0;
  var Liga=pathBotonesMM+"libre/online07/envialo/default.asp?Titulo="+titulo+" -Enviado Libre&CategoriaId="+categoria+"&SubCategoriaId="+subcategoria+"&URL="+URL2;
  window.open(Liga,'envialo','top='+TopPosition+',left='+LeftPosition+',width=440,height=460,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}
function guardarMM(ligacajon,seccioncajon,tipocajon,fechacajon,archivoidcajon,titulocajon){
  baseAddressMM=document.location.href;
  baseAddressMM=baseAddressMM.toLowerCase();
  plazasMM=new Array('elnorte','reforma','mural','palabra');
  plazaconsultaMM='';
  for(var i=0;i<plazasMM.length;i++){
    urMM=baseAddressMM.search('plazaconsulta='+plazasMM[i]);
    if(urMM>-1){
      plazaconsultaMM=plazasMM[i];
      break;}}
  if(plazaconsultaMM!=''){
    ligacajon=ligacajon+'/default.htm?plazaconsulta='+plazaconsultaMM;
    pathBotonesMM = pathBotonesMM.replace(site,plazaconsultaMM);}
  usuarioidMM=Get_Cookie('cusuarioss');
  titulocajon=caractEspec(titulocajon);
  titulocajon=escape(titulocajon);
  herramienta(pathBotonesMM+"micajon/micajon.aspx?usuarioid="+usuarioidMM+"&titulo="+titulocajon+"&liga="+ligacajon+"&seccion="+seccioncajon+"&tipo="+tipocajon+"&fecha="+fechacajon+"&archivoid="+archivoidcajon);
}
function comentarMM(titulo,nombreSecc,correoSecc,PlazaConsulta,ElementoDestinoId,DestinoId,imgPromo){
    var aleatorio="P"+Math.round(Math.random()*1000);
	LeftPosition=(screen.width)?(screen.width-640)/2:0;
	TopPosition=(screen.height)?(screen.height-640)/2:0;
    var guardarURL=pathBotonesMM+"general/comentariogenerico/default.asp?titulo="+titulo+"&nombreSecc="+nombreSecc+"&correoSecc="+correoSecc+"&PlazaConsulta="+PlazaConsulta+"&ElementoDestinoId="+ElementoDestinoId+"&DestinoId="+DestinoId+"&imgPromo="+imgPromo;
	window.open(guardarURL,aleatorio,'top='+TopPosition+',left='+LeftPosition+',width=640,height=640,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');
}
function descargarMM(descargarURL){
var aleatorio="P"+Math.round(Math.random()*1000);
LeftPosition=(screen.width)?(screen.width-640)/2:0;
TopPosition=(screen.height)?(screen.height-640)/2:0;
window.open(descargarURL,aleatorio,'top='+TopPosition+',left='+LeftPosition+',width=640,height=640,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=yes');
}
/************************************
 * OBTENER FECHA (PARA (S)HTML'S)   *
 ************************************/
function fecha()
{
    var fechahoy = new Date();
    diahoy = new String('0'+fechahoy.getDate());
    if (diahoy.length > 2)
        {diahoy = diahoy.substr(1,2);}
    var meshoy =fechahoy.getMonth();
    var aniohoy = new String(fechahoy.getFullYear());
    mes = new Array('Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic');
    
document.write('<span class="arheader13"><b>'+diahoy +'-'+ mes[meshoy]+'-'+aniohoy.substr(2,2)+'</b></span>');
}
/************************************
 * IDENTIFICAR PLATAFORMA Y BROWSER *
 ************************************/
var navUA = navigator.userAgent.toLowerCase();
var tipoBrowser;
var tipoPlataforma;
if (navUA.indexOf('ipod') != -1)
	tipoBrowser = 'iphone';
else if (navUA.indexOf('iphone') != -1)
	tipoBrowser = 'iphone';
else if (navUA.indexOf('msie') != -1)
	tipoBrowser = 'explorer';
else if (navUA.indexOf('netscape') != -1)
	tipoBrowser = 'netscape';
else if (navUA.indexOf('firefox') != -1)
	tipoBrowser = 'firefox';
else if (navUA.indexOf('safari') != -1)
	tipoBrowser = 'safari';

if (navUA.indexOf('windows') != -1)
	tipoPlataforma = 'windows';
else
	tipoPlataforma = 'mac';
/****************************
 * FUNCIONES PARA MENU      *
 ****************************/

function CreateMenuHeader()
{
    var str='';
    var nParamsBase=0;
    str+="<table width='"+configMenu.tamanioHeader+"' height='23' border='0' cellpadding='0' cellspacing='0' class='MenuHeaderClass'><tr>";
    for (var i=0; i<arguments.length; i++) 
    {    
     str+="<td id='td"+i+"' style='text-align:center;' onmouseover='creaMenuItems(this,\"menu_Arrow"+i+"\","+i+",\""+configMenu.fontColor+"\",\""+configMenu.fontColorHover+"\");'><img name='menu_Arrow"+i+"' width='15' height='15' border='0' align='absmiddle' src='"+configMenu.flechaOff+"'>"+arguments[i]+"</td><td height='23'>"
     if(i<arguments.length-1)
        str+="<img width='1' height='23' border='0' valign='top' src='"+configMenu.imagenSeparador+"'>";
     str+="</td>"
    }
    str+="</tr></table>";
    return str;
}

function classNameClicks(nombre)
{
    var posicion= nombre.indexOf(">");
    var length=nombre.length-posicion;
    nombre=nombre.substr(posicion+1,length)
    nombre= nombre.replace(/ /gi,"");
    nombre= nombre.replace(/á/gi,"a");
    nombre= nombre.replace(/é/gi,"e");
    nombre= nombre.replace(/í/gi,"i");
    nombre= nombre.replace(/ó/gi,"o");
    nombre= nombre.replace(/ú/gi,"u");
    return "zonaMENU" + nombre.toUpperCase();
}

function CreateElementsMenu(plaza,seccion)
{
    var classClick=classNameClicks(seccion);
    //alert(classClick);
    var str="<table  border='0' cellpadding='0' cellspacing='0' style='background-color:"+configMenu.backColorLevelOne+";' class=\""+classClick +"\">";
    var urlElem='';
    for (var i=2; i<arguments.length; i=i+2) 
    {
        urlElem=arguments[i+1];                
                   
	    str+="<tr>"+CrearSubElement(arguments[i],urlElem,plaza)+"</tr>";	
	}
	str+="</table>"
	return str;
}

function CrearSubElement(nombre,url2,plaza)
{
    url2=ValidarUrl(url2,plaza);
    var str='';
    if(nombre=='')
        return "<td onmouseover=\"overPhantom(this,true);\" onmouseout=\"outPhantom(this);\"><nobr>&nbsp;</nobr></td>";
    str+="<td height='18' valign='center' class='txtSeccion' style='cursor:pointer;' onmouseover=\"overPhantom(this);\" onmouseout=\"outPhantom(this);\"";
    str+=" onclick=\""
    if(url2.indexOf("javascript:")>-1)
        str+=url2;
    else
        str+="ira('"+url2+"');"
    str+="\"><nobr>&nbsp;&nbsp;&nbsp;" +nombre+"&nbsp;&nbsp;&nbsp;</nobr></td>";	
    return str;
}

function CreateElementsNColumnsMenu(plaza,seccion)
{
    var classClick=classNameClicks(seccion);
    var str="<table  border='0' cellpadding='0' cellspacing='0' style='background-color:"+configMenu.backColorLevelOne+";' class=\""+classClick +"\">";
    
    var arrIzq=new Array();
    var arrDer=new Array();
    var mid=Math.floor((arguments.length-2)/2);
    for (var i=2; i<arguments.length; i=i+2) 
    {
        if(i<mid)
        {
            arrIzq[i-2]=arguments[i];
            arrIzq[i-1]=arguments[i+1];
        }
        else
        {
            arrDer[i-mid-2]=arguments[i];               
            arrDer[i-mid-1]=arguments[i+1];            
        }
    }
    var columna=0;var url='';var nombre='';
    for (var i=0; i<arrIzq.length; i=i+2) 
    {
        var modulo=columna%2;
        nombre='';url='';        
        if(arrIzq.length>i+1)
        {                    
            nombre=arrIzq[i];
            url=arrIzq[i+1];
        }
        str+="<tr>";
        str+=CrearSubElement(nombre,url,plaza);	
        nombre='';url=''; 
        if(arrDer.length>i+1)
        {                    
            nombre=arrDer[i];
            url=arrDer[i+1];
        }        
        str+=CrearSubElement(nombre,url,plaza);
        str+="</tr>";        
        columna++;
	}
	str+="</table>"
	return str;
}
function ValidarUrl(url,plaza)
{
    if(url==null || url=='')
        return '';
    //url= url.replace(/\'/g,"\\\'");
    if(!EsUrlAbsoluto(url))
        url=plaza+url;
    return url;
}

function EsUrlAbsoluto(url)
{    return url.indexOf('http://')>-1 || url.indexOf('javascript:')>-1;}

/***/

function dynamicLoad(jsFileName){
		if(document.getElementById)
		{
			var cnode =document.getElementById('dynld');
			var nnode = document.createElement('script');
			nnode.src = jsFileName;
			nnode.id  = 'dynld';
			cnode.parentNode.replaceChild(nnode,cnode);			
		}
     }
 
        
    var objMenu;
    function creaItem(td, arrowName,posicion,index)
    {
        this.id=td.id;
        this.index=index;
        this.td=td;
        this.td.imagen=document.images[arrowName];
        this.td.parent=this;
        this.posicion=posicion;
        this.top=0;
        this.left=0;
        this.width=null;
        this.height=null;
        this.innerHTML=menuItem[this.posicion];  
        
        this.obtienePosicion=function()
        {
            this.top=0;
            this.left=0;
            var parentTag=this.td.offsetParent;
            while (parentTag.tagName.toLowerCase()!='body')
            {
                this.left+=parentTag.offsetLeft;
                this.top+=parentTag.offsetTop;
                parentTag=parentTag.offsetParent;
            }
            this.left+=this.td.offsetLeft;
            this.top+=this.td.offsetTop + this.td.offsetHeight;
        }
        
        this.td.selectedItem=function()
        {
            this.style.color =objMenu.colorItemSelected;
            this.imagen.src=this.imagen.src.replace("flecha_menu_off.gif","flecha_menu_on.gif");           
        }
        
        this.td.unselectedItem=function()
        {            
            this.style.color =objMenu.colorItemUnselected;
            this.imagen.src=this.imagen.src.replace("flecha_menu_on.gif","flecha_menu_off.gif");
        }
        
        this.td.onmouseover= function()
        {            
            this.selectedItem();
            objMenu.setSelectedIndex(this.parent.index);
            if (this.parent.innerHTML!="")
            {
                objMenu.inPhantom=true;
                this.parent.showPhantom();
            }
        }
                                
        this.td.onmouseout= function(){            
            this.unselectedItem();
            if (this.parent.innerHTML!="")
            {
                objMenu.inPhantom=false;
                objMenu.timerId=window.setTimeout("objMenu.items[objMenu.selectedIndex].hidePhantom();",500);
            }
        }
        
        this.showPhantom=function()
        {            
            this.obtienePosicion();
            objMenu.phantom.style.position="absolute";
            objMenu.phantom.style.left=this.left + "px";
            objMenu.phantom.style.top=this.top + "px";            
            objMenu.phantom.style.visibility="visible";
            objMenu.phantom.innerHTML=this.innerHTML;
            objMenu.phantom.style.visibility="visible";
            objMenu.phantom.style.display="block";           
            if ((this.width==null) || (this.height==null))
            {
                this.width=objMenu.phantom.offsetWidth;
                this.height=objMenu.phantom.offsetHeight;
            }
                        
            objMenu.mask.style.left=this.left + "px";
            objMenu.mask.style.top=this.top + "px";
            objMenu.mask.style.height=this.height + "px";
            objMenu.mask.style.width=this.width + "px";
            objMenu.mask.style.visibility="visible";
            objMenu.mask.style.display="block";
           
        }
        
        this.hidePhantom=function()
        {
            if (!objMenu.inPhantom)
            {
                objMenu.phantom.style.visibility="hidden";
                objMenu.phantom.style.display="none";                
                objMenu.phantom.innerHTML="";
                
                objMenu.mask.style.visibility="hidden";
                objMenu.mask.style.display="none";                
           } 
           else
            window.clearInterval(objMenu.timerId);               
        }
                
        this.td.onmouseover();
        return this;
    }

    function creaMenu()
    {
        if (document.getElementById)
        {
            this.headers=document.getElementById("menu");
            this.phantom = document.getElementById("phantom");
            this.mask=document.getElementById("mask");        
            this.items = new Array();
            this.selectedIndex=0;
            this.inPhantom=false;
            this.phantom.parent=this;
            this.timerId;
            this.colorItemSelected=null;
            this.colorItemUnselected=null;
                    
            this.itemsDefined = function(value){
                for (var i=0;i<this.items.length;i++)
                   if (value.id==this.items[i].id)
                   {
                    return i;
                   }
               return -1;       
            }
           
            this.addItem=function(td,arrowName,posicion,colorItemSelected,colorItemUnselected)
            {
                if (this.colorItemSelected==null) this.colorItemSelected=colorItemSelected;                                
                if (this.colorItemUnselected==null) this.colorItemUnselected=colorItemUnselected;                
                this.items.push(new creaItem(td,arrowName,posicion,this.items.length));
            }
            
            this.setSelectedIndex=function(value)
            {            
                this.selectedIndex=value;         
            }            
            this.headers.innerHTML=menu_header;
            return this;
          }
          else
            return null;          
    }
    
   function overPhantom(td,nocolor)
    {                  
        if(nocolor==null)
            nocolor=false;
        objMenu.inPhantom=true;
        if(!nocolor)
        {
        td.bgColor = configMenu.backColorLevelOneHover;
	    td.style.color=configMenu.fontColorLevelOneHover;	      
	    }
	    objMenu.items[objMenu.selectedIndex].td.selectedItem();
    }
    
    function outPhantom(td,colorfondo,colortexto)
    {        
        td.bgColor = configMenu.backColorLevelOne;
	    td.style.color=configMenu.fontColorLevelOne;	    
	    objMenu.inPhantom=false;	    
	    objMenu.items[objMenu.selectedIndex].td.unselectedItem();
	    objMenu.timerId= window.setTimeout("objMenu.items[objMenu.selectedIndex].hidePhantom();",500);
    }
    
    function creaMenuItems(td,arrowName,posicion,colorItemSelected,colorItemUnselected)
    {        
        var flag=objMenu.itemsDefined(td);
        if (flag==-1)
            objMenu.addItem(td,arrowName,posicion,colorItemSelected,colorItemUnselected);
    }    
    
    function initMenu()
    {           
        objMenu= creaMenu();
        trap();
    }
        
    function ira(href)
    {
        //alert(href);
        if(href=='' || (href.indexOf('http://')==-1 && href.indexOf('javascript:')==-1))
        {
            alert('liga no valida');
            return null;
            }
	    if (href.indexOf("(liga_sinergica)")!=-1)				
		    href= href.replace(/\(liga_sinergica\)/gi,siteMenu);
	    href=href.replace(/&apos;/gi,"'");
	    document.location.href =href;
    }
document.write('<scr'+'ipt id="dynld"></scr'+'ipt>');    
document.write('<div id="phantom" style="position:absolute;left:10px;top:10px;visibility:hidden;display:none;z-index:200;">phantom</div>');
document.write('<IFRAME id="mask" name="mask" frameBorder="0" scrolling="no" style="visibility: hidden; position:absolute; left:0px; top:0px; width:200px; height:50px; z-index:199; display:none;"></IFRAME>');   
var jsfile = siteMenu + "/libre/online07/menu/menu.js";
dynamicLoad(jsfile);


/****************************
 * FUNCIONES PARA IFRAME    *
 ****************************/
function resize_iFrame(iframe_name, lessH)
	{
	if (navigator.userAgent.indexOf('MSIE') != -1)
		{
			height = document.body.offsetHeight;
			var objIframe = getObj(iframe_name)
			objIframe.height=height - 122;
		}
	else if (navigator.userAgent.indexOf('Mozilla/') != -1)
		{
			height = document.documentElement.clientHeight;
			var objIframe = getObj(iframe_name)
			objIframe.height=height + 275;
		}
	//var objIframe = getObj(iframe_name)
	//objIframe.height=height - lessH;
}
/****************************
 * FUNCIONES PARA FECHA     *
 ****************************/
function MostrarFechaActual()  
{  var nombre_mes = new Array("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic")

	var hoy_es = new Date()
	dia_mes = hoy_es.getDate()
	mes = hoy_es.getMonth() + 1
	anyo = hoy_es.getYear()

     if (anyo < 100)
     {  anyo = '19' + anyo }

	else 

     if ( ( anyo > 100 ) && ( anyo < 999 ) ) 
     {  var cadena_anyo = new String(anyo) ; anyo = '20' + cadena_anyo.substring(1,3) }

	document.write(dia_mes + "-" + nombre_mes[mes - 1] + "-" + anyo)    
 }
/****************************
 * FUNCIONES PARA COOKIES   *
 ****************************/
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();}
	else 
		expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function getCookieVal (offset) {  
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
	endstr = document.cookie.length;  
	var clave = unescape(document.cookie.substring(offset, endstr));
	return clave.toLowerCase();
}
function Get_Cookie(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;
}

/****************************
 * FUNCIONES PARA CAMBIO DE *
 * TAMAÑO DE LETRA EN NOTAS *
 ****************************/
function setActiveStyleSheet(title) {
	var i, a, main;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alternate") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if(a.getAttribute("title") == title) a.disabled = false;
		}
	}
}
function getActiveStyleSheet() {
	var i, a;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alternate") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
	}
	return null;
}
function getPreferredStyleSheet() {
	return ('1');
}
function wOL() {
	var cookie = Get_Cookie("style");
	var title = cookie ? cookie : getPreferredStyleSheet();
	if (title == 'null')
		title = '1';
	setActiveStyleSheet(title);
}
function wOUL() {
	var title = getActiveStyleSheet();
	createCookie("style", title, 365);
}

function wOULHome() {
	createCookie("cookiemasvisto",document.forma.configura.selectedIndex,7);
}
/****************************
 * FUNCIONES PARA VENTANAS  *
 ****************************/
function herramienta(direccion)
{	
    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width) ? (screen.width-800)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-400)/2 : 0;
	window.open(direccion,aleatorio,'top=' + TopPosition + ',left=' + LeftPosition + ',width=800,height=400,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}

function herramientatop(direccion)
{	

    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width) ? (screen.width-800)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-400)/2 : 0;
	window.parent.top.location = direccion ;
}

function herramientaforo(direccion)
{	

	LeftPosition = (screen.width) ? (screen.width-800)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-400)/2 : 0;
	window.open(direccion,'foro','top=' + TopPosition + ',left=' + LeftPosition + ',width=800,height=400,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
	
}



function herramientaCarta(direccion)
{	
    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width) ? (screen.width-800)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-400)/2 : 0;
	window.open(direccion,aleatorio,'top=' + TopPosition + ',left=' + LeftPosition + ',width=670,height=550,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no');
}

function herramientaVisor(direccion)
{	
    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width) ? (screen.width-980)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-600)/2 : 0;
	window.open(direccion,aleatorio,'top=' + TopPosition + ',left=' + LeftPosition + ',width=980,height=600,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
}


function herramientascroll(direccion)
{

    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width)  ? (screen.width-800)/2  : 0; 
	TopPosition  = (screen.height) ? (screen.height-400)/2 : 0;
	window.open(direccion,aleatorio,'top=' + TopPosition + ',left=' + LeftPosition + ',width=800,height=400,directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
}

function musicaparanavegar(direccion)
{
    var aleatorio = "P"+Math.round(Math.random()*1000);
	LeftPosition = (screen.width) ? (screen.width-800)/2 : 0; 
	TopPosition = (screen.height) ? (screen.height-400)/2 : 0;
	window.open(direccion,aleatorio,'top=' + TopPosition + ',left=' + LeftPosition + ',width=800,height=400,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}


/****************************
 * FUNCIONES PARA ANUNCIOS  *
 ****************************/
 
 

_version=11;
if (navigator.userAgent.indexOf('Mozilla/3') != -1){
_version=10;} 

var oas='http://anuncios.gruporeforma.com/RealMedia/ads/';
var RN = new String (Math.random());
var RNS = RN.substring (2, 11); 

function DisplayAds (pagina, position, width, height)
{

	baseAddress = document.domain;
	baseAddress = baseAddress.toLowerCase( );

	var oaspage= sitepage + pagina +'/1' + RNS + '@' + position;
	var foto = baseURL.search('foto');
	var opi = baseURL.search('opinion');
	var indica = baseURL.search('indicador');
	var articulo = baseURL.search('articulo');
	var entrada= baseAddress ;									
	var r = entrada.search("elnorte.com");
	//var r = entrada.search("intranetsgc"); //temporal para validar los templates de desarrollo
	var s = entrada.search("reforma.com");
	var t = entrada.search("mural.com");
	var p= entrada.search("palabra.com");
	var imganuncio = "";	
	if (r > -1 || s > -1 || t > -1 || p > -1 )
	{

		if (_version < 11) {

		document.write ('<A HREF="' + oas + 'click_nx.cgi/'+ oaspage + '" TARGET="_top" ><IMG SRC="' + oas + 'adstream_nx.cgi/' + oaspage + '" BORDER="0" WIDTH="' + width + '" HEIGHT="' + height + '"></a>');
		}
		else
		{
			document.write ('<'+'SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas + 'adstream_jx.cgi/' + oaspage + '">');
			document.write ('\<\!-- --\>');
			document.write ('\<\/SCRIPT\>');
			document.write ('\<\!-- --\>');
		}
	}
	else
		{	
				
			baseSTG = '<img src="' + 'http://' + document.domain + '/stageenlineagc/img/';			
			if ((position=="TopRight" || position=="Right" || position=="Right1" || position=="Right2" || position=="Right3") && articulo < 0)
				imganuncio = 'anunpix.gif" width="180" height="60">';
			else
			 {
				if (position=="Top" || position=="Top1" || position=="Top2" || position=="Top3" )
					imganuncio = 'anunpix.gif" width="182" height="90">';
				else
					{ 
					if (position=="Middle1" || position=="Middle2")
						 imganuncio = 'anunpix.gif" width="270" height="132">';
					else						
						if ((position=="Right" || position=="Right1" || position=="Right2" || position=="Right3") && articulo > 0)
						 imganuncio = 'anunpix.gif" width="120" height="115">';
						else
						{
						    if (position=="Position1" && articulo > 0)
						        imganuncio = 'anunpix.gif"  width="595" height="90">';
						    else
						        {
						            if (position=="BottomRight")
						                {imganuncio = 'anunpix.gif" width="180" height="210">';}
						            else
						            {
						                if (position=="x01")
						                {imganuncio = 'anunpix.gif" width="960" height="50">';}    
						            }   
						        }
						}							 					 							
					}
			 }
			 document.write(baseSTG + imganuncio);
		}
		
}
function DisplayAds2 (pagina, position, width, height)
{
  var oaspage= sitepage + pagina +'/1' + RNS + '@' + position;
  if (_version < 11) {
        document.write ('<A HREF="' + oas + 'click_nx.cgi/'+ oaspage + '" TARGET="_new" BORDER="0" ><IMG SRC="' + oas + 'adstream_nx.cgi/' + oaspage + '" BORDER="0" WIDTH="' + width + '" HEIGHT="' + height + '"></a>');
    }
    else
    {
        document.write ('<'+'SCRIPT LANGUAGE="JavaScript1.1" SRC="' + oas + 'adstream_jx.cgi/' + oaspage + '">');
        document.write ('\<\!-- --\>');
        document.write ('\<\/SCRIPT\>');
        document.write ('\<\!-- --\>');
    }
}
/************************************
 * CONECTAR / DESCONECTAR           *
 ************************************/
function textosLogon(){
	if ((site != 'elnorte') && (site != 'reforma') && (site != 'mural') && (site != 'palabra'))
		siteTl = '/stageenlineagc/';
	else
		siteTl = 'http://www.' + site  + '.com/';
	var hola = siteTl + 'libre/acceso/registro/perfil.asp';;
	var ayuda = siteTl + 'libre/acceso/ayuda';;
	var conectar = siteTl + 'libre/acceso/acceso.htm';
	var desconectar = siteTl + 'libre/acceso/logout.asp';
	nivelcobro = 2;
	var grcuser = Get_Cookie('cusuarioss');
	if (grcuser == null){
		document.write('<td width=152 align=right><img src='+siteTl+'libre/online07/imggc/pix.gif height=1 width=15 border=0></td>');
		document.write('<td width=100 align=left><a href=' + conectar + ' id=ligablanca><span class=arblanco12>conectar</span></a></td>');
	}
	else {
		document.write('<td width=152 align=right><a href=' + hola +'><span class=aramarillo12><b><u>Hola, ' + grcuser.substr(0,11) + '</u></b></span></a><img src='+siteTl+'libre/online07/imggc/pix.gif height=1 width=15 border=0></td>');
		document.write('<td width=100 align=left><a href=' + desconectar + ' id=ligablanca><span class=arblanco12>desconectar</span></a></td>');
	}
}
/************************************
 * LIGA DEL BUSCADOR                *
 ************************************/
function caractEspec(strr)
{	

	myStrr = new String(strr);
	myStrr = myStrr.replace(/[á]/g,'&aacute;');
	myStrr = myStrr.replace(/[é]/g,'&eacute;');
	myStrr = myStrr.replace(/[í]/g,'&iacute;');
	myStrr = myStrr.replace(/[ó]/g,'&oacute;');
	myStrr = myStrr.replace(/[ú]/g,'&uacute;');
	myStrr = myStrr.replace(/[Á]/g,'&Aacute;');
	myStrr = myStrr.replace(/[É]/g,'&Eacute;');
	myStrr = myStrr.replace(/[Í]/g,'&Iacute;');
	myStrr = myStrr.replace(/[Ó]/g,'&Oacute;');
	myStrr = myStrr.replace(/[Ú]/g,'&Uacute;');
	myStrr = myStrr.replace(/[ñ]/g,'&ntilde;');
	myStrr = myStrr.replace(/[Ñ]/g,'&Ntilde;');
	myStrr = myStrr.replace(/[ë]/g,'&euml;');
	myStrr = myStrr.replace(/[Ë]/g,'&Euml;');
	myStrr = myStrr.replace(/[ü]/g,'&uuml;');
	myStrr = myStrr.replace(/[Ü]/g,'&Uuml;');
	myStrr = myStrr.replace(/[*]/g,'');
	myStrr = myStrr.replace(/[-]/g,'');
	myStrr = myStrr.replace(/[+]/g,'');
	myStrr = myStrr.replace(/[|]/g,'');
	myStrr = myStrr.replace(/[!]/g,'');
	myStrr = myStrr.replace(/[(]/g,'');
	myStrr = myStrr.replace(/[)]/g,'');
	myStrr = myStrr.replace(/[{]/g,'');
	myStrr = myStrr.replace(/[}]/g,'');
	myStrr = myStrr.replace(/[<]/g,'');
	myStrr = myStrr.replace(/[>]/g,'');
	myStrr = myStrr.replace(/[:]/g,'');
	myStrr = myStrr.replace(/[?]/g,'');
	myStrr = myStrr.replace(/[~]/g,'');
	myStrr = myStrr.replace(/[#]/g,'');
	myStrr = myStrr.replace(/[\\]/g,'');
	myStrr = myStrr.replace(/[\^]/g,'');
	myStrr = myStrr.replace(/[\[]/g,'');
	myStrr = myStrr.replace(/[\]]/g,'');
	
	
	return myStrr;
}

function ligaBuscador(zona){

	if (pUrl.indexOf('plazaconsulta=elnorte') != -1) 
		sitePcob = 'elnorte';
	else if (pUrl.indexOf('plazaconsulta=reforma') != -1) 
		sitePcob = 'reforma';
	else if (pUrl.indexOf('plazaconsulta=mural') != -1) 
		sitePcob = 'mural';
    else 	if (pUrl.indexOf('periodico=elnorte') != -1) 
		sitePcob = 'elnorte';
	else if (pUrl.indexOf('periodico=reforma') != -1) 
		sitePcob = 'reforma';
	else if (pUrl.indexOf('periodico=mural') != -1) 
		sitePcob = 'mural';
	else if (pUrl.indexOf('reforma') != -1) 
		sitePcob = 'reforma';
	else if (pUrl.indexOf('elnorte') != -1) 
		sitePcob = 'elnorte';
	else if (pUrl.indexOf('mural') != -1) 
		sitePcob = 'mural';
	
	else			
		sitePcob = site;
/*busqueda en la plaza o en google*/
	
		
    if (zona==1)
    {
        var buscarG = document.buscador.radioG.checked;
	document.buscador.strbusqueda.value = caractEspec(document.buscador.strbusqueda.value);
        document.buscador.q.value=document.buscador.strbusqueda.value;
	

            if (buscarG==true) //si es google
                {
                  document.buscador.method="GET";
                  document.buscador.target="_top";
                  document.buscador.action = siteMenu + "/google/default.asp";
                }
             else
             {
                document.buscador.method="POST";
                document.buscador.target="_top";
                document.buscador.action = 'http://busquedas.gruporeforma.com/'+sitePcob+'/Pages/Buscaimpresa.aspx';
             }   

    }    
    else 
        if(zona==4)
        {
		document.buscadormas.strbusqueda.value = caractEspec(document.buscadormas.strbusqueda.value);
                document.buscadormas.method="POST";
                document.buscadormas.target="_top";
                document.buscadormas.action = 'http://busquedas.gruporeforma.com/'+sitePcob+'/Pages/Buscaimpresa.aspx';
                document.buscadormas.submit();
        }   

    else 
        if (zona==3)//buscador en categoria para articulos
        {   
	        document.buscador3.strbusqueda.value = caractEspec(document.buscador3.strbusqueda.value);	
            document.buscador3.method="POST";
            document.buscador2.target="_top";
            document.buscador3.action = 'http://busquedas.gruporeforma.com/'+sitePcob+'/Pages/Buscaimpresa.aspx';
        }        
        else
            if (zona==5)//buscador en categoria WSJAméricas
            {
	        document.buscador5.strbusqueda.value = caractEspec(document.buscador5.strbusqueda.value);	
            document.buscador5.method="POST";
            document.buscador5.target="_top";
            document.buscador5.action = 'http://busquedas.gruporeforma.com/'+sitePcob+'/Pages/BuscaWSJ.aspx';                                         
            }
            else
                {
                var buscarG = document.buscador2.radioG.checked;
	            document.buscador2.strbusqueda.value = caractEspec(document.buscador2.strbusqueda.value);	
	            document.buscador2.q.value=document.buscador2.strbusqueda.value;
                       if (buscarG==true) //si es google
                            {
                                document.buscador2.method="GET";
                                document.buscador2.target="_top";
                                document.buscador2.action = siteMenu +"/google/default.asp";
                            }
                         else
                         {
                            document.buscador2.method="POST";
                            document.buscador2.target="_top";
                            document.buscador2.action = 'http://busquedas.gruporeforma.com/'+sitePcob+'/Pages/Buscaimpresa.aspx';
                         }   
                }

}   

/************************************
 * PARA USO EN EDITORIALES          *
 * EN EL ARCHIVO QUIERES.INC        *
 ************************************/
function muestra(time)
	{var str = Nombre.value;
	if(str.indexOf(" y ")>0){
	Nombre.value=str.substring(0,str.indexOf(" y "));
	}
	var valor = Nombre.value;
	var valor1 = IDSeccion.value;
	var palabra = "palabramonitor=" + valor;
	//alert(palabra);
	var secc = "&seccion=" + valor1;
	var dias = "&dias=" + time;
	var liga = '../../../alertas/articulo/formacorreo.asp?' + palabra + secc + dias;
	return liga;
	}           
/************************************
 * PARA USO EN EDITORIALES          *
 * EN EL ARCHIVO QUIERES_RECIBIR.INC *
 ************************************/
function muestra1(time)
	{var str = Nombre.value;
	var valor = NombreM.value;
	var valor1 = IDSeccion.value;
	var palabra = "palabramonitor=" + valor;
	//alert(palabra);
	var secc = "&seccion=" + valor1;
	var dias = "&dias=" + time;
	var liga = '../../../../alertas/articulo/formacorreo.asp?' + palabra + secc + dias;
	return liga;
	}
/************************************
 * FUNCION PARA RESIZE DE UNA       *
 * PAGINA Q ABRE EN POP UP          *
 ************************************/

function resizePopup(alto, ancho){
	window.resizeTo(alto,ancho);	
	if (navigator.userAgent.indexOf("Mac") >= 0)
			{
			 window.resizeTo(alto,ancho-40);
			}
	
}
/***********************************
* FUNCION PARA OBTENER LA POSICIÓN *
* PARA EL DIV DE ARTICULO CON FOTO *
* HORIZONTAL, PARA LOS ANUNCIOS    *
* DINAMICOS                        *
************************************/
	// this function returns the x, y position
	// works in IE and Mozilla.
	
var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var calunits=document.layers? "" : "px"
	
	function getElementPosition(element){
		var x=0,y=0;
		while (element!=null){
			x+=element.offsetLeft-element.scrollLeft;
			y+=element.offsetTop-element.scrollTop;
			element=element.offsetParent;
		}
		return {x:x,y:y};
	}
	// Browser compatible element getter
	function getElement(id){
		if (document.all)
		return document.all[id];
		if (document.getElementById(id))
		return document.getElementById(id);
		return null;
	}
		// generic display function
	function findElement(id){
		// Get the element by its id
		element = getElement(id);
		// make sure that the element was found
		if (! element) return;
		// get the object that will contain the x,y coordinates
		position = getElementPosition(element);
		// display the coordinates
		var ycoords = position.y + 40;
		crossobj=(dom)?document.getElementById("layer2").style : ie? document.all.layer2 : document.layer2;
		crossobj.top=ycoords;
		}
		
/************************************
 * PARA USO EN EDITORIALES          *
 * SE USA EN HISTORICOS				*
 ************************************/
 
function cambiaTab(celda){
	document.getElementById('divcelda1').style.display = "none";
	document.getElementById('celda1').style.cursor = "hand";
	document.getElementById('divcelda2').style.display = "none";
	document.getElementById('celda2').style.cursor = "hand";
	var nombreDiv = 'div' + celda;
	document.getElementById(nombreDiv).style.display = "block";
	document.getElementById(celda).style.cursor = "arrow";
	celdaSel = celda
	
}

/************************************
 * PARA USO EN EDITORIALES          *
 * SE USA EN HISTORICOS				*
 ************************************/

/*function mOut(celda){
	if (celdaSel !=celda)
	document.getElementById(celda).bgColor = "#ffffff";
}*/

/************************************
 * PARA USO EN EDITORIALES          *
 * SE USA EN HISTORICOS				*
 ************************************/

function ShowHideLayer(id,pos){
	if (document.getElementById(id).style.display == "none")
		{
		document.getElementById(id).style.display = "block";
		}
	else {
		document.getElementById(id).style.display = "none"; 
		}
} 
		

/*Función para Detectar plaza*/
function datosplaza()
{
	baseAddress = document.domain;
	baseAddress = baseAddress.toLowerCase( );

    var stagenorte1= baseAddress.search('intranetsgc');
	var stagenorte= baseAddress.search('intraneteditoragc');
	var stagereforma= baseAddress.search('intranetrefrormagc');
	var stagemural= baseAddress.search('intranetmuralgc');
	var stagepalabra = baseAddress.search('intranetpalabragc');
	var publico= baseAddress.search('.com');
					
	if (stagenorte > -1 || stagenorte1 > -1) {folderplaza= "elnorte";}
	if (stagereforma > -1) {folderplaza= "reforma";}			
	if (stagemural > -1)   {folderplaza= "mural";}
	if (stagepalabra > -1) {folderplaza= "palabra";}
	if (publico > -1) 
		{
			var entrada= baseAddress ;									
			var r = entrada.search("elnorte.com");
			var s = entrada.search("reforma.com");
			var t = entrada.search("mural.com");
			var p= entrada.search("palabra.com");
		}
									
	if (r > -1)	{folderplaza= "elnorte";}
	if (s > -1)	{folderplaza= "reforma";}			
	if (t > -1) {folderplaza= "mural";}
	if (p > -1) {folderplaza= "palabra";}
	
	
}

function DateAdd (fecha,dias) {
  var buffer = Date.parse(fecha);
	dias *= 24; //dias
	dias *= 60; //minutos
	dias *= 60; //segundos
	dias *= 1000; //milisegundos
	fecha = new Date(buffer+dias);
 	buffer = null;
  return fecha;
}
function fechaArreglada (fecha,periocidad)
{
	var fechaAux = new Date();
	var weekdayAux = fecha.getDay();
	var diasAtras = 0;
	fechaEncontrada = false;
	do
	{
	  if (parseInt(Math.pow(2,weekdayAux)&periocidad) > 0)
		{
			fechaEncontrada = true;
		}
		else
		{
		  diasAtras++;
			weekdayAux-=1;
			weekdayAux%=7;
			if(weekdayAux<0)weekdayAux+=7;
		}
	}
	while(!fechaEncontrada);
	fechaAux=DateAdd(fecha,-diasAtras);
	return fechaAux;
}
function ligaEII(seccion,periodicidad){
//Periodicidad 1-domingo, 2-lunes, 4-martes, 8-miercoles, 16-jueves, 32-viernes, 64-sabado, 127-diario
    fechaLiga = new Date();
    fechaAux=fechaArreglada(fechaLiga,periodicidad)
    DirAux=new String(fechaAux.getFullYear())
    Dir=DirAux//.slice(2)
    DirAux=new String(fechaAux.getMonth()+1)
    if(DirAux.length==1)DirAux='0'+DirAux
    Dir=Dir+DirAux
    DirAux=new String(fechaAux.getDate())
    if(DirAux.length==1)DirAux='0'+DirAux
 	LeftPosition = (screen.width) ? (screen.width-640)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-440)/2 : 0;
    var ligaTopMag = 'http://www.' + site + '.com/libre/online07/edicionimpresa/default.shtm?seccion='+seccion+'&fecha='+Dir+DirAux;
    document.location.href=ligaTopMag;
	//window.open(ligaTopMag,'paginaMag','top=' + TopPosition + ',left=' + LeftPosition + ',width=800,height=400,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');
}


/**************
* Hacer submit a forma de mi cajon
***************/
function DatosMicajon()
{
    usuarioidcajon = document.micajon.usuarioidcajon.value;
    titulocajon = document.micajon.titulocajon.value;
    ligacajon = document.micajon.ligacajon.value;
    seccioncajon = document.micajon.seccioncajon.value;
    tipocajon = document.micajon.tipocajon.value;
    fechacajon = document.micajon.fechacajon.value;
    archivoidcajon = document.micajon.archivoidcajon.value;
    basepathmicajon = document.micajon.basepathmicajon.value;
    titulocajon=titulocajon.replace(/'/g,"")
    titulocajon=caractEspec(titulocajon);
    titulocajon=escape(titulocajon);
    
    herramienta(basepathmicajon+"micajon/micajon.aspx?usuarioid="+usuarioidcajon+"&titulo="+titulocajon+"&liga="+ligacajon+"&seccion="+seccioncajon+"&tipo="+tipocajon+"&fecha="+fechacajon+"&archivoid="+archivoidcajon);
    
    return false;
}
/*********************
*Funcion Trim para JavaScript
**********************/
function iswhite(achar)    //// determines if a character is white space 
{ 
   return( ( achar != "" ) && (achar.search(/\s/) !=-1));//isvalidchar( achar, " \t\r\n" ) ); 
} 


function rtrim(str)    //// trims the white space off the tail of a string 
{ 
   while ( iswhite( str.charAt(str.length-1) ) ) 
   { 
      str = str.substring(0,str.length-1); 
   } 

   return(str); 
} 


function ltrim(str)    //// trims the white space off the head of a string 
{ 
   while ( iswhite( str.charAt(0) ) ) 
   { 
      str = str.substring(1,str.length); 
   } 
   return(str); 
} 


function trim(str)    //// trims the white space off both ends of a string 
{ 
   str = ltrim(str); 
   str = rtrim(str); 
   return(str); 
} 
/**fin de funcion trim ***/

/* Ajustar el HEIGHT de un iframe (abril 2007:actualmente usado en coberturas, suplementos y articulos)*/
function calcHeight(IdFrame) 
{                            
        
    if (!window.opera && !document.mimeType && document.all && document.getElementById)                      
    {
        var the_height= document.getElementById(IdFrame).contentWindow.document.body.offsetHeight;                      
        document.getElementById(IdFrame).height= the_height;
    }
    else if(document.getElementById)
    {           
        if ( document.getElementById(IdFrame).contentDocument )// firefox /netscape                            
            document.getElementById(IdFrame).height= document.getElementById(IdFrame).contentDocument.height ;                                                                                                                                
        else // IE
        {             
            document.getElementById(IdFrame).style.height= document.getElementById(IdFrame).contentWindow.document.body.scrollHeight + "px";
         }
    }                                            
 }    
function resizeIframe(IdFrame){
  var ifr = document.getElementById(IdFrame);
  var ifrBody = ifr.contentWindow.document[getDocBody(ifr.contentWindow)];
  ifr.style.height=ifrBody.scrollHeight+"px";
}

function getDocBody(win){
  if (!win) win=window;
  if (win.document.compatMode && win.document.compatMode != 'BackCompat') { //standards compliant mode 
    return "documentElement";
  }
  return "body";
}
 
/*Fin de funcion para ajuste de alto de iframe*/

/****
*Funcio para mostrar el flash en el píe de los articulos
****/
function runFlashprev(movie,width,height,xml, basepath)
 {    		
 
    //alert(xml)
    
         if (basepath != '')
            {
                if (pUrl.indexOf('gruporeforma') != -1)
                {
                    multipromo= basepath+'libre/online07/flashmultipromos/multipromo_' + movie + '.swf?FileIni='+basepath+'libre/online07/flashmultipromos/'+site+'/config_' + movie + '.xml&FileInfo='+xml+'datos.xml';}    
                else
                    {multipromo= basepath+'libre/online07/flashmultipromos/multipromo_' + movie + '.swf?FileIni='+basepath+'libre/online07/flashmultipromos/config_' + movie + '.xml&FileInfo='+xml+'datos.xml';}
            } 
         else
            {multipromo= 'libre/online07/flashmultipromos/multipromo_' + movie + '.swf?FileIni=libre/online07/flashmultipromos/config_' + movie + '.xml&FileInfo='+xml+'datos.xml';}
         
         document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ width + '" height="'+ height + '" id="multipromo" align="middle" VIEWASTEXT>');
         document.writeln('<param name="allowScriptAccess" value="always" />');
         document.writeln('<param name="movie" value="'+ multipromo+'" />');
         document.writeln('<param name="quality" value="high" />');
         document.writeln('<param name="bgcolor" value="#ffffff" />');
         document.writeln('<embed src="'+ multipromo+'" quality="high" bgcolor="#ffffff" width="'+ width + '" height="'+ height + '" name="multipromo" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"/>');
         document.writeln('</object>');
 }
 
 /****
*Funciín para escribir el flash de libre acceso
****/
function runFlashLibre()
 {
    document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="355" height="20" id="libreflash" align="middle" VIEWASTEXT>');
    document.writeln('<param name="allowScriptAccess" value="always" />');
    document.writeln('<param name="movie" value="libre/online07/players/libreacceso_1.swf" />');
    document.writeln('<param name="quality" value="high" />');
    document.writeln('<param name="bgcolor" value="#ffffff" />');
    document.writeln('<embed src="libre/online07/players/libreacceso_1.swf" quality="high" bgcolor="#ffffff" width="355" height="20" name="libre" align="middle" allowscriptaccess="libreflash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"/>');
    document.writeln('</object>');
 }
 
 // Funcion para escribir flashes en las portadas sin el cuadro gris de activación
function escribeflashIncLibre(origen, alto, ancho, id)
{
ide = id+'o';
ido = id+'e';

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ ancho +'" height="'+ alto +'" id="'+ ido +'" align="middle">');
document.write('<param name="allowScriptAccess" value="always" />');
document.write('<param name="movie" value="' + origen + '" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="play" value="true" />');
document.write('<param name="bgcolor" value="" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<embed name="'+ ide +'" width="'+ ancho + '" height="'+ alto +'" src="' + origen + '" wmode="transparent" quality="high" bgcolor="#FFFFFF" play="true" align="middle" allowScriptAccess="libreflash" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');

}
 
 /************************************
 * VALIDA CLICK DERECHO			    *
 ************************************/

function right(e) {


if ((site == 'elnorte') || (site == 'palabra'))
	msg = "Derechos Reservados ©\nEditora el Sol, S.A. de C.V.";
else
	msg = "Derechos Reservados ©\nC.I.C.S.A";

if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
else return true;
}

function trap() 
  {
  if(document.images)
    {
    for(i=0;i<document.images.length;i++)
      {
      document.images[i].onmousedown = right;
      document.images[i].onmouseup = right;
      
      }
    }
  }

 /************************************
 * REEMPLAZA VARIABLE EN LOS OBJECT DE FLASH		    *
 ************************************/
 
 function reemplazaorigen(pathobject)
 {
    if (dominio.indexOf('.com') < 0) 
        {
            siteactual = dominio + '/stageenlineagc';
            if(pathobject.indexOf('www.elnorte.com') >= 0)
              {
                return pathobject.replace(/www.elnorte.com/g,siteactual);
              }  
            if(pathobject.indexOf('www.reforma.com') >= 0)
             {
              return pathobject.replace(/www.reforma.com/g,siteactual);
             }
          if(pathobject.indexOf('www.mural.com') >= 0)
          {
            return pathobject.replace(/www.mural.com/g,siteactual);
          }
          if(pathobject.indexOf('www.palabra.com') >= 0)
          {
            return pathobject.replace(/www.palabra.com/g,siteactual);
          }
        }
   else 
        {
          return pathobject;
        }
 
 }

/***************************************
* CONTEO EN INFOSTATS DE UN MULTIMEDIA *
****************************************/
function padZero (num, length) {
 num = String(num);
 length = parseInt(length) || 2;
 while (num.length < length)
  num = "0" + num;
 return num;
};
function FnInfostats(ElementoId, CategoriaId, SubCategoriaId, Titulo, Liga) {
 //se manda a llamar desde el FLASH del player de videogalerias
 var auxDate = new Date();
 var strDate = auxDate.getFullYear() + "-" + padZero(auxDate.getMonth()+1,2) + "-" + padZero(auxDate.getDate(),2) + " " + padZero(auxDate.getHours(),2) + ":" + padZero(auxDate.getMinutes(),2) + ":" + padZero(auxDate.getSeconds(),2);
 var urlHITIS = "http://estadisticas.gruporeforma.com/hit20.tif" +
          "?grcuser=" + grcuser +
          "&grcsesion=" + grcsesion +
          "&grcidcom=" + grcidcom +
          "&grcfrom=" + grcfrom +
          "&grcfecha=" + escape(strDate) +
          "&grcidfte=" + grcidfte +
          "&grcidgrupo=" + grcidgrupo +
          "&grcidelem=" + ElementoId +
          "&grcidcat=" + CategoriaId +
          "&grcidsubc=" + SubCategoriaId +
          "&grcidtcon=" + grcidtcon +
          "&grcliga=" + Liga +
          "&grctit=" + caractEspec(Titulo) +
          "&grcautornota=" + escape("null") +
          "&grcidplaza=" + grcidplaza +
          "&grcidtema=" + grcidtema +
          "&grcjver=" + escape(grcjver);
 var imgHITIS = document.getElementById("HIT")?document.getElementById("HIT"):new Image();
 imgHITIS.src = urlHITIS;
};