var n = Math.round(Math.random()*10000000000000000);var flasher = false;function MakeArray(n) {	this.length = n	return this}monthNames = new MakeArray(12)monthNames[1] = "01"monthNames[2] = "02"monthNames[3] = "03"monthNames[4] = "04"monthNames[5] = "05"monthNames[6] = "06"monthNames[7] = "07"monthNames[8] = "08"monthNames[9] = "09"monthNames[10] = "10"monthNames[11] = "11"monthNames[12] = "12"dayNames = new MakeArray(7)dayNames[1] = "Sunday"dayNames[2] = "Monday"dayNames[3] = "Tuesday"dayNames[4] = "Wednesday"dayNames[5] = "Thursday"dayNames[6] = "Friday"dayNames[7] = "Saturday" var timeX = new Date();  randnum= (timeX.getTime());function enlace_doubleclick() {    	document.write ('<SCR'+'IPT language="JavaScript" SRC="http://ad.es.doubleclick.net/adj/saludalia.eresmas.com/resto;sz=468x60;ord=' + randnum + '?">');	document.write ('document.write(\'<A HREF="http://ad.es.doubleclick.net/jump/saludalia.eresmas.com/resto;abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4;sz=468x60;ord=' + randnum + '?" target="_blank">\');');	document.write ('document.write(\'<IMG SRC="http://ad.es.doubleclick.net/ad/saludalia.eresmas.com/resto;abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4;sz=468x60;ord=' + randnum + '?" border=0 width="468" height="60"></A>\');</SCR'+'IPT>');	document.write ('<NOSCRIPT><A HREF="http://ad.es.doubleclick.net/jump/saludalia.eresmas.com/resto;sz=468x60;ord=3217232?" target="_blank"><IMG SRC="http://ad.es.doubleclick.net/ad/saludalia.eresmas.com/resto;sz=468x60;ord=3217232?" border=0 width="468" height="60"></A></NOSCRIPT>');  // alert("El numero generado es: " + n)}function enlace_doubleclick_2() {;}function enlace_doubleclick_home() {   	document.write ('<SCR'+'IPT language="JavaScript" SRC="http://ad.es.doubleclick.net/adj/saludalia.eresmas.com/home;sz=468x60;ord=' + randnum + '?">');	document.write ('document.write(\'<A HREF="http://ad.es.doubleclick.net/jump/saludalia.eresmas.com/home;abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4;sz=468x60;ord=' + randnum + '?" target="_blank">\');');	document.write ('document.write(\'<IMG SRC="http://ad.es.doubleclick.net/ad/saludalia.eresmas.com/home;abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4;sz=468x60;ord=' + randnum + '?" border=0 width="468" height="60"></A>\');</SCR'+'IPT>');   document.write ('<NOSCRIPT><A HREF="http://ad.es.doubleclick.net/jump/saludalia.eresmas.com/home;sz=468x60;ord=5283408?" target="_blank"><IMG SRC="http://ad.es.doubleclick.net/ad/saludalia.eresmas.com/home;sz=468x60;ord=5283408?" border=0 width="468" height="60"></A></NOSCRIPT>');  // alert("El numero generado es: " + n)}function enlace_doubleclick_home_2() {;}function time() {  var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;  var map = InternetExplorer ? clocka : document.embeds[1];  var today=new Date();  var theDay=dayNames[today.getDay() + 1]  var theDate=today.getDate()   var theMonth = monthNames[today.getMonth() + 1]  var year=today.getFullYear()  var min=today.getMinutes()  var hr=today.getHours()  var theTime = "" + ((hr> 12) ? hr - 12 : hr)  theTime += ((min < 10) ? ":0" : ":") + min  theTime  += (hr >= 12) ? " pm" : " am"  theTime += ((flasher) ? " " : "*")  flasher = !flasher  map.SetVariable('theTime', theTime)  map.SetVariable('date', theDate)  map.SetVariable('fminutes', min)  map.SetVariable('fhours', hr)  map.SetVariable('fday', theDay)  map.SetVariable('fmonth', theMonth)  map.SetVariable('fyear', year)  timerID=setTimeout("time()",1000)} function pop_up() { //v1.0  window.open("/Saludalia/web_saludalia/eventos/vichy5/popup5.htm","Vichy","status=no,scrollbars=no,resizable=no,width=300,height=400,top=200,left=200,screenX=268,screenY=215");  //window.open("http://www.saludalia.com/Saludalia/web_saludalia/swf/sello.html","pop_up","status=no,scrollbars=no,resizable=no,width=250,height=120,top=235,left=288,screenX=268,screenY=215");}function MM_openIdWindow(theURL,winName,features) { //v2.0  window.name = "browser";    // código para salto a parte privada desde buscador Autonomy  var out="";    if ( theURL.indexOf("/cgi/NacomKnowServer.exe") != -1 ) {    for (i = 0; i < theURL.length; i++) {      if ( theURL.charAt(i) == "?" ) {        out += "¿";      }else if ( theURL.charAt(i) == "&" ) {        out += "@";      }else if ( theURL.charAt(i) == "#" ) {        out += "$";      }else {      	out += theURL.charAt(i);      }    }// fin for    theURL = out;  }  theURL = "/Saludalia/servlets/registro/identificar.jsp?url=" + theURL + "&winName=" + winName + "&features=" + features;  document.location.href = theURL;  }function enviar(theURL,winName,features) {    theURL=theURL+"?"+document.URL;  window.open(theURL,winName,features);}function enviar_sello(theURL) {    theURL=theURL+"?"+document.URL;  window.open(theURL,"","status=no,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=650,height=350,top=235,left=288,screenX=268,screenY=215");}function enviar_encuesta(theURL,winName,features) {  var pos = "";var sURL = "";var sSep = "?pregunta";sURL = document.URL;  pos = sURL.indexOf(sSep);   if (pos !=-1){               theURL=theURL+"?"+document.URL;         }else{        theURL=theURL+"?"+document.URL+"?pregunta=P164";   }   window.open(theURL,winName,features);}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}function mandar() { //v3.0if ((document.encuesta.P187[1].checked)||(document.encuesta.P187[0].checked))	{ document.encuesta.submit()}else   	{alert('Para votar hay que seleccionar una respuesta')}}function ver_resultado(){document.encuesta.P187[0].checked=false;document.encuesta.P187[1].checked=false;document.encuesta.submit();}function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v3.0  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function openFullscreen(page, winName) {  var yes = 1;  var no = 0;    var menubar = no;       // The File, Edit, View Menus  var scrollbars = yes;   // Horizontal and vertical scrollbars  var locationbar = no;   // The location box with the site URL  var directories = no;   // the "What's New", "What Cool" links  var resizable = yes;    // Can the window be resized?  var statusbar = no;     // Status bar (with "Document: Done")  var toolbar = no;       // Back, Forward, Home, Stop toolbar    windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height) + ",top=0,left=0";    windowprops += (menubar ? ",menubars" : "") +                 (scrollbars ? ",scrollbars" : "") +                 (locationbar ? ",location" : "") +                 (directories ? ",directories" : "") +                 (resizable ? ",resizable" : "") +                 (statusbar ? ",status" : "") +                 (toolbar ? ",toolbar" : "");    window.open(page, winName, windowprops);}//----------------------------------// Valores de configuracion//----------------------------------var valorCookie="nameUser"; //-->nombre de la cookie que queremos mostrarvar urlAcceso="/Saludalia/servlets/acceso/acceso.jsp"; //--> url del jsp de acceso//-----------------------------------// Funciones para recuperar la cookie//-----------------------------------function getCookieVal (offset) {  var endstr = document.cookie.indexOf (";", offset);  if (endstr == -1)    endstr = document.cookie.length;  return unescape(document.cookie.substring(offset, endstr));}function GetCookie (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;}var ventana=null;function DejarLogs2(log,ir){	document.frm.logs.src=log;    if (ir!='') {		ventana=window.open(ir,'ventana');		ventana.focus();   }}//-----------------------------------// Funcion que construye el enlace //-----------------------------------function putAccess(){	var url=document.location;	var usuario=GetCookie(valorCookie);	if (usuario == null)	{		var azaroso = Math.round(Math.random()*1000000000);		usuario = "$" + azaroso;		creaCookie(valorCookie,usuario,'11950');	}	var parametrosAccess=usuario+","+url;	document.write("<LAYER SRC='"+urlAcceso+"?access="+parametrosAccess+"' WIDTH=0 HEIGHT=0 CLIP='0,0,0,0'></LAYER>");	document.write("<DIV ID='acceso'>");	document.write("<IFRAME SRC='"+urlAcceso+"?access="+parametrosAccess+"' WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=No></IFRAME></DIV>");}                      //-----------------------------------// Funciones para starmedia - relacionadas con la cabecera y el pie//-----------------------------------var ns4=document.layers?true:false;function createLayersStarmedia(){	if (ns4)	{		document.write ('<layer id="capa1" visibility="hidden" width="100%" height="100%" onload="moveToAbsolute(layer1.pageX,layer1.pageY);clip.width=780;clip.height=100;visibility=\'show\';"></layer>');		document.write ('<layer id="capa2" visibility="hidden" width="100%" height="100%" onload="moveToAbsolute(layer2.pageX,layer2.pageY);clip.width=780;clip.height=100;visibility=\'show\';"></layer>');	}}function loadLayersStarmedia(){	if (ns4)	{		document.layers['capa1'].onload = function (evt){document.layers['capa2'].src='http://www.saludalia.com/saludaliaNuevo/interior/iframe/inferior.html'};		document.layers['capa1'].src='http://www.saludalia.com/saludaliaNuevo/interior/iframe/superior.html';	}	else	{		document.all.frame1.src='http://www.saludalia.com/saludaliaNuevo/interior/iframe/superior.html';		document.all.frame2.src='http://www.saludalia.com/saludaliaNuevo/interior/iframe/inferior.html';	}}// cookie 	function creaCookie(name,value,days) {	if (days) {		var date = new Date();		date.setTime(date.getTime()+(days*24*60*60*1000))		//date.setTime(date.getTime()+(60000))		var expires = "; expires="+date.toGMTString()	}	else expires = ""	document.cookie = name+"="+value+expires+"; path=/"	//alert ("creada cookie");}  function leeCookie(name) {var nameEQ = name + "="	var ca = document.cookie.split(';')	for(var i=0;i<ca.length;i++) {		var c = ca[i];		while (c.charAt(0)==' ') c = c.substring(1,c.length)		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length)	}	return null}			