var baseLocation;   	   var baseLocation4;var basecol;var basecol2;var s2;var datos="";var datos2="";var datos3="";var datos4="";var datos8="";var datos9="";var datos10="";var datos11="";var datos12="";var datos15="";var datos16="";var datos17="";var datos18="";	   var datosficha="";basecol2=window.location.href;s2=parseInt(basecol2.indexOf('?'));s6=parseInt(basecol2.indexOf('listaproductos'));s7=parseInt(basecol2.indexOf('sites'));s8=parseInt(basecol2.indexOf('ficha'));s9=parseInt(basecol2.indexOf('ficha2'));s10=parseInt(basecol2.indexOf('asp'));	   s12=parseInt(basecol2.indexOf('ficha3'));s15=parseInt(basecol2.indexOf('listaproducto'));s17=parseInt(basecol2.indexOf('listaservicios'));s19=parseInt(basecol2.indexOf('productos'));var url2 ;url2 = (basecol2.substring(0,s7+5)); if (s2==-1){ 	s2=basecol2.length }	   	   datos   ="?" + (basecol2.substring(s2+1,basecol2.length));	   datos2  = "&" + (basecol2.substring(s2+1,basecol2.length));	   datos3  = "?" + (basecol2.substring(s6+15,basecol2.length));datos4  = "&" + (basecol2.substring(s6+15,basecol2.length));datos8  = "?" + (basecol2.substring(s8+6,basecol2.length));datosficha = "&" + (basecol2.substring(s8+6,basecol2.length));datos9  = "?" + (basecol2.substring(s9+7,basecol2.length));datos10 =(basecol2.substring(s10+3,basecol2.length));datos11 ="&"+(basecol2.substring(s10+4,basecol2.length));datos12 = "?" + (basecol2.substring(s12+7,basecol2.length));datos15 = "?" + (basecol2.substring(s15+14,basecol2.length));datos16 = "&" + (basecol2.substring(s15+14,basecol2.length));datos17 = "?" + (basecol2.substring(s17+15,basecol2.length));datos18 = "&" + (basecol2.substring(s17+15,basecol2.length));datos19 = "?" + (basecol2.substring(s19+10,basecol2.length));datos20 = "&" + (basecol2.substring(s19+10,basecol2.length));	   	if (datos=="?") 	datos=""if (datos2=="&")	datos2=""if (datos3=="?")	datos3=""if (datos4=="&")	datos4=""if (datos8=="?")	datos8=""	   if (datosficha=="&")	datosficha=""		if (datos9=="?")	datos9=""		if (datos11=="&")	datos11=""if (datos12=="?")	datos12=""		if(navigator.appName=="Microsoft Internet Explorer"){	basecol=document.all.tags('BASE');	baseLocation=basecol[0].href;	baseLocation4=basecol[0].href;}else  {	basecol=window.location.href; 	var s=parseInt(basecol.indexOf('sites'));		if (s == -1)	{		var s=parseInt(basecol.indexOf('srvrpags')); 	}	baseLocation=(basecol.substring(0,s)+'sites/');	baseLocation4=(basecol.substring(0,s)+'sites/');}//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Funciones necesarias para el calculo de moxqum mediante javascript.//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//Ruta del servidor de moxqum// URL_MOXQUM - Desarrollo//var serMoxqum =	"http://moxqum.tpides.intratpi.com/paol/images/logo.gif?"// URL_MOXQUM - Aceptacion//var serMoxqum = "http://10.30.0.198/paol/images/logo.gif?"// URL_MOXQUM - Produccionvar serMoxqum = "http://wwv.paginasamarillas.es/paol/images/logo.gif?"//Variable que indica si esta activa la inserccion de moscas.// 1 activado// 0 desactivadovar estadoMoxqum="1";// Estado y parametros de mosca OJD// 1 activado// 0 desactivadovar estadoMoscaOJD="1";var siteMoscaOJD="Pamarillas";var sectionnameMoscaOJD="www.paginasamarillas.es";var optionalsectiondescriptionMoscaOJD="";//Funcion que devuelve la fecha del sistema en formato AAAAMMDDfunction devuelveFecha(){	var now   = new Date();		var ano = now.getYear();	var mes  = now.getMonth() + 1;	var dia   = now.getDate();		if (ano < 1900)		ano = ano + 1900;		if (mes < 10)			mes = "0" + mes;	else		mes = "" + mes;			if (dia < 10) 		dia = "0" + dia;	else		dia = "" + dia;			return ano + mes + dia;}//Funcion que devuelve la hora del sistema en formato HHMMSSfunction devuelveHora(){		var now = new Date();				var hours = now.getHours();		var minu   = now.getMinutes();		var sec   = now.getSeconds();				if (hours < 10)			hours = "0" + hours;		else			hours = "" + hours;								if (minu < 10)			minu = "0" + minu;		else			minu = "" + minu;					if (sec < 10)			sec = "0" + sec;		else			sec = "" + sec;				return hours + minu + sec;}function pintaMosca(document){                    	//Comprobamos si est activa la inserccion de moscas	document.write("<div style='display:none'>");	if (estadoMoxqum == "1")	{		var param = document.location.search;		param = param.replace("?","");		var queryMoxqum="id_maq=" + document.location.hostname;		queryMoxqum+="&referer=" + escape(document.referrer);		queryMoxqum+="&urlv=" + escape(param); //document.location.search;		queryMoxqum+="&urlf=" + document.location.hostname + document.location.pathname; //document.location.href;		queryMoxqum+="&serv=" + document.location.hostname;		//queryMoxqum+="&f=" + devuelveFecha();		//queryMoxqum+="&h=" + devuelveHora();		document.write("<iframe id='pilotoMoxqum' name='pilotoMoxqum' src='" + serMoxqum + queryMoxqum + "' style='display:none'></iframe>");	}	if (estadoMoscaOJD == "1")	{		var IVW ="http://" + siteMoscaOJD + ".ojdinteractiva.com/cgi-bin/ivw/CP/" + sectionnameMoscaOJD + ";" + optionalsectiondescriptionMoscaOJD;		document.write("<IMG id='mojd' name='mojd' SRC=\""+IVW+"?p="+Math.random()+"&r="+escape(document.referrer)+"\" WIDTH=\"1\" HEIGHT=\"1\" >");	}	document.write("</div>");}//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Inserta moxqum y ojd en la página.function fnInsertMoxqum() {	//try {		var frag = document.createDocumentFragment();		var oDiv = document.createElement( "div" );		if (estadoMoxqum == "1")		{			var param = document.location.search;			param = param.replace("?","");			var queryMoxqum="id_maq=" + document.location.hostname;			queryMoxqum+="&referer=" + escape(document.referrer);			queryMoxqum+="&urlv=" + escape(param); //document.location.search;			queryMoxqum+="&urlf=" + document.location.hostname + document.location.pathname; //document.location.href;			queryMoxqum+="&serv=" + document.location.hostname;			//queryMoxqum+="&f=" + devuelveFecha();			//queryMoxqum+="&h=" + devuelveHora();			var oIFrame = document.createElement( "iframe" );			oIFrame.style.display = "none";			oIFrame.setAttribute( "id",   "pilotoMoxqum" );			oIFrame.setAttribute( "name", "pilotoMoxqum" );			oIFrame.setAttribute( "src",  serMoxqum + queryMoxqum );			oIFrame.style.display = "none";			oDiv.appendChild( oIFrame );			//document.write("<iframe id='pilotoMoxqum' name='pilotoMoxqum' src='" + serMoxqum + queryMoxqum + "' style='display:none'></iframe>");		}		if (estadoMoscaOJD == "1")		{			var IVW ="http://" + siteMoscaOJD + ".ojdinteractiva.com/cgi-bin/ivw/CP/" + sectionnameMoscaOJD + ";" + optionalsectiondescriptionMoscaOJD;			var oImg = document.createElement( "img" );			oImg.setAttribute( "id",   "mojd" );			oImg.setAttribute( "name", "mojd" );			oImg.setAttribute( "src", IVW+"?p="+Math.random()+"&r="+escape(document.referrer) );			oDiv.appendChild( oImg );			//document.write("<IMG id='mojd' name='mojd' SRC=\""+IVW+"?p="+Math.random()+"&r="+escape(document.referrer)+"\" WIDTH=\"1\" HEIGHT=\"1\" >");		}		frag.appendChild( oDiv );		document.body.appendChild(frag);		//}	//catch( e ) {		//}}//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Espera a que la cookie de sesión esté disponible para lanzar la mosca.function fnPoolSessionCookie() {	var bCookieAvailable = false;		// Comprobamos si la cookie está disponible.	if (document.cookie.length>0)	{		if( document.cookie.indexOf( "TPISESSIONID" ) != -1 ) {			bCookieAvailable = true;		}	}	// Si no está disponible volveremos a preguntar.	if( !bCookieAvailable ) {		setTimeout( "fnPoolSessionCookie()", 250 );	}	else {		// Llamada a insertMoxqum		fnInsertMoxqum();	}}//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//fin funciones moxqum//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Agrega una función al evento onload de la página.//function addOnLoad( fFunction ) {	//DOM method for binding an event	if (window.addEventListener) {		window.addEventListener("load", fFunction, false);	}	//IE exclusive method for binding an event	else if (window.attachEvent) {		window.attachEvent("onload", fFunction);	}	//support older modern browsers	else if (document.getElementById) {		window.onload=fFunction;	}}//llamada a pintamosca.var sPlan = "NoMUL"try{	sPlan = plan}catch(E){	sPlan = "NoMUL"}//Evitamos pintar la mosca en visita.html ya que es una pagina de framesif( parseInt(document.location.href.indexOf( "visita.html" ) )== -1 && (sPlan != "MUL") ) {	//pintaMosca(window.document);		addOnLoad( fnPoolSessionCookie );}function cerrar(){	close();}function contactar(){	var nuevaVentana = window.open("about:blank", "nuevaVentana", "width=315,height=260,menubar=no,toolbar=no");   		document.frmMail.action ="../../../../../srvrpags/sendmail.asp" + datos;	document.forms[0].submit();}function enviar(){	var nuevaVentana = window.open("about:blank", "nuevaVentana", "width=315,height=260,menubar=no,toolbar=no");   	document.frmMail.action ="../../../../../srvrpags/sendmail.asp" + datos; document.forms[0].submit();}	    function enviarfaseII(){	var bien = "S"	var nombre	var valor 	var idioma = obteneridioma();	for (i=0;i<document.forms[0].length;i++)	{		nombre = document.forms[0].elements[i].name;		 		prefijo = document.forms[0].elements[i].name.substring(0,5);		 		valor = document.forms[0].elements[i].value;  		if ((((prefijo == "obli_") || nombre == "source_name") && (valor == "") && (document.forms[0].elements[i].type == "text" || document.forms[0].elements[i].type == "textarea")) 			  || (document.forms[0].elements[i].type == "checkbox") && prefijo == "obli_" && document.forms[0].elements[i].checked != true			  ||((nombre.indexOf("*") != -1) && (valor == "") &&  (document.forms[0].elements[i].type == "text" || document.forms[0].elements[i].type == "textarea")))		{	   	  		   	  				bien = "N";	   	  				if (idioma.substring(11,idioma.length)=="EN")	   	  	 			 alert ("The obligatory fields must be filled up");		 else			 alert ("Los campos obligatorios tienen que ser rellenados");			document.forms[0].elements[i].focus();			break;		}	   	      	   	   	}  if (bien=="S")	{				if (document.hojas.ohoja.value=='recomendar.html')		{		         			document.frmMail.Direccion.value= url2 + "/" + path+ "/home.html" ;		}		var sParam;				var co_contratos2;		var nu_anuncios2;		try {co_contratos2 = co_contratos}		catch(e) {co_contratos2 = obtener_valor('contrato');}		try {nu_anuncios2 = nu_anuncios}		catch(f) {nu_anuncios2 = obtener_valor('anuncio');}						sParam = "&id_anuncio=" + co_contratos2 + "&pg_anuncio=" + nu_anuncios2;   							document.frmMail.action = "/srvrpags/sendmail.asp?" + idioma.substring(1,idioma.length) + datos2 + sParam;				document.forms[0].submit();	       		}}function IrSalto(bloque){	if (document.hojas.ohoja.value!='listaproductos.html')	{		window.location= baseLocation + path + "/" + document.hojas.ohoja.value + datos + "#" + bloque;	} 	else	{		window.location = basecol2 + "#subir";	} }	function recomendar(){	var nuevaVentana = window.open( baseLocation + path + "/recomendar.html" + datos, "nuevaVentana", "width=305,height=190,menubar=no,toolbar=no");      } function video(){	var nuevaVentana = window.open( baseLocation + path + "/video.html" + datos, "nuevaVentana", "width=500,height=390");      } function visita(){	var nuevaVentana = window.open( baseLocation + path + "/visita.html" + datos, "nuevaVentana", "width=520,height=240,menubar=no,toolbar=no");      }function reserva(){	document.location.href=( baseLocation + path + "/reserva.html");      }  	      	     function LlamadaGIS(x, y, l1, l2, l3, ciudad){	//URLGis="http://callejerohoy.paginasamarillas.es/gisvmap/vminet.dll?allDataCoor?"+ciudad+"&"+x+"&"+y+"&"+escape(l1)+"<br>"+escape(l2)+"<br>"+escape(l3)+"&<br>&0&http://callejero.paginasamarillas.es/map&0";	URLGis="http://callejero.paginasamarillas.es/sites/home/mapext.asp?x="+x+"&y="+y+"&l1="+escape(l1)+"&l2="+escape(l2)+"&l3="+escape(l3)+"&ciudad="+ciudad;	var nuevaVentana=window.open(URLGis,"nuevaVentana");	//document.location = URLGis;} 		      	     function Irpaginadinamica(pagina){	if (document.hojas.ohoja.value=='listaproductos.html' || document.hojas.ohoja.value=='listaproducto.html' || document.hojas.ohoja.value=='listaservicios.html' || document.hojas.ohoja.value=='productos.html' || document.hojas.ohoja.value=='productos2.html' || document.hojas.ohoja.value=='ofertas.html' || document.hojas.ohoja.value=='servicios.html' || document.hojas.ohoja.value=='proveedores.asp')	{		var s3 = parseInt(basecol2.indexOf('clientfiles.'));		if (s3!=-1) { 		 	   window.location= baseLocation4.substring(0,baseLocation4.length - 12) + pagina ;	 		           		}		else {			if (document.hojas.ohoja.value=='listaproductos.html')			{					if (plan=="S1B" || plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")				{					datos4 = datos2;					}				window.location= baseLocation4.substring(0,baseLocation4.length - 6) + pagina + datos4;			}			else			{				if (document.hojas.ohoja.value=='listaproducto.html')				{					if (plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")					{						datos16 = datos2;						}					window.location= baseLocation4.substring(0,baseLocation4.length - 6) + pagina + datos16;					} 				else				{					if (document.hojas.ohoja.value=='productos.html' || document.hojas.ohoja.value=='productos2.html')					{						if (plan=="S1B" || plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")						{							datos18 = datos20;							}						else						{							datos18 = datos2						}					}					if (document.hojas.ohoja.value=='ofertas.html' || document.hojas.ohoja.value=='servicios.html')					{						datos18 = datos2;  					}					if (document.hojas.ohoja.value=='proveedores.asp')					{						datos18 = datos11;  					}	 		   	      	 		   	top.location= baseLocation4.substring(0,baseLocation4.length - 6) + pagina + datos18;					} 			}	 		}	}	else	{				var s3=parseInt(basecol2.indexOf('clientfiles/'));		if (s3==-1) {				//var s=parseInt(basecol2.indexOf('srvrpags')); 			//baseLocation=(basecol2.substring(0,s));			if (document.hojas.ohoja.value=='productos.html')			{				if (plan=="S1B" || plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")				{					datos2 = datos20;					}			}			if (document.hojas.ohoja.value=='ficha.html')			{				datos2 = datosficha;				}			if (document.hojas.ohoja.value=='ficha2.html')			{				datos2 = datos9;				}			if (document.hojas.ohoja.value=='ficha3.html')			{				datos2 = datos12;				}			if (parseInt(basecol2.indexOf('gestorweb.paginasamarillas.es'))!=-1) datos2 = ""		       		       	     	 	     			window.location=baseLocation4+pagina+datos2;		}		else {			baseLocation=(basecol2.substring(0,s3));			       			window.location=baseLocation4+pagina;		}		}   }function obteneridioma(){	var idioma;	var p1, p2, p3;		idioma = '';		p1 = window.location.href.toUpperCase().indexOf('/LANGUAGES/');	p3 = window.location.href.toUpperCase().indexOf('CO_IDIOMA');	p4 = window.location.href.toUpperCase().indexOf('.HTML');		     		if (p1 != -1 && p4 != -1)	{		p1 = p1 + 11; // longitud de /LANGUAGES/		p2 = window.location.href.substring(p1, window.location.href.length -1).indexOf('/');		idioma = '&CO_IDIOMA=' + window.location.href.substring(p1,p1+p2);	}	     	  	if (p1 != -1 && p4 == -1)	{		idioma = '&CO_IDIOMA=ES';	}	 	if (p3 != -1) 	{		p3 = p3 + 9; // longitud de CO_IDIOMA		p2 = window.location.href.substring(p3, window.location.href.length -1).indexOf('=');		idioma = '&CO_IDIOMA=' + window.location.href.substring(p3,p3+p2);	}	try 	{		null;  }	catch (e)  {		idioma = '&CO_IDIOMA=ES';	}	    	return idioma   		     	}		function Irpaginacatalogo(hojacatalogo,idcatalogo){  	idioma = obteneridioma();				if (hojacatalogo =="ficha")	       		var pagina2 =  '../srvrpags/tplt_rt_render.asp?id_anuncio=' + co_contratos + '&pg_anuncio=' + nu_anuncios + '&ID_PRODUCTO=' + idcatalogo + idioma + '&xsl_source=' + nombre_plan + '/' + hojacatalogo ;	else		var pagina2 =  '../srvrpags/tplt_rt_render.asp?id_anuncio=' + co_contratos + '&pg_anuncio=' + nu_anuncios + '&ID_CATEGORIA=' + idcatalogo + idioma + '&xsl_source=' + nombre_plan + '/' + hojacatalogo ; 	Irpaginadinamica(pagina2)} 		 		 	      	      	     function Irpagina(pagina){  	if (pagina.indexOf('nav_security.asp') != -1)	{		if (document.hojas.ohoja.value=='listaservicios.html')		{			datos = datos18		}				if (document.hojas.ohoja.value=='listaproductos.html')		{			datos = datos3		}				if (document.hojas.ohoja.value=='ficha.html') 				{			datos = datos8		}				if (document.hojas.ohoja.value=='ficha2.html') 				{			datos = datos9		}				if (document.hojas.ohoja.value=='ficha3.html') 				{			datos = datos12		}				if (pagina.indexOf('?') != -1)		{			datos = datos + "&" + pagina.substring(pagina.indexOf('?') + 1,pagina.length)		         		}								if(navigator.appName=="Microsoft Internet Explorer")		{		        			var nuevaVentana = window.open("about:blank", "nuevaVentana", 'toolbar=no,height=100,width=185,top='+(screen.height/2-100)+',left='+(screen.width/2-200));       			nuevaVentana.top.location='nav_security.asp?id_anuncio=' + co_contratos + '&amp;pg_anuncio=' + nu_anuncios + '&amp;section=proveedores&amp;ruta='+baseLocation+path +'/'+datos;		}		else		{			var nuevaVentana = window.open("about:blank", "nuevaVentana", 'toolbar=no,height=100,width=200,top='+(screen.height/2-100)+',left='+(screen.width/2-200));      			nuevaVentana.top.location='nav_security.asp?id_anuncio=' + co_contratos + '&amp;pg_anuncio=' + nu_anuncios + '&amp;section=proveedores&amp;ruta='+baseLocation+path+'/'+datos;		      		}	}	else	{		if (document.hojas.ohoja.value=='listaproductos.html')		{			if (plan=="S1B" || plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")			{				datos3 = datos;				}			window.location= baseLocation + path + "/" + pagina + datos3;		}		else		{			if (document.hojas.ohoja.value=='ficha.html')			{				window.location= baseLocation + path + "/" + pagina + datos8;			}			else			{				if (document.hojas.ohoja.value=='ficha2.html')				{					window.location= baseLocation + path + "/" + pagina + datos9;		   	        				}				else				{					if (document.hojas.ohoja.value=='proveedores.html')					{						window.location= baseLocation + path + "/" + pagina + datos10;					}					else					{						if (document.hojas.ohoja.value=='ficha3.html')						{		   	         								window.location= baseLocation + path + "/" + pagina + datos12;						}						else						{								if (document.hojas.ohoja.value=='listaproducto.html')							{								if (plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")								{									datos15 = datos;									}								window.location= baseLocation + path + "/" + pagina + datos15;							}							else							{									if (document.hojas.ohoja.value=='listaservicios.html')								{									window.location= baseLocation + path + "/" + pagina + datos17;									}								else								{ 										if (document.hojas.ohoja.value=='productos.html')									{										if (plan=="S1B" || plan=="E1B" || plan=="CE2" || plan=="ME1" || plan=="MS1")										{											datos = datos19;											}									}									if (plan=="OT2" && pagina=='libre4.html')									{											window.open("http://www.grupo-oter.com", "ventana1", 'toolbar=yes,height=800,width=600,top=0,left=0,resizable=YES,scrollbars=yes,Location=yes,Directories=yes,menubar=yes');									}									else									{										top.location= baseLocation + path + "/" + pagina + datos;									}								}							}						}  					}				}			}		}	}}		function ampliar(nom,alto,ancho) {			   	ancho2 = parseInt(ancho) + 25; 	alto2 = parseInt(alto) + 25;	barra="no";	if (ancho2>800)	{		ancho2=750;			alto2 = alto2 + 15		barra = "yes" 	}	if (alto2>600)	{		ancho2 = ancho2 + 15 	 		alto2=550;			barra = "yes"	}		  	var nuevaVentana2 = window.open(baseLocation + nom, "Ampliacion", "width=" + ancho2 + ",height=" + alto2 + ",menubar=no,toolbar=no,scrollbars=" + barra + ",top='+(screen.height/2-100)+',left='+(screen.width/2-200)");      	/*ancho2 = parseInt(ancho) + 11; 	alto2 = parseInt(alto) + 44;	var nuevaVentana2 = window.open("about:blank", "", "width=" + ancho2 + ",height=" + alto2 + ",menubar=no,toolbar=no");      	nuevaVentana2.document.write("<html>");	nuevaVentana2.document.writeln("<head>");	nuevaVentana2.document.writeln("<title>Ampliacion Foto</title>");		nuevaVentana2.document.writeln("</head>");	nuevaVentana2.document.writeln("<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");		nuevaVentana2.document.writeln("<link rel='STYLESHEET' type='text/css' href='" + baseLocation + "styles/" + estilo_xsl + "/edi.css' />");	nuevaVentana2.document.writeln("<table  border='0' cellspacing='0' align='center'>");		nuevaVentana2.document.writeln("<tr class='fondo03'> ");		nuevaVentana2.document.writeln("  <td height='20'>&nbsp;</td>");		nuevaVentana2.document.writeln("</tr>");		nuevaVentana2.document.writeln("<tr>");		nuevaVentana2.document.writeln("  <td><img src='"+ baseLocation +  nom +"' width='" + ancho + "' height='" + alto + "' alt='' border='0'></td>");		nuevaVentana2.document.writeln("</tr>");		nuevaVentana2.document.writeln("<tr class='fondo03' align='right'> ");		nuevaVentana2.document.writeln("<td height='20'><a href='javascript:window.close()' class='menu' style='text-decoration:none'><span class='menu'>&nbsp;Cerrar Ventana</span>&nbsp;<img src='" + baseLocation + "images/recNegro.gif' class='menu' width='8' height='8' border='0'></a>&nbsp;&nbsp;</td>");		nuevaVentana2.document.writeln("</tr>");		nuevaVentana2.document.writeln("</table>");		nuevaVentana2.document.writeln("</body>");		nuevaVentana2.document.writeln("</html>");	*/}		function enviarAmigo(){	var nuevaVentana = window.open("about:blank", "nuevaVentana", "width=315,height=260,menubar=no,toolbar=no");      	nuevaVentana.location="../../../../../srvrpags/sendpage.asp?page=" + window.location;}    		    function contactar(){	var nuevaVentana = window.open( baseLocation + path + "/contactanos.html"+datos , "CONTACTO", "width=450,height=330,menubar=no,toolbar=no");      }         		     		var original=window.location;var flag;cont=0;function Ira(){	if (cont>0) {  		original=new String(original)		pos=original.indexOf("#");		original=original.substring(0,pos); /* + original.substring(pos+2,original.length);  */	}	else{		cont++	}	return original;}function fecha_hoy(){	var d = new Date();	document.frm_reserva.DIA_HOY.value= d.getDate();	if ( document.frm_reserva.DIA_HOY.value < 10)	{		document.frm_reserva.DIA_HOY.value = "0" +  document.frm_reserva.DIA_HOY.value	}  	document.frm_reserva.MES_HOY.value= d.getMonth() + 1;	if ( document.frm_reserva.MES_HOY.value < 10)	{		document.frm_reserva.MES_HOY.value = "0" +  document.frm_reserva.MES_HOY.value	}	document.frm_reserva.ANO_HOY.value= d.getFullYear();	document.frm_reserva.DIA_RESERVA.value =  document.frm_reserva.DIA_HOY.value;	document.frm_reserva.MES_RESERVA.value =  document.frm_reserva.MES_HOY.value;  	for ( i= document.frm_reserva.ANO_RESERVA.length;i >= 0 ; i--)	{		document.frm_reserva.ANO_RESERVA.options[i] = null ;		}	for ( i=0;i <= 3 ; i++)	{		document.frm_reserva.ANO_RESERVA.options[i] = new Option(parseInt( document.frm_reserva.ANO_HOY.value) + i, parseInt( document.frm_reserva.ANO_HOY.value) + i, false, false) ;	}  	document.frm_reserva.ANO_RESERVA.value =  document.frm_reserva.ANO_HOY.value;	document.frm_reserva.HORA_ACTUAL.value = d.getHours();  	document.frm_reserva.MINUTOS_ACTUAL.value = d.getMinutes();  }          function carga_localidad(){var a;var indice = 1;  for ( i=1;i <= contador ; i++)  {      document.frm_reserva.loc1_1.options[i] = null ;      document.frm_reserva.Calle.options[i] = null ;  }var repes = "";  for ( i=1;i <= contador ; i++)  {     if (document.frm_reserva.Provincia.value == provincia[i])     {      if (localidad[i] != repes)      {              document.frm_reserva.loc1_1.options[indice] = new Option(localidad[i], localidad[i], false, false) ;       indice ++ ;       repes = localidad[i];       }         }  } }function carga_calle(){var a;var indice = 1;  for ( i=1;i <= contador ; i++)  {      document.frm_reserva.Calle.options[i] = null ;  }var repes = "";  for ( i=1;i <= contador ; i++)  {                if (document.frm_reserva.loc1_1.value == localidad[i])     {      if (calle[i] != repes)      {              document.frm_reserva.Calle.options[indice] = new Option(calle[i], calle[i], false, false) ;       indice ++ ;       repes = calle[i];       }                   }    }  }function carga_telefono(){  for ( i=1;i <= contador ; i++)  {         if (document.frm_reserva.Calle.value == calle[i])     {       document.frm_reserva.telefonoRest.value = telefono[i]       document.frm_reserva.loc2_1.value = loc2[i]            }    }  }//amarillas.miarea.despaol.intratpi.com//var u = "http://www.paginasamarillas.es/functions/rutas_www2.asp";function popupRuta(empresa,loca,tv,call,nume,tipo){  //var u = "http://www.paginasamarillas.es/comoir.asp";  //var u = "http://tpiprod.despaol.intratpi.com/sites/SRVRPAGS/howgo.asp";  //var u = "http://www2.despaol.intratpi.com/sites/SRVRPAGS/howgo.asp";  var u = "http://www2.paginasamarillas.es/sites/SRVRPAGS/howgo.asp";  u    += "?empresa="  + escape(empresa);  u    += "&loca="  + escape(loca);  u    += "&tv="  + escape(tv);  u    += "&call="  + escape(call);  u    += "&nume="  + nume;  u    += "&tipo="  + tipo; // C=Coche, P=A Pie    window.open(u,"popupRutas","width=380,height=350,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");}function popupsms(nom,loca,dire,sms,tfno,cp){  //var u = "http://www.paginasamarillas.es/comoir.asp";  //var u = "http://tpiprod.despaol.intratpi.com/sites/SRVRPAGS/howgo.asp";  //var u = "http://www2.despaol.intratpi.com/sites/SRVRPAGS/howgo.asp";  idioma = obteneridioma();       var u = "/srvrpags/popup_sms.asp";  u    += "?nom="  + escape(nom);  u    += "&loca="  + escape(loca);  u    += "&dire="  + escape(dire);  u    += "&sms="  + escape(sms);  u    += "&tfno="  + tfno;  u    += "&cp="  + cp;    u    += idioma;  window.open(u,"popupRutas","scrollbars=no,width=440,height=320");  }   function suma (objeto,resultado,tabla,columna)    {    	 var total = 0;  	 if ((isNaN(objeto.value))||(objeto.value==" ")||(objeto.value==""))     	    {              alert ('el valor tiene que ser numerico');               objeto.select()//value =""//window.prompt("Tiene que ser numérico", "");                 objeto.focus()               }         else            {        	                        	      v=document.getElementById(resultado);    	                	      var frm = document.forms[0]; 				      num_elementos=frm.elements.length;	      	      for (i=0;i<num_elementos;i++)	      		{		  if ((frm.elements[i].name.indexOf(tabla) != -1) && (frm.elements[i].name.substr(0,1) == columna))		  {		   if (frm.elements[i].value == "")		     {		       		       frm.elements[i].value=0		     }  		   		   total = parseInt(total) + parseFloat(frm.elements[i].value)		   //alert("¿suma?: " + total);   	   		  }		  		}		//alert("en suma v.value :" + v.value);  		v.value = total	    }		    	    	 //alert("en suma objeto.value: " + objeto.value);   	      }function keyDown(e,objeto,resultado,tabla,columna) {if (document.layers) {var nKey=e.which; var ieKey=0}if (document.all) {var ieKey=event.keyCode; var nKey=0}//alert("nKey:"+nKey+" ieKey:" + ieKey)if ((nKey == "13") || (ieKey == "13")){  /*alert("en keydown  " + objeto.name);   	  suma(objeto,resultado,tabla,columna);*/  objeto.blur()  } }//document.onkeydown = keyDown//if (document.layers) document.captureEvents(Event.KEYDOWN)function pulsar(objeto,resultado,tabla,columna){	   if (document.all) {/* 	alert("en pulsar, document   " + objeto.value);    	alert("en pulsar, resultado   " + resultado);    	alert("en pulsar, tabla   " + tabla);  	alert("en pulsar, columna   " + columna); */  keyDown(document.onkeydown,objeto,resultado,tabla,columna) } else {  //alert("en pulsar, layer" + objeto.value);   	  document.onkeydown = keyDown  if (document.layers)     document.captureEvents(Event.KEYDOWN,objeto,resultado,tabla,columna) } //alert("en pulsar objeto.value" + objeto.value); } function pone_principio_fin_fila() {  cadena="</tr><tr>";   return cadena; }function imagenes()  {   if (window.location.href.toLowerCase().indexOf('color') != -1)    {	     if (document.getElementsByTagName("link")[0].getAttribute("href").indexOf("styles") != -1)      {			 split_style = document.getElementsByTagName("link")[0].getAttribute("href").split("/")			 color_plantilla = split_style[1]			 			}			else 			{			 alert('falta hoja de estilos')			}         		     final1 = ""	   if (window.location.href.toLowerCase().substr((window.location.href.toLowerCase().indexOf('color') + 6),window.location.href.length).indexOf('&') != -1)	    {	 	      final1 =	window.location.href.toLowerCase().substr((window.location.href.toLowerCase().indexOf('color') + 6),window.location.href.length).indexOf('&')	      	    }  	   else	   	{	   		final1 =	(window.location.href.length)	   	}		   color = window.location.href.toLowerCase().substr((window.location.href.toLowerCase().indexOf('color') + 6),final1)	   if (color != color_plantilla)	   {			 if (document.getElementsByTagName("link")[0].getAttribute("href").indexOf("styles") != -1)				{				 split_style = document.getElementsByTagName("link")[0].getAttribute("href").split("/")				 document.getElementsByTagName("link")[0].href = "styles/" + color + "/" + split_style[2]				 alert("styles/" + color + "/" + split_style[2])				}				else 				{				 alert('falta hoja de estilos')				}   			 for (i=0;i<document.images.length;i++)				{				 split_src = document.images[i].src.replace("http://" + location.hostname + "/sites/","").split("/")				 switch (split_src.length)				  {				   case 3:				    document.images[i].src = "http://" + location.hostname + "/sites/" + color + "/" + plan + "/" + split_src[2]				    break;				   case 4:				    document.images[i].src = "http://" + location.hostname + "/sites/" + color + "/" + plan + "/" + split_src[2] + "/" + split_src[3]				    break; 				    //alert(document.images[i].src)				   default:				    break;				  } 				}										var els = document.all?document.all:document.getElementsByTagName("*");				for(var i=0;i<els.length; i++)			     				 {			        					if(els[i].getAttribute("background"))					 {			         					  cadena=els[i].getAttribute("background");			           					  els[i].setAttribute("background",color + "/" + plan + "/" + cadena.substr(cadena.lastIndexOf('/') + 1,cadena.length));					 }					}			}			 }		  }        		  	  function popupficha(ctficha,pathficha)	    {	      	if (datos == "")	      	   {	      		union = "?homf=" + pathficha + "&tp=IP"	      			      	   }	         else	         	{	         		union = datos + "&homf=" + pathficha + "&tp=IP"	         	}	    		    if (ctficha == "TIE")	      {			URLGis="http://calleacalle.paginasamarillas.es/ficha.jsp" + union	+ "&site=tiendas"					var nuevaVentana=window.open(URLGis,"nuevaVentana");	      }	  	//document.location = URLGis;	    }	    	    	    function obtener_valor(variable) {	var remplaza = /\+/gi; 	var url = window.location.href;	url = unescape(url);	url = url.replace(remplaza, " ");	url = url.toUpperCase();	 	var variable_may = variable.toUpperCase();	var variable_pos = url.indexOf(variable_may);	if (variable_pos != -1) 	{		var pos_separador = url.indexOf("&", variable_pos);		if (pos_separador != -1) 		{			return url.substring(variable_pos + variable_may.length + 1, pos_separador);		} else { 			return url.substring(variable_pos + variable_may.length + 1, url.length);		}	} else {return null;	}}