function headerGris()
{
document.write ('<style type="text/css" media="screen">')
document.write ('<!--')
document.write ('a{text-decoration: none;color:#333333;}a:visited{text-decoration: none;color:#333333;}a:active{text-decoration: none;color:#333333;}a:link{text-decoration: none;color:#333333;}')
document.write ('.arincheader13 	{color: #666666;font-family: arial;font-size: 13px;font-weight: normal}')
document.write ('.arincrojo11	  	{color: #990000;font-family: arial;font-size: 11px;font-weight: normal}')
document.write ('.arincheader11	  	{color: #666666;font-family: arial;font-size: 11px;font-weight: normal}')

document.write ('.arherrReforma 	  	{color: #519145;font-family: arial;font-size: 13px;font-weight: normal}')
document.write ('.arherrElnorte	  	{color: #3399cc;font-family: arial;font-size: 13px;font-weight: normal}')
document.write ('.arherrMural 	  	{color: #9C0B0B;font-family: arial;font-size: 13px;font-weight: normal}')
document.write ('.arherrPalabra 	  	{color: #9C0B0B;font-family: arial;font-size: 13px;font-weight: normal}')
document.write ('--></style>')

	var claseColorPlaza
	
	switch (plaza) {
	    case 'elnorte':
			claseColorPlaza="arherrElnorte"
			strAspVehiculos = "portada_vehiculos.asp"
			strPlazaAvisos = "mty"
	       break
	    case 'mural':
			claseColorPlaza="arherrMural"
			strAspVehiculos = "ba_model3.asp"
			strPlazaAvisos = "gdl"
	       break
	    case 'palabra':
			claseColorPlaza="arherrPalabra"
			strAspVehiculos = "ba_model3.asp"
			break
	    default:
			claseColorPlaza="arherrReforma"
			strAspVehiculos = "portada_vehiculos.asp"
			strPlazaAvisos = "mex"
		  break
	} 		
	
	var grcuser = Get_Cookie("cusuarioss");
	document.write ('<table width="960" height="25" border="0" cellspacing="0" cellpadding="0">')
	document.write('<form NAME="buscadorHeader" Action="" >')
	document.write ('<tr>')
		document.write ('<td width="115" align="center">')
		if (grcuser == null) 
		{
			document.write ('&#160;&#160;<a href="/libre/acceso/acceso.htm" id="ligaherr"><span class="arincheader13">conectar</span></a>')
			document.write ('&#160;&#160;<img src="/libre/offlines/imggc07/conec.gif" width="23" height="22" align="absmiddle" border="0"/>')
		}
		else
		{
			document.write ('&#160;&#160;<a href="/libre/acceso/logout.asp" id="ligaherr"><span class="arincheader13">desconectar</span></a>')
			document.write ('&#160;&#160;<img src="/libre/offlines/imggc07/desc.gif" width="23" height="22" align="absmiddle" border="0"/>')		
		}
		document.write ('</td>')
		document.write ('<td width="1" bgcolor="#FFFFFF">')
			document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="1"/>')
		document.write ('</td>')
		document.write ('<td width="500" align="center">')
			document.write ('<a href="http://www.avisosdeocasion.com/'+strPlazaAvisos+'/"><span class="arincrojo11"><b>AVISOS DE OCASI&#211;N:</b></span></a><img src="/libre/offlines/imggc07/flecha_avisos.gif" width="18" height="25" align="absmiddle" border="0"/>')
			document.write ('<a href="http://www.avisosdeocasion.com/'+strPlazaAvisos+'/portada_bienes.asp"><span class="arincrojo11"><b>BIENES RA&#205;CES</b></span></a><img src="/libre/offlines/imggc07/flecha_avisos.gif" width="18" height="25" align="absmiddle" border="0"/>')
			document.write ('<a href="http://www.avisosdeocasion.com/'+strPlazaAvisos+'/portada_vehiculos.asp"><span class="arincrojo11"><b>VEH&#205;CULOS</b></span></a><img src="/libre/offlines/imggc07/flecha_avisos.gif" width="18" height="25" align="absmiddle" border="0"/>')
			document.write ('<a href="http://www.avisosdeocasion.com/'+strPlazaAvisos+'/empleos.asp"><span class="arincrojo11"><b>EMPLEOS</b></span></a><img src="/libre/offlines/imggc07/flecha_avisos.gif" width="18" height="25" align="absmiddle" border="0"/>')
			document.write ('<a href="https://secure.gruporeforma.com/' + plaza + '/avisos/ordenar/"><span class="arincrojo11"><b>ORDENA TU ANUNCIO</b></span></a></td>')
		document.write ('<td width="1" bgcolor="#FFFFFF">')
			document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="1"/>')
		document.write ('</td>')
		document.write ('<td width="343" align="center">')
			document.write ('<span class="arincheader11" ><b>BUSCAR:&#160;</b></span>')
			document.write ('<input type="radio" name="radio" value="1" checked="true"/>')
			document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="22" align="absmiddle" border="0"/>')
			document.write ('<span class="'+claseColorPlaza+'"><b>'+plaza+'.com</b></span>')
			
			document.write ('<input type="radio" name="radio" value="2"/>')
			document.write ('<img src="/libre/offlines/imggc07/google.gif" width="57" height="22" align="absmiddle" border="0"/>')
			document.write ('<input type="text" name="txtbusqueda" style="width:80px;height:18px;border-width:2px;font-family: arial;font-size: 11px;"  onKeyPress="return enviaBusquedaEnter(event,1)"/>')
			document.write ('<a href="javascript:enviaBusqueda(1);"><img src="/libre/offlines/imggc07/ir_' + plaza + '.gif" width="18" height="22" align="absmiddle" border="0"/></a>')
			document.write ('<input type="hidden" name="strbusqueda">')
			document.write ('<input type="hidden" name="q">')
			document.write ('<input type="hidden" name="hl" value="es">')			
		document.write ('</td>')
	document.write ('</tr>')
	document.write('</form>')	
	document.write ('</table>')
	
}



function footerGris()
{
	var claseColorPlaza
	
	switch (plaza) {
	    case 'elnorte':
			claseColorPlaza="arherrElnorte"
	       break
	    case 'mural':
			claseColorPlaza="arherrMural"
	       break
	    case 'palabra':
			claseColorPlaza="arherrPalabra"
			break
	    default:
			claseColorPlaza="arherrReforma"
		  break
	} 
		document.write ('<table width="960" border="0" cellspacing="0" cellpadding="0">')
			document.write ('<form NAME="buscadorFooter" Action="" >')
			document.write ('<tr>')
				document.write ('<td colspan="2" bgcolor="#999999">')
					document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="1" border="0"/>')
				document.write ('</td>')
			document.write ('</tr>')
			document.write ('<tr>')
				document.write ('<td height="30" align="left" bgcolor="#CCCCCC">')
					document.write ('<span class="arincheader13"><b>&#160;&#160;BUSCAR:&#160;</b></span>')
					document.write ('<input type="radio" name="radio" value="1"  checked="true"/>')
					document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="22" align="absmiddle" border="0"/>')
					document.write ('<span class="'+claseColorPlaza+'"><b>'+plaza+'.com</b></span>')
					document.write ('<input type="radio" name="radio" value="2"/>')
					document.write ('<img src="/libre/offlines/imggc07/google.gif" width="57" height="22" align="absmiddle" border="0"/>')
					document.write ('<input type="text" name="txtbusqueda" style="width:130px;height:18px;border-width:2px;font-family: arial;font-size: 11px;" onKeyPress="return enviaBusquedaEnter(event,2)"/>')
					document.write ('<a href="javascript:enviaBusqueda(2);"><img src="/libre/offlines/imggc07/ir_' + plaza + '.gif" width="18" height="22" align="absmiddle" border="0"/></a>')
					document.write ('<input type="hidden" name="strbusqueda">')
					document.write ('<input type="hidden" name="q">')
					document.write ('<input type="hidden" name="hl" value="es">')	

				document.write ('</td>')
				document.write ('<td height="30" align="right" bgcolor="#CCCCCC">')
					document.write ('<a href="#"><img src="/libre/offlines/imggc07/flecha_inicio.gif" width="13" height="13" align="absmiddle" border="0"/>')
					document.write ('<span class="argris13"><b>&#160;inicio&#160;&#160;</b></span></a>')
				document.write ('</td>')
			document.write ('</tr>')
			document.write ('<tr>')
				document.write ('<td colspan="2" bgcolor="#999999">')
					document.write ('<img src="/libre/online/imggc/pix.gif" width="1" height="1" border="0"/>')
				document.write ('</td>')
			document.write ('</tr>')
		document.write ('</form>')
		document.write ('</table>')
}


function enviaBusqueda(idform)
{ 
	if (idform==1)
	{
		idform="buscadorHeader"
	}
	if (idform==2)
	{
		idform="buscadorFooter"
	}	
	if(eval('document.'+idform+'.radio[0].checked'))
	{
		eval('document.'+idform+'.action="http://busquedas.gruporeforma.com/'+plaza+'/Pages/Buscaimpresa.aspx"')
		eval('document.'+idform+'.method="post"')
		eval('document.'+idform+'.target=""')
		eval('document.'+idform+'.strbusqueda.value=document.'+idform+'.txtbusqueda.value')
		eval('document.'+idform+'.submit()')
	}
	else
	{
		eval('document.'+idform+'.action="http://www.google.com/search"')
		eval('document.'+idform+'.method="get"')
		eval('document.'+idform+'.target="_blank"')
		eval('document.'+idform+'.q.value=document.'+idform+'.txtbusqueda.value')
		eval('document.'+idform+'.submit()')
	}
}

function enviaBusquedaEnter(e,idform)
{
	if (idform==1)
	{
		idform="buscadorHeader"
	}
	if (idform==2)
	{
		idform="buscadorFooter"
	}	
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;
	if (keycode == 13)
	{
		if(eval('document.'+idform+'.radio[0].checked'))
		{
			eval('document.'+idform+'.action="http://busquedas.gruporeforma.com/'+plaza+'/Pages/Buscaimpresa.aspx"')
			eval('document.'+idform+'.method="post"')
			eval('document.'+idform+'.target=""')
			eval('document.'+idform+'.strbusqueda.value=document.'+idform+'.txtbusqueda.value')
			eval('document.'+idform+'.submit()')
		}
		else
		{
			eval('document.'+idform+'.action="http://www.google.com/search"')
			eval('document.'+idform+'.method="get"')
			eval('document.'+idform+'.target="_blank"')
			eval('document.'+idform+'.q.value=document.'+idform+'.txtbusqueda.value')
			eval('document.'+idform+'.submit()')
		}
		return false;
	}
	else
	{
		return true;
	}
}

function fechaHeader()
{
	var arraymes= new Array("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic");
	var d= new Date()
	var aniofecha=String(d.getFullYear())	
	fecha = d.getDate() + "-" + arraymes[d.getMonth()] + '-' + aniofecha.substr(2,4)
	document.write(fecha)
}

function headerPlaza(tipoHeader)
{
var imgheader1, imgheader2

	switch (plaza) {
	    case 'elnorte':
	      imgheader1='logo_seccNorte.gif'
		  imgheader2='logo_seccNorte2.gif'
	       break
	    case 'mural':
	      imgheader1='logo_seccMural.gif'
		  imgheader2='logo_seccMural2.gif'
	       break
	    case 'palabra':
	      imgheader1='logo_seccPalabra.gif'
		  imgheader2='logo_seccPalabra2.gif'
	       break
	    default:
	      imgheader1='logo_seccReforma.gif'
		  imgheader2='logo_seccReforma2.gif'
		  break
	} 	
var grcuser = Get_Cookie("cusuarioss");
	if (tipoHeader==1)
	{
			document.write('<td width="290" align="right">')
				document.write('<a href="http://www.'+plaza+'.com"><img src="/libre/offlines/imggc07/'+imgheader1+'" width="190" height="30"  border="0"/></a><br/>')
				if (grcuser != null)
				{	
				document.write('<span class="arincheader13"><b>Hola, <a href="/libre/acceso/registro/perfil.asp"><u>'+grcuser.substr(0,11)+' </u></b></a></span><span class="arincheader13"><b>&#160;|</b></span>')
				document.write('<img src="/libre/offlines/imggc07/mi_carpeta.gif" width="30" height="22" align="absmiddle" border="0"/>')
				document.write('<a href="/micajon/" id="ligaherr"><span class="arincheader13">mi caj&#243;n</span></a><br/>')
				}
				document.write('<img src="/libre/offlines/imggc07/pix.gif" width="1" height="5"/>')
			document.write('</td>')
	}
	
	if (tipoHeader==2)
	{
			document.write('<td width=270>')
				document.write('<span class="arincheader13"><b>')
				fechaHeader()
				document.write('</b><br>')
				document.write('<a href="http://www.'+plaza+'.com"><img src="/libre/offlines/imggc07/'+imgheader2+'" width="190" height="30" border="0"></a><br/>')
				if (grcuser != null)
				{
				document.write('<span class="arincheader13"><b>Hola, <a href="/libre/acceso/registro/perfil.asp"><u>'+grcuser.substr(0,11)+' </u></b></a></span><span class="arincheader13"><b>&nbsp;|</b>')
				document.write('<img src="/libre/offlines/imggc07/mi_carpeta.gif" width=30 height=22 align=absmiddle>')
				document.write('<a href="/micajon/" id=ligaherr><span class="arincheader13">mi cajon</span></a>')
				}
			document.write('</td>')
	}
}

function header(fnt)
{
	switch(fnt)
	{
		case 1:
			strfnt='arblanco12'
			break;
		default:
			strfnt='argris12'
			break;
	}
	var arraymes= new Array("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic");
	var d= new Date()
	fecha = d.getDate() + "-" + arraymes[d.getMonth()] + '-' + d.getYear()
	var grcuser = Get_Cookie("cusuarioss");


	switch (plaza)
	{
		case 'elnorte':
			var colorHeader = '#3399CC';
			break;
		case 'mural':
			var colorHeader = '#BF1818';
			break;
		case 'palabra':
			var colorHeader = '#BF1818';
			break;
		default:
			var colorHeader = '#519145';
			break;
	}
	
	document.write ('<tr><td height=19 bgcolor='+colorHeader+'>')
		document.write ('<table width=960 cellspacing=0 cellpadding=0 border=0>')	
		document.write ('<tr>')
			document.write ('<td width=463>')
				document.write ('<table width=463 cellspacing=0 cellpadding=0 border=0>')
					document.write ('<tr>')
						document.write ('<td width=98 align=right><span class="'+strfnt+'"><b>'+fecha+'</b></span></td>')
						document.write ('<td width="130" align="center">')
							clima();
						document.write ('</td>')
						if (grcuser == null) 
							document.write('<td width="170" align="right"><img src="/libre/online/imggc/pix.gif" width="38" height="10" align="absmiddle"/></td><td width="100" align="left"><a href="/libre/acceso/acceso.htm" id="ligablanca"><span class="arblanco12">conectar</span></a></td>');
						else 
							document.write('<td width="170" align="right"><a href="/libre/acceso/registro/perfil.asp"><span class="aramarillo12"><b><u>Hola,'+grcuser.substr(0,11)+'</u></b></span></a><img src="/libre/online/imggc/pix.gif" width="38" height="10" align="absmiddle"/></td><td width="100" align="left"><a href="/libre/acceso/logout.asp" id="ligablanca"><span class="arblanco12">desconectar</span></a></td>');
					document.write ('</tr>')
				document.write ('</table>')
			document.write ('</td>')
			document.write ('<FORM NAME=buscador ACTION="http://busquedas.gruporeforma.com/'+plaza+'/Pages/Buscaimpresa.aspx" METHOD=POST>')
			document.write ('<td width=200 align=right><span class="arblanco12">Buscar:&nbsp;</span><input type="text" name="strbusqueda" style="width:130px;height:17px;border-width:0px;margin-bottom:1px;"><script language=javascript>flechabuscar()</script></td>')
			document.write ('</FORM>')				
			document.write ('<td width=297 align=right><span class="arblanco12">Edición Impresa</span><script language=javascript>edimpresa()</script></td>')		
		document.write ('</tr>')	
		document.write ('</table>')
	document.write ('</td></tr>')
}



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;
}

//**SUSCRIPCIÓN/ COBRO
function Cobro()
{
	var grcuser = Get_Cookie("cusuarioss");
	if (grcuser == null)
		document.write("<img src='/libre/offlines/imggc/conectar_transparente.gif' height=17 width=214 border=0>");
	else
		document.write("<img src='/libre/online/imggc/pix.gif' border=0 width=10 height=15 align=absmiddle><a href='/libre/acceso/registro/perfil.asp'><u><span class=aramarillo12b><u>Hola, " + grcuser.substr(0,11) + "</u></span></a><img src='/libre/online/imggc/pix.gif' border=0 width=5 height=15 align=absmiddle><a href='/libre/acceso/ayuda/'><img src='/libre/offlines/imggc/ayudaimg_blanco_20.gif' border=0 width=20 height=17 align=absmiddle><span class=arblanco12>ayuda</span></a><img src='/libre/online/imggc/pix.gif' border=0 width=5 height=15 align=absmiddle><a href='/libre/acceso/logout.asp'><img src='/libre/offlines/imggc/llaveimg2_blanco_20.gif' border=0 width=25 height=17 align=absmiddle><span class='arblanco12'>desconectar</span></a>"); 
}

function edimpresa()
{
	document.write ('<a href=http://'+home+'/libre/online/edicionimpresa/><img src="/libre/offlines/imggc/ed_impresa_'+plaza+'.gif" height=19 border=0 align=absmiddle>')
}
function flechabuscar()
{
	document.write ('<input type=image src="/libre/offlines/imggc/flecha_ir_'+plaza+'.gif" width=21 height=17  NAME="Busquedas" align=absmiddle>')	                 
}

function getCookieVal (offset) 
{  
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
		endstr = document.cookie.length;  
	return unescape(document.cookie.substring(offset, endstr));
}


function imagenHeader(imgHeader, homeOffline)
{
	document.write('<td height="52"><img src="'+imgHeader+'" width="960" height="52" border="0" alt="" usemap="#header"></td>');
	document.write('<map name="header">');
		document.write('<area shape="rect" coords="0,0,200,52" href="http://www.'+plaza+'.com" target=_top>');
		document.write('<area shape="rect" coords="201,0,960,52" href="'+homeOffline+'" target=_top>');
	document.write('</map>');
}