    //Obtiene el valor de la cookie
	function getCookie ( name ) {
		var acookie = document.cookie; 
		var fname = name + "=";
		var clen = acookie.length;
		var cbegin = 0;
		var bbegin = 0;
			while (bbegin < clen) {
				bbegin = bbegin + fname.length;
				if (acookie.substring(cbegin, bbegin) == fname) { 
					var bend = acookie.indexOf (";", bbegin);
					if (bend == -1) bend = clen;
					return unescape(acookie.substring(bbegin, bend));
				}
				bbegin = acookie.indexOf(" ", bbegin) + 1;
				cbegin = bbegin;
				if (bbegin == 0) break;
			}
		return null;
	}

	var Addr = "" + window.location + "";
	var ENVAR = Addr.split('?');
	var Temp2;
	var Temp3;
	var estatus = "";
	var dom = new String();
	
	var expira = new String();
	expira = "";
	error = "";
	
	if ( ENVAR.length > 1 ) {
		Temp2 = ENVAR[1].split('&');
		for ( i = 0; i < Temp2.length; i++ ) {
			Temp3 = Temp2[i].split('=');
			if ( Temp3[0].toUpperCase() == "EXPIRA" ) {
				expira = Temp3[1];
			}
			if ( Temp3[0].toUpperCase() == "CUENTA" ) {
				cuenta = Temp3[1];
			}
		}
	}
	if ( ENVAR.length > 1 ) {
        if ( ENVAR[1].substring( 0, 6 ).toUpperCase() == "ERROR=" ) {
	        error = ENVAR[1].substring( ENVAR[1].indexOf( "=", 0 ) + 1, ENVAR[1].length );
        }
    }

			
	var urlRedirect = getCookie( "urlredirect" );
	if ( urlRedirect == "" ) 
		urlRedirect = "http://" + dom.substring( 0, dom.indexOf( "/", 0 ) );
	
	dom = ENVAR[0].substring( 7, ENVAR[0].length );
	var dominio = new String();
	var namedom = new String();
	
	dominio = dom.substring( 0, dom.indexOf( "/", 0 ) );
	dot = dominio.split('.');
	if ( dot.length > 1 )
		namedom = dot[ dot.length - 2 ];
	else
		namedom = dot[0];
	
	var urlRedirect = "";
	urlRedirect = getCookie( "urlredirect" );
	if ( urlRedirect == null )
		urlRedirect = "http://" + location.hostname;
	// Busca plazaconsulta en urlredirect (Para el caso de suplementos, plazaconsulta contiene el dominio de donde se hace la consulta)
	var plazaconsulta = plazaconsulta = "";
	var tmp_plazaconsulta = "";
	var index = urlRedirect.indexOf( "plazaconsulta", 0 );
	if( index > 0 ) {
		var tmp_url = urlRedirect.substring( index, urlRedirect.length );
		index = tmp_url.indexOf( "&", 0 );
		if( index > 0 ) {
			tmp_plazaconsulta = tmp_url.substring( 0, index );
		} else
			tmp_plazaconsulta = tmp_url;
		index = tmp_plazaconsulta.indexOf( "=", 0 );
		if( index > 0 ) {
			plazaconsulta = tmp_plazaconsulta.substring( index + 1, tmp_plazaconsulta.length );
		}
	}
	if( plazaconsulta != "" ) namedom = plazaconsulta;

    // ------------ Para el caso de busquedas, se envia en el url el dominio ------ //
	// -- http://busquedas.gruporeforma.com/DOMINIO/XXX  Pe. http://busquedas.gruporeforma.com/elnorte/XXX--//
	// -- http://busquedas.gruporeforma.com/suburbanasDOM/XXX PE. http://busquedas.gruporeforma.com/suburbanasNte/XXX  --//
	if( namedom.toLowerCase() != "elnorte" && namedom.toLowerCase() != "reforma" && namedom.toLowerCase() != "mural" && namedom.toLowerCase() != "palabra" ) {
	    // busca los strings en el url
	    var url_ = urlRedirect.toLowerCase();
	    if( url_.indexOf("/elnorte/",0) > 0 ) namedom = "elnorte";
	    if( url_.indexOf("/reforma/",0) > 0 ) namedom = "reforma";
	    if( url_.indexOf("/mural/",0) > 0 ) namedom = "mural";
	    if( url_.indexOf("/palabra/",0) > 0 ) namedom = "palabra";
	    
	    if( url_.indexOf("/suburbanasnte/",0) > 0 ) namedom = "elnorte";
	    if( url_.indexOf("/suburbanasref/",0) > 0 ) namedom = "reforma";
	    if( url_.indexOf("/suburbanasmur/",0) > 0 ) namedom = "mural";
	    if( url_.indexOf("/suburbanaspal/",0) > 0 ) namedom = "palabra";
	}
    ssnamedom = "";
	switch ( namedom.toLowerCase() ) {
		case "elnorte": namedom = "norte"; bgColor = "#3399cc"; break;
		case "reforma": namedom = "reforma"; bgColor = "#669933"; break;
		case "mural": namedom = "mural"; bgColor = "#990000"; break;
		case "palabra": namedom = "palabra"; bgColor = "#ccccae"; break;
		default:
			if ( urlRedirect != null ) Addr = urlRedirect;
			else urlRedirect = "";
			if ( Addr.indexOf( "siteelnorte", 0 ) > 0 ) {
				namedom = "norte"; bgColor = "#3399cc";
			}
			else {
				if ( Addr.indexOf ( "sitereforma", 0 ) > 0 ) {
					namedom = "reforma"; bgColor = "#669933";
				}
				else {
					if ( Addr.indexOf ( "sitemural", 0 ) > 0 ) {
						namedom = "mural"; bgColor = "#990000";
					}
					else {
						if ( Addr.indexOf ( "sitepalabra", 0 ) > 0 ) {
							namedom = "palabra"; bgColor = "#ccccae";
						}
						else {
							namedom = "norte"; bgColor = "#3399cc";
						}
					}
				}
			}
			dominio = "busquedas.gruporeforma.com";
			ssnamedom = "gruporeforma.com";
			break;
	}
	if ( ENVAR.length > 1 ) {
		Temp2 = ENVAR[1].split('&');
		for ( i = 0; i < Temp2.length; i++ ) {
			Temp3 = Temp2[i].split('=');
			if ( Temp3[0].toUpperCase() == "CUENTA" ) {
				cuenta = Temp3[1];
			}
		}
	}
	var todo = new String();
	todo = "";
	if ( ENVAR.length > 1 ) {
		if ( ENVAR[1].substring( 0, 5 ).toUpperCase() == "TODO=" ) {
			todo = ENVAR[1].substring( 5, ENVAR[1].length );	
		}
	}
	msg = "";
	if ( todo.toUpperCase() == "FALSE" ) {
		msg = "La opción de ingreso automático desde esta computadora ha sido cancelada.";
	} else {
		msg = "La opción de ingreso automático ha sido cancelada en todas las computadoras.";
	}

	document.write('<link href="../stylesheet_' + namedom + '.css" rel="styleSheet" type="text/css">');
	document.write('<link href="../styleinterior_' + namedom + '.css" rel="styleSheet" type="text/css">');

	var m_names = new Array("Ene", "Feb", "Mar", 
	"Abr", "May", "Jun", "Jul", "Ago", "Sep", 
	"Oct", "Nov", "Dec");

	var d = new Date();
	var curr_date = d.getDate();
	var curr_month = d.getMonth();
	var curr_year = d.getFullYear();
	
	curr_date = curr_date + "";
	if( curr_date.length < 2 ) curr_date = "0" + curr_date;
	curr_year = curr_year + "";
	fstring = curr_date + "-" + m_names[curr_month] + "-" + curr_year.substr(2,2);


// JScript source code
document.write('            <table width="960" cellspacing="0" cellpadding="0" border="0">');
document.write('                <tr><td style="height: 25px; background-color: #cccccc;">');
document.write('	                <table width="960" style="height: 25px" cellspacing="0" cellpadding="0" border="0">');
document.write('	                <form NAME="buscador" onSubmit="javascript:ligaBuscador(1);" ID="Form1">');
document.write('	                <tr>');
document.write('		                <td width="80" align="left">&nbsp;&nbsp;<span class="argris13"><b>');
document.write(fstring)
document.write('							</b><br /></td>');
document.write('		                <td width="1" bgcolor="ffffff"><img src="../img/pix.gif" width="1" height="1"></td>');
document.write('		                <td width="535" align="center"></td>');
document.write('		                <td width="1" bgcolor="ffffff"><img src="../img/pix.gif" width="1" height="1"></td>');
document.write('		                <td width="343" align="center"><span class="arheader11"><b>BUSCAR:&nbsp;<input type="radio" name="radio1" id="radioP"  value="1" style="height:20px;" checked><img src="../img/pix.gif" width=1 height=22 align=absmiddle><span class="arherr13"><b>');
            			                        sdominio = namedom + ".com";
            			                        if ( namedom == "norte" ) sdominio = "el" + sdominio;
            			                        document.write(sdominio)
document.write('		                </b> <input type="radio" name="radio1" id="radioG" value="2" style="height:20px;"><img src="../img/google.gif" width="57" height="22" align=absmiddle></b></span>');
document.write('		                <input type="text" name="strbusqueda" id="Text2" style="width:80px;height:18px;border-width:2px;font-family: arial;font-size: 11px;">');
document.write('		                <INPUT TYPE="image" src="../img/flecha_ir.gif" value="About submit buttons" ALT="buscar" NAME="Submit now" width=18 height=22 align=absmiddle></td>');
document.write('		                <input type="hidden" id="q" name="q" value="" /> ');
document.write('                        <input type="hidden" id="hl" name="hl" value="es" />'); 
document.write('	                </tr>');
document.write('	                </form>');
document.write('	                </table>');
document.write('                </td></tr>');
document.write('                <tr><td style="height: 70px;" align="center">');
var liga_dominio = namedom;
if( liga_dominio == "norte" ) liga_dominio = "elnorte";
liga_dominio = "http://www." + liga_dominio + ".com";
                                document.write('<a href="' + liga_dominio + '"><img border=0 src="../img/headeracceso_' + namedom + '.gif" width="400" height="35"></a>');
document.write('                </td></tr>');
document.write('                <tr>');
                                    document.write('<td height="3" background="../img/fondo_leer_'+namedom+'.gif"></td>');
document.write('                ');
document.write('                </tr>');
document.write('                <tr><td height=15><img src="../img/pix.gif" width=1 height=15></td></tr>');
document.write('            </table>');
