var browser = navigator.appName;
var version = parseInt(navigator.appVersion);

function checklogin()
{
 var error=false;
 var ocu="/loginunico.html";

 if (document.forms[0].usuario.value.length == 0)
 {
  alert("Debe introducir su identificador");
  document.forms[0].usuario.focus();
  error=true;
 }
 else
 {
  if ((document.forms[0].clave.value.length < 4) || (document.forms[0].clave.value.length > 60))
  {
   alert("Su clave de acceso debe tener entre 4 y 60 caracteres");
   document.forms[0].clave.focus();
   error=true;
  }
 }
 if (!error)
 {
  if (browser =="Microsoft Internet Explorer") { document.getElementById('applet').src=ocu;}
  else if ((browser =="Netscape") && (version == "5")) { document.getElementById('applet').src=ocu;}
  else if (browser =="Netscape") { window.open(ocu);}
 }
}

function EsNumerico (obj) {
for (var i=0; i<obj.value.length; i++) {
 var ch = obj.value.substring (i, i+1);
  if (ch < "0" || ch > "9") { return false; }
 }
return true;
}  

function PonerMayusculas (obj) {
cadena=obj.value; 
cadena=cadena.toUpperCase(cadena);         
obj.value=cadena; 
}

function checkloginempresas() {
   var error=false;
   var pag_oculta="/ocultoempresasunico.html";
   
   if(EsNumerico(document.forms[0].empresa_grupo)) {    
     if (document.forms[0].empresa_grupo.value.length <5) {
       for (i=1;i=5-document.forms[0].empresa_grupo.value.length;i++) {		      
	 document.forms[0].empresa_grupo.value=0+document.forms[0].empresa_grupo.value
       }
     }
   }    

   if (document.forms[0].empresa_usuario.value.length == 0) {
     alert("Debe introducir su identificador");
     document.forms[0].empresa_usuario.focus();
     error=true;

     return false;
   }
   else {
     if ((document.forms[0].empresa_clave.value.length <= 0) || (document.forms[0].empresa_clave.value.length > 60)) {
        alert("Su password debe tener entre 15 y 60 caracteres");
        document.forms[0].empresa_clave.focus();
        error=true;
        return false;
     }
   }

   if (!error) {
     var param=parent.document.location.search;
     i=param.indexOf("=");

     var id_pago=param.substring(i+1);
     if(id_pago!="")
        id_pago="?id="+id_pago
	
     GarfioEmpresas="E0000";
     Garfioparticulares="C0000";

     if(document.forms[0].empresa_grupo.value==GarfioEmpresas || document.forms[0].empresa_grupo.value==Garfioparticulares ) {		
      document.forms[0].USER_ID.value=document.forms[0].empresa_usuario.value;
      document.forms[0].PASSWORD.value=document.forms[0].empresa_clave.value;			
      document.forms[0].empresa_clave.value=document.forms[0].empresa_clave.value;
      document.forms[0].action ="https://empresas.santandercentralhispano.es/multiservicio/InicioBCH.jsp"
      document.forms[0].ACCION.value='ENTRAR';		
      document.forms[0].target="_parent";
      if(document.forms[0].empresa_grupo.value==GarfioEmpresas)
       document.forms[0].S_SITE_ID.value='HOMESCHEMP';
      else
       document.forms[0].S_SITE_ID.value='HOMESCHPART';
      document.forms[0].submit();
     }
     else {
        var browser = navigator.appName;
        var version = parseInt(navigator.appVersion);
        if (browser =="Microsoft Internet Explorer" ) 
        {  
            document.all["applet"].src=pag_oculta;
        }
        else  if ((browser !="Microsoft Internet Explorer" && version==5)) 
        {
           obj=document.getElementById("applet");
           obj.src=pag_oculta;
	}
	else
 	   document.layers["applet"].src=pag_oculta;

     }
   }//!Error

/*
   if(pwd)
     return false;
*/     
}

function escribirCabecera(nombreImagen){
	
	txt  = "";
	txt += "<tr>\n";
	txt += "	<td align=\"right\" bgcolor=\"#FFFFFF\">\n";
	txt += "	\n";
	txt += "	<!-- inicio bloque de navegacion recursiva -->\n";
	txt += "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
	txt += "	<tr>\n";
	txt += "		<td colspan=\"8\"><img src=\"/img/sp.gif\" width=\"1\" height=\"2\" border=\"0\"></td>\n";
	txt += "	</tr>\n";
	txt += "	<tr>\n";
	txt += "		<td nowrap><a href=\"/index.html\" class=\"nrEnlace\">Inicio</a></td>\n";
	txt += "		<td><img src=\"/img/sp_bar_rojo.gif\" width=\"13\" height=\"10\" border=\"0\"></td>\n";
	txt += "		<td nowrap><a href=\"javascript:noscrollsizedwindow('/mapa.html','privacidad',775,400,100,70);\" class=\"nrEnlace\">Mapa Web</a></td>\n";
	txt += "		<td><img src=\"/img/sp_bar_rojo.gif\" width=\"13\" height=\"10\" border=\"0\"></td>\n";
	txt += "		<td nowrap><a href=\"http://www.gruposantander.com\" target=\"_blank\" class=\"nrEnlace\">Web del Grupo</a><img src=\"/img/fl_wcorp.gif\" width=\"10\" height=\"11\" border=\"0\"></td>\n";
	txt += "		<td><img src=\"/img/sp_bar_rojo.gif\" width=\"13\" height=\"10\" border=\"0\"></td>\n";
	txt += "		<td nowrap><a href=\"/atcl/atclHome.html\" class=\"nrResaltado\">Atención al cliente</a></td>\n";
	txt += "		<td><img src=\"/img/sp.gif\" width=\"1\" height=\"18\" border=\"0\"></td>\n";
	txt += "	</tr>\n";
	txt += "	</table>\n";
	txt += "	<!-- fin de bloque de navegacion recursiva -->\n";
	txt += "	\n";
	txt += "	</td>\n";
	txt += "</tr>\n";
	txt += "<tr>\n";
	txt += "	<td>\n";
	txt += "	\n";
	 
	if (esParticular ||(!esEmpresa && !esComercio)){
	 
		txt += "	<!-- inicio bloque de cabecera -->\n";
		txt += "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"770\">\n";
		txt += "	<tr valign=\"top\">\n";
		txt += "		<td bgcolor=\"#F51E30\" width=\"470\"><img src=\"/img/sp.gif\" width=\"470\" height=\"10\" border=\"0\"><br>\n";
		txt += "			<img src=\"/img/sp.gif\" width=\"18\" height=\"1\" border=\"0\"><img src=\"/img/cab_logo.gif\" width=\"355\" height=\"35\" border=\"0\"><br>\n";
		txt += "			<img src=\"/img/sp.gif\" width=\"470\" height=\"18\" border=\"0\"></td>\n";
		txt += "		<td width=\"72\" bgcolor=\"#F51E30\"><img src=\"/img/cab_logo_tramado.gif\" width=\"72\" height=\"58\" border=\"0\"></td>\n";
		txt += "		<td valign=\"top\" width=\"228\" background=\"/img/cab_trama.gif\">\n";
		txt += "\n";
		txt += "			<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"228\" "+((NS4 && !document.getElementById)?"background=\"/img/sp.gif\"":"")+">\n";
		txt += "			<tr valign=\"top\">\n";
		txt += "				<td colspan=\"5\"><img src=\"/img/sp.gif\" width=\"1\" height=\"2\" border=\"0\"></td>\n";
		txt += "				<td rowspan=\"4\"><img src=\"/img/sp.gif\" width=\"1\" height=\"58\" border=\"0\"></td>\n";
		txt += "			</tr>\n";
		txt += "			<tr>\n";
		txt += "				<td class=\"cabTitulo\" colspan=\"5\"><b>Banca Online Particulares</b><br></td>\n";
		txt += "			</tr>\n";
		txt += "			<tr>\n";
		txt += "				<td><input type=\"text\" class=\"cabCajaTexto\" name=\"usuario\" value=\"usuario\" size=\"5\" onfocus=\"document.forms[0].usuario.value=''\"></td>\n";
		txt += "				<td><img src=\"/img/sp.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
		txt += "				<td><input type=\"password\" class=\"cabCajaTexto\" name=\"clave\" value=\"clave\" size=\"5\" onfocus=\"document.forms[0].clave.value=''\"></td>\n";
		txt += "				<td><img src=\"/img/sp.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
		txt += "				<td><a href=\"#\" onClick=\"checklogin();return false;\"><img src=\"/img/cab_bt_entrar.gif\" width=\"78\" height=\"14\" alt=\"\" border=\"0\"></a></td>\n";
		txt += "			</tr>\n";
		txt += "			<tr>\n";
		txt += "				<td colspan=\"5\" align=\"right\" class=\"cabEnlace\">\n";
		txt += "					<a href=\"https://www.santandercentralhispano.es/formularios/alta_supernet.html\" class=\"cabEnlace\" target=\"_blank\">Alta</a> | \n";
//		txt += "					<a href=\"#\" class=\"cabEnlace\">Ver Demo</a> | \n";
		txt += "					<a href=\"#\" onclick=\"window.open('/recuerde_claves_particulares.htm','recuerde_claves','width=220,height=220,resizable=no,scrollbars=no')\"  class=\"cabEnlace\">¿Clave?</a><img src=\"/img/sp.gif\" width=\"15\" height=\"1\" border=\"0\"></td>\n";
		txt += "			</tr>\n";
		txt += "			</table>\n";
		txt += "\n";
		txt += "		</td>\n";
		txt += "	</tr>\n";
		txt += "	<tr>\n";
		txt += "		<td colspan=\"3\" bgcolor=\"#A1000F\"><img src=\"/img/sp.gif\" width=\"1\" height=\"1\" border=\"0\"></td>\n"; 
		txt += "	</tr>\n";
		txt += "	</table>\n";
		txt += "	<!-- fin de bloque de cabecera -->\n";
	
	}else{
	
		txt += "	<!-- inicio bloque de cabecera -->\n";
		txt += "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"770\">\n";
		txt += "	<tr valign=\"top\">\n";
		txt += "		<td bgcolor=\"#F51E30\" width=\"462\"><img src=\"/img/sp.gif\" width=\"462\" height=\"10\" border=\"0\"><br>\n";
		txt += "			<img src=\"/img/sp.gif\" width=\"18\" height=\"1\" border=\"0\"><img src=\"/img/cab_logo.gif\" width=\"355\" height=\"35\" border=\"0\"><br>\n";
		txt += "			<img src=\"/img/sp.gif\" width=\"462\" height=\"18\" border=\"0\"></td>\n";
		txt += "		<td width=\"72\" bgcolor=\"#F51E30\"><img src=\"/img/cab_logo_tramado.gif\" width=\"72\" height=\"58\" border=\"0\"></td>\n";
		txt += "		<td valign=\"top\"background=\"/img/cab_trama.gif\">\n";
		txt += "\n";
		txt += "			<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" "+((NS4 && !document.getElementById)?"background=\"/img/sp.gif\"":"")+">\n";
		txt += "			<tr valign=\"top\">\n";
		txt += "				<td><img src=\"/img/sp.gif\" width=\"1\" height=\"2\" border=\"0\"></td>\n";
		txt += "				<td rowspan=\"4\"><img src=\"/img/sp.gif\" width=\"5\" height=\"58\" border=\"0\"></td>\n";
		txt += "			</tr>\n";
		txt += "			<tr>\n";
		txt += "				<td class=\"cabTitulo\"><b>Banca Online Empresas</b><br></td>\n";
		txt += "			</tr>\n"; 
		txt += "			<tr>\n"; 
		txt += "				<td>\n";
		txt += "					<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
		txt += "					<tr>\n";
		txt += "						<td><input type=\"text\" class=\"cabCajaTexto\" name=\"empresa_grupo\" value=\"grupo\" onBlur=\"PonerMayusculas(this);\" size=\"6\" onfocus=\"document.forms[0].empresa_grupo.value=''\"></td>\n";
		txt += "						<td><img src=\"/img/sp.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
		txt += "						<td><input type=\"text\" class=\"cabCajaTexto\" name=\"empresa_usuario\" onBlur=\"PonerMayusculas(this);\" value=\"usuario\" size=\"6\" onfocus=\"document.forms[0].empresa_usuario.value=''\"></td>\n";
		txt += "						<td><img src=\"/img/sp.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
		txt += "						<td><input type=\"password\" class=\"cabCajaTexto\" name=\"empresa_clave\" value=\"clave\" size=\"6\" onfocus=\"document.forms[0].empresa_clave.value=''\"><INPUT type=\"hidden\" name=\"empresa_entidad\" value=\"0000\"><INPUT type=\"hidden\" name=\"empresa_home\" value=\"03\"><INPUT type=\"hidden\" name=\"Origen\" value=\"0049\"><INPUT type=\"hidden\" name=\"USER_ID\" value=\" \"><INPUT type=\"hidden\" name=\"PASSWORD\" value=\" \"><INPUT type=\"hidden\" name=\"S_SITE_ID\" value=\" \"><INPUT type=\"hidden\" name=\"ACCION\" value=\"ENTRAR\"></td>\n";
		txt += "					</tr>\n";
		txt += "					</table>\n";
		txt += "						\n";
		txt += "				</td>\n";
		txt += "			</tr>\n";
		txt += "			<tr valign=\"bottom\">\n";
		txt += "				<td class=\"cabEnlace\">\n";
		txt += "					<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
		txt += "					<tr>\n";
		txt += "						<td class=\"cabEnlace\" nowrap><a href=\"https://empresas.santandercentralhispano.es/bsch/gestion/sch_dar_alta.html\" class=\"cabEnlace\" target=\"_blank\">Alta</a> | \n";
		txt += "							<a href=\"https://empresas.santandercentralhispano.es/WebEmpresas/bsch/index.jsp?modo=demo\" class=\"cabEnlace\" target=\"_blank\">Ver Demo</a> | \n";
		txt += "							<a href=\"#\" onclick=\"window.open('/recuerde_claves.htm','recuerde_claves','width=220,height=220,resizable=no,scrollbars=no')\"  class=\"cabEnlace\">¿Clave?</a> &nbsp;</td>\n";
		txt += "						<td><a href=\"#\"  onClick=\"checkloginempresas(); return false;\" ><img src=\"/img/cab_bt_entrar.gif\" width=\"78\" height=\"14\" border=\"0\"></a></td>\n";
		txt += "					</tr>\n";
		txt += "					</table>\n";
		txt += "				\n";
		txt += "				</td>\n";
		txt += "			</tr>\n";
		txt += "			</table>\n";
		txt += "\n";
		txt += "		</td>\n";
		txt += "	</tr>\n";
		txt += "	<tr>\n";
		txt += "		<td colspan=\"3\" bgcolor=\"#A1000F\"><img src=\"/img/sp.gif\" width=\"1\" height=\"1\" border=\"0\"></td>\n";
		txt += "	</tr>\n";
		txt += "	</table>\n";
		txt += "	<!-- fin de bloque de cabecera -->\n";
	
	}

	txt += "\n";
	txt += "	</td>\n";
	txt += "</tr>\n";
	txt += "<tr>\n";
	txt += "	<td bgcolor=\"#FFFFFF\">\n";
	txt += "	\n";

	if (esSubHome){
		
		txt += "	<!-- inicio bloque de navegacion principal -->\n";
		txt += "	<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"770\">\n";
		txt += "	<tr valign=\"top\">\n";
		txt += "	<td><img src=\"" + nombreImagen + "\" width=\"770\" height=\"68\" border=\"0\" usemap=\"#mapaHome\"></td>\n";
		txt += "	</tr>\n";
		txt += "	<tr>\n";
		txt += "		<td bgcolor=\"#999999\"><img src=\"/img/sp.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\"></td>\n";
		txt += "	</tr>\n";
		txt += "	</table>\n";
		txt += "	<!-- fin de bloque de navegacion principal -->\n";
	}else{
		txt += "	<!-- inicio bloque de navegacion principal -->\n";
		txt += "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
		txt += "	<tr>\n";
		txt += "		<td><img src=\"/img/sp.gif\" width=\"12\" height=\"1\" border=\"0\"></td>\n";
		txt += "		<td><a href=\"/par/parHome.html\"><img src=\"/img/"+((esParticular)?"npBotonesParticularesOn.gif":"npBotonesParticularesOff.gif")+"\" width=\"85\" height=\"18\" border=\"0\"></a></td>\n";
		txt += "		<td><a href=\"/emp/empHome.html\"><img src=\"/img/"+((esEmpresa)?"npBotonesEmpresasOn.gif":"npBotonesEmpresasOff.gif")+"\" width=\"155\" height=\"18\" border=\"0\"></a></td>\n";
		txt += "		<td><a href=\"/com/comHome.html\"><img src=\"/img/"+((esComercio)?"npBotonesComerciosOn.gif":"npBotonesComerciosOff.gif")+"\" width=\"130\" height=\"18\" border=\"0\"></a></td>\n";
		txt += "	</tr>\n";
		txt += "	</table>\n";
		txt += "	<!-- fin de bloque de navegacion principal -->\n";
	}
	
	txt += "	\n";
	txt += "	</td>\n";
	txt += "</tr>\n";	
	
	document.write(txt);
}

function escribirPie(){

	txt  = "";
	txt += "<!-- Inicio pie -->\n";	
	txt += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"16\" width=\"770\" bgcolor=\"#F51D30\">\n";	
	txt += "<tr valign=\"middle\">\n";	
	txt += "	<td align=\"right\" class=\"pieEnlace\"><img src=\"/img/sp.gif\" width=\"100\" height=\"1\" border=\"0\"><!--\n";	
	txt += "		--><span class=\"cabEnlace\">Copyright 2001 Santander Central Hispano</span><!--\n";	
	txt += "		--><img src=\"/img/sp_bar_bl.gif\" width=\"13\" height=\"10\" border=\"0\"><!--\n";	
	txt += "		--><a href=\"javascript:scrollsizedwindow('/pol_privac.html','privacidad',650,500,100,70);\" class=\"cabEnlace\">Política de privacidad</a><!--\n";	
	txt += "		--><img src=\"/img/sp_bar_bl.gif\" width=\"13\" height=\"10\" border=\"0\"><!--\n";	
	txt += "		--><a href=\"/atcl/tab/atcl_tab.html\" class=\"cabEnlace\">Tablón de anuncios</a><!--\n";	
	txt += "		--><img src=\"/img/sp_bar_bl.gif\" width=\"13\" height=\"10\" border=\"0\"><!--\n";	
	txt += "		--><a href=\"javascript:scrollsizedwindow('/aviso_legal.html','privacidad',650,500,100,70);\" class=\"cabEnlace\">Aviso Legal</a><!--\n";	
	txt += "		--><img src=\"/img/sp.gif\" width=\"5\" height=\"1\" border=\"0\"></td>\n";
	txt += "</tr>\n";	
	txt += "</table>\n";	
	txt += "<!-- Fin pie -->\n";
if ((browser =="Microsoft Internet Explorer") || ((browser =="Netscape") && (version>4))) { 
	txt += "<IFRAME NAME=\"applet\" ID=\"applet\" VISIBILITY = \"HIDDEN\" WIDTH=1 HEIGHT=1>&nbsp;</IFRAME>";
}
else {
	txt += "<LAYER NAME=\"applet\" ID=\"applet\" VISIBILITY = \"HIDDEN\" WIDTH=1 HEIGHT=1>&nbsp;</ILAYER>";
}
		

	document.write(txt);
}

function escribir_productos(img,mascara,titulo,tituloenlace,subtitulo,texto,textoenlace,lineaRoja){
	var pinzo="";
	if (titulo == null) {titulo="" }
	if (tituloenlace == "") {tituloenlace="#" }
	if (subtitulo == null) {subtitulo="" }
	if (texto == "") {texto="" }
	if (textoenlace == "") {textoenlace="#" }
	if (mascara == "") {mascara="/img/sp.gif" }
	
	if (img == null) {pinzo="&nbsp;" }
		else {
			pinzo ="<table border='0' cellpadding='0' cellspacing='0'>";
			pinzo = pinzo + "<tr>";
			pinzo = pinzo + "<td valign='top' width='55' rowspan='4'><!-- Inicio foto -->";
			pinzo = pinzo + "<table border='0' cellpadding='0' cellspacing='0' width='55' background='"+img+"'>";
			pinzo = pinzo + "<tr>";
			pinzo = pinzo + "<td><a href='"+tituloenlace+"'><img src='"+mascara+"' width='55' height='55' border='0'></a></td>";
			pinzo = pinzo + "</tr>";
			pinzo = pinzo + "</table>";
			pinzo = pinzo + "</td><!-- Fin foto -->";
			pinzo = pinzo + "<td "+((lineaRoja)?"bgcolor='#EE333E'":"")+" colspan='2'><img src='/img/sp.gif' width='149' height='1' border='0'></td>";
			pinzo = pinzo + "<td rowspan='4' "+((lineaRoja)?"bgcolor='#EE333E'":"")+"><img src='/img/sp.gif' width='1' height='55' border='0'></td>";					
			pinzo = pinzo + "</tr>";
			pinzo = pinzo + "<tr>";
			pinzo = pinzo + "<td rowspan='2'"+((lineaRoja)?" bgcolor='#FFFFFF'":"")+"><img src='/img/sp.gif' width='8' height='53' border='0'></td>";
			pinzo = pinzo + "<td class='cntDeTitulo' valign='bottom' width='100%'"+((lineaRoja)?" bgcolor='#FFFFFF'":"")+"><a href='"+tituloenlace+"' "+(((tituloenlace.indexOf("http")>-1)&&(tituloenlace.indexOf("javascript:")<0))? "target='_blank '":"")+"class='cntDeTitulo' border='0'>"+titulo+"&nbsp;</a></td>";
			pinzo = pinzo + "</tr>";
			pinzo = pinzo + "<tr>";
			pinzo = pinzo + "<td valign='top'"+((lineaRoja)?" bgcolor='#FFFFFF'":"")+">"+((subtitulo=="")?"<span class='cntTextoResaltado'>&nbsp;</span>":"<span class='cntTextoResaltado'>"+subtitulo+"</span><br>")+"<a href='"+textoenlace+"' "+(((textoenlace.indexOf("http")>-1)&&(textoenlace.indexOf("javascript:")<0))? "target='_blank '":"")+"class='cntDeTexto'>"+texto+((lineaRoja)?"<img src='/img/flechas_r.gif' width='13' height='7' border='0' alt=''>":"&nbsp;")+"</a></td>";
			pinzo = pinzo + "</tr>";
			pinzo = pinzo + "<tr>";
			pinzo = pinzo + "<td "+((lineaRoja)?"bgcolor='#EE333E' ":"")+" colspan='2'><img src='/img/sp.gif' width='149' height='1' border='0'></td>";
			pinzo = pinzo + "</tr>";
			pinzo = pinzo + "</table>";
			
			}
	document.write(pinzo);
}

function escribir_bannerImg(img,titulo,tituloenlace,ir,irenlace){
	var bun="";
	if (tituloenlace == "") {tituloenlace="#" }
	if (irenlace == "") {irenlace="#" }		
	
	if (img == null) {bun="&nbsp;" }
		else {
			bun ="<table border='0' cellpadding='0' cellspacing='0'>";
			if (titulo==""){}
			else{
				bun = bun + "<tr>";
				bun = bun + "<td><img src='/img/flecha_r.gif' width='7' height='7' border='0' alt=''><a href='"+tituloenlace+"'"+(((tituloenlace.indexOf("http")>-1)&&(tituloenlace.indexOf("javascript:")<0))? "target='_blank '":"")+" class='banTituloResaltado'>"+titulo+"</a></td>";
				bun = bun + "</tr>";
			}
			bun = bun + "<tr>";
			bun = bun + "<td><img src='/img/sp.gif' width='1' height='2' border='0'></td>";
			bun = bun + "</tr>";
			bun = bun + "<tr>";
			bun = bun + "<td><a href='"+tituloenlace+"'"+(((tituloenlace.indexOf("http")>-1)&&(tituloenlace.indexOf("javascript:")<0))? "target='_blank '":"")+" class='banTituloResaltado'><img src='"+img+"' border='0'></a></td>";					
			bun = bun + "</tr>";
			if (ir==""){}
			else{
				bun = bun + "<tr>";
				bun = bun + "<td align='right' class='banTexto'><a href='"+irenlace+"'"+(((irenlace.indexOf("http")>-1)&&(irenlace.indexOf("javascript:")<0))? "target='_blank '":"")+" class='banEnlace'>"+ir+"&nbsp;</a><img src='/img/flechas_g.gif' width='13' height='7' border='0' alt=''></td>";
				bun = bun + "</tr>";
			}
			bun = bun + "<tr>";
			bun = bun + "<td><img src='/img/sp.gif' width='1' height='3' border='0'></td>";
			bun = bun + "</tr>";
			bun = bun + "</table>";
						
		}
	document.write(bun);
}
function escribir_bannerLink(img,titul001,text001,enlac001,titul002,text002,enlac002,titul003,text003,enlac003){
var raspi="";
if (img==null){}
else{
	raspi+="<table border='0' cellpadding='0' cellspacing='0' bgcolor='#f3f3f3' width='127'>";
	raspi+="<tr>";
	raspi+="<td colspan='3'><img src='"+img+"' width='127' border='0' alt=''></td>";
	raspi+="</tr>";
	raspi+="<tr>";
	raspi+="<td colspan='3'><img src='/img/sp.gif' width='1' height='1' border='0'></td>";
	raspi+="</tr>";
	for (var i = 1; i < 4; i++) {
		if (eval("titul00"+i)==""){}
		else{
		if (eval("enlac00"+i)=="") eval("enlac00"+i+"='#'");
			raspi+="<tr>";
			raspi+="<td valign='top'><img src='/img/sp.gif' width='6' height='1' border='0' alt=''></td>";
			raspi+="<td valign='top'><img src='/img/cua_rojo_fecha.gif' width='9' height='10' border='0' alt=''></td>";
			raspi+="<td class='banTexto' valign='top' width='88%'><a href='"+eval("enlac00"+i)+"' ";
			if (eval("enlac00"+i)==enlac001){if ((enlac001.indexOf("http")>-1)&&(enlac001.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			if (eval("enlac00"+i)==enlac002){if ((enlac002.indexOf("http")>-1)&&(enlac002.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			if (eval("enlac00"+i)==enlac003){if ((enlac003.indexOf("http")>-1)&&(enlac003.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			raspi+=" class='menuActual'>"+eval("titul00"+i)+"</a></td>";
			raspi+="</tr>";
			raspi+="<tr>";
			raspi+="<td valign='top' colspan='2'><img src='/img/sp.gif' width='9' height='1' border='0' alt=''></td>";
			raspi+="<td class='banTexto' valign='top'><a href='"+eval("enlac00"+i)+"' ";
			if (eval("enlac00"+i)==enlac001){if ((enlac001.indexOf("http")>-1)&&(enlac001.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			if (eval("enlac00"+i)==enlac002){if ((enlac002.indexOf("http")>-1)&&(enlac002.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			if (eval("enlac00"+i)==enlac003){if ((enlac003.indexOf("http")>-1)&&(enlac003.indexOf("javascript")<0)) {raspi+=" target=\"_blank\"";}}
			raspi+=" class='cntDeTexto'>"+((eval("text00"+i)=="")?"<img src='/img/sp.gif' width='1' height='1' border='0'>":eval("text00"+i))+"</a></td>";
			raspi+="</tr>";
			raspi+="<tr>";
			raspi+="<td colspan='3'><img src='/img/sp.gif' width='1' height='3' border='0'></td>";
			raspi+="</tr>";
		}
	
	}
	raspi+="</tr>";
	raspi+="<tr>";
	raspi+="<td colspan='3' bgcolor='#ffffff'><img src='/img/sp.gif' width='1' height='5' border='0'></td>";
	raspi+="</tr>";
	raspi+="</table>";
	}
	document.write(raspi);
}

