   var LastColor;
   var LastClick="";
   var iTimeOut = 0;
   var _url_search = "";
   
function getWaiter(simage){return "<table style='width:100%;height:100%;'><tr><td align='center' valign='middle'><img src='" + simage + "' border='0'></td></tr></table>";} 
function AjaxExec(surl,sdata){return $.ajax({type:'POST',dataType:"application/x-www-form-urlencoded",async:false,url:surl,data:sdata}).responseText;}
function AjaxSimpleSync(starget,surl,sdata){$(starget).html($.ajax({type:'POST',dataType:"application/x-www-form-urlencoded",async:false,url:surl,data:sdata}).responseText);}
function AjaxSimpleASync(iwait,starget,surl,sdata){if(iwait!=''){$(starget).html(getWaiter(iwait));}$.ajax({type:'POST',dataType:"application/x-www-form-urlencoded",async:true,url:surl,data:sdata,success: function(data){$(starget).html(data);}});}

    function DisplayNone(sObj)
       {
          try
          {
             var oobj = attach(sObj);   
             oobj.style.display='none';
          }
          catch(e){}
       }

    function DisplayBlock(sObj)
       {
          try
          {
              var oobj = attach(sObj);   
              oobj.style.display='block';
          }
          catch(e){}
       }

   function SetInner(msgFrame,sText)
      {
         var oObj=attach(msgFrame);
         oObj.innerText=sText;
      };

   function GoSorted(iAdmin)
      {
         with (window.document)
            {
               sURL=(consSiteURL3+'admin=' + iAdmin);
               sURL=urlencodefull(sURL+'&orden=' + frmStatus.cboOrden.value);
               frmStatus.action=sURL;
               frmStatus.submit();
            }
      }

   function DoMapa(vId,vIdioma)
      {
         window.document.ZoneILocal.target='_blank';
         window.document.ZoneILocal.action='DialogMapaPrestacion.asp?id='+vId+'&idioma='+vIdioma;
         window.document.ZoneILocal.submit();
      }

   function ColorObj(id,vColor)
      {
         try
         {
             var temp_Obj;
             temp_Obj = attach(id);
             if (LastClick!="")
                {
                   if(ns4) 
                      {
                         LastClick.backgroundColor = LastColor;
                      }
                   else
                      {
                         LastClick.style.backgroundColor = LastColor;
                      }
                }
             LastClick=temp_Obj;
             if(ns4) 
                {
                   LastColor = temp_Obj.backgroundColor;
                   temp_Obj.backgroundColor = vColor;
                }
             else
                {
                   LastColor = temp_Obj.style.backgroundColor;
                   temp_Obj.style.backgroundColor = vColor;
                }
          } catch(er){}
      }

   function right(e) {
	if (navigator.appName == 'Netscape' && 
	(e.which == 3 || e.which == 2))
	return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' && 
	(event.button == 2 || event.button == 3)) {
	alert("Sorry, you can't right click here...");
	return false;
	}
	return true;
   }

   function urlencodefull(text) 
      {
         text= text.replace(/ /g,"%20");
         return text;
      }

   function GoLanguage(iLang)
      {  
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteIDURL+iLang);
               Menu.action=sURL;
               Menu.submit();
            }
      }

   function GoLanguageX()
      {  
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteIDURL+iLang);
               Menu.action=sURL;
               Menu.submit();
            }
      }

   function GoSingleFile(iFile)
      {
         with (window.document)
            {
               var i;
			   iZon=ZoneIndex.cboZonaHome2.options[ZoneIndex.cboZonaHome2.selectedIndex].value;
               iLoc=ZoneIndex.cboLocalidadHome2.options[ZoneIndex.cboLocalidadHome2.selectedIndex].value;
               iLang=MenuR.lsidioma.value;
			   for (i=0;i<ZoneIndex.service2.length;i++){ 
       				if (ZoneIndex.service2[i].checked){
						iApp=ZoneIndex.service2[i].value;
          				break;
					}
    			}
               sURL=urlencodefull(consSiteURL4+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion=-6&SingleFile='+iFile);
               ZoneIndex.action=urlencodefull(sURL);
               ZoneIndex.submit();
            }
      }
	  
	
   function GoSingleFileMenu(iFile)
      {
         with (window.document)
            {
               var i;
//			   iZon=MenuR_S.cboZona.options[MenuR_S.cboZona.selectedIndex].value;
//               iLoc=MenuR_S.cboLocalidad.options[MenuR_S.cboLocalidad.selectedIndex].value;
//               iLang=MenuR.lsidioma.value;
//			   iApp=MenuR_S.cboApp.options[MenuR_S.cboApp.selectedIndex].value;
//               sURL=urlencodefull(consSiteURL4+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion=-6&SingleFile='+iFile);
//               MenuR_S.action=urlencodefull(sURL);
//               MenuR_S.submit();
			}
	  }
   
   function GoIndexCaseFlag(iSecc,iCase)
      {
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteURL3+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc+'&caseflag='+iCase);
               Menu.action=sURL;
               Menu.submit();
            }
      }

   function GoIndexCaseFlagSSL(iSecc,iCase)
      {
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSSLSiteURL+'&idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc+'&caseflag='+iCase);
               Menu.action=sURL;
               Menu.submit();
            }
      }

   function GoIndexCaseFlagILocal(iSecc,iCase)
      {
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteURL3+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc+'&caseflag='+iCase);
               ZoneILocal.action=sURL;
               ZoneILocal.submit();
            }
      }

   function GoIndex(iSecc)
      {
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteURL2+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc);
               Menu.action=sURL;
               Menu.submit();
            }
      }
      
   function GoRegistration(iNewUserType,iCaseFlag)
      {
         with (window.document)
            {
               iZon=MenuR_S.cboZona.options[MenuR_S.cboZona.selectedIndex].value;
               iLoc=MenuR_S.cboLocalidad.options[MenuR_S.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.value;
               iApp=1;//Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=urlencodefull(consSiteURL4+consUserInfo+'&NewUserType='+iNewUserType+'&App='+iApp+'&idioma='+iLang+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion=-7&caseflag='+iCaseFlag);
               MenuR_S.action=sURL;
               MenuR_S.submit();
            }
      }

   function GoReserveAnyForm(iSecc,iGroup,vcboZona,vcboLocalidad)
      {
         with (window.document)
            {
               iZon=vcboZona.options[vcboZona.selectedIndex].value;
               iLoc=vcboLocalidad.options[vcboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               if (iGroup==888)
                  {
                     iSecc=888;
                  }
               if (iGroup==-1)
                  {
                     iSecc=-1;
                  }
               if (iGroup==-4)
                  {
                     iSecc=-4;
                  }
               if (iGroup==-5)
                  {
                     iSecc=-5;
                  }
               if (iGroup==-9)
                  {
                     iSecc=-9;
                     if (iLang==1)
                        {
                           iLangDir='spanish';
                        }
                     if (iLang==2)
                        {
                           iLangDir='portuguesse';
                        }
                     if (iLang==3)
                        {
                           iLangDir='english';
                        }
                     GoSingleFile('html/'+iLangDir+'/id_country_'+iZon+'/id_zone_'+iLoc+'/valores.asp');
                     return;
                  }
               
               switch (iGroup)
                  {
                     case '0':
                        mvarTemp=consSiteURL1;
                        break;
                     case '2':
                        mvarTemp=consSiteURL3;
                        break;
                     case '4':
                        mvarTemp=consSiteURL2;
                        break;
                     case '9':
                        mvarTemp=consSiteURL3;
                        break;
                     case '-1':
                        mvarTemp=consSiteURL2;
                        break;
                     case '-2':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-4':
                        mvarTemp=consSiteURL2;
                        break;
                     case '-5':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-6':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-7':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-8':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-9':
                        mvarTemp=consSiteURL4;
                        break;
                     case '888':
                        mvarTemp=consSiteURL4;
                        break;
                     default:
                        mvarTemp=consSiteURL1;
                        break;
                  }
               iApp=iSecc;
               sURL=urlencodefull(mvarTemp+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGroup+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc);
               Menu.action=sURL;
               Menu.submit();
            }
      }

   function GoReserve(iSecc,iGroup)
      {
         with (window.document)
            {
               iZon=ZoneIndex.cboZonaHome1.options[ZoneIndex.cboZonaHome1.selectedIndex].value;
               iLoc=ZoneIndex.cboLocalidadHome1.options[ZoneIndex.cboLocalidadHome1.selectedIndex].value;
               iLang=MenuR.lsidioma.value;
//               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
		 	   iApp=iGroup;
				if ((iZon!=0 && iLoc!=0 && iApp!=0) && (iZon!='' && iLoc!='' && iApp!=''))			   
			   	//if (iZon!=0 && iLoc!=0) 
				{
               	if (iGroup==888)
                  {
                     iSecc=888;
                  }
               	if (iGroup==-1)
                  {
                     iSecc=-1;
                  }
               	if (iGroup==-4)
                  {
                     iSecc=-4;
                  }
               	if (iGroup==-5)
                  {
                     iSecc=-5;
                  }
               	if (iGroup==-9)
                  {
                     iSecc=-9;
                     if (iLang==1)
                        {
                           iLangDir='spanish';
                        }
                     if (iLang==2)
                        {
                           iLangDir='portuguesse';
                        }
                     if (iLang==3)
                        {
                           iLangDir='english';
                        }
                     GoSingleFile('html/'+iLangDir+'/id_country_'+iZon+'/id_zone_'+iLoc+'/valores.asp');
                     return;
                  }
               
               	switch (iGroup)
                  {
                     case '0':
                        mvarTemp=consSiteURL1;
                        break;
                     case '2':
                        mvarTemp=consSiteURL3;
                        break;
                     case '4':
                        mvarTemp=consSiteURL2;
                        break;
                     case '9':
                        mvarTemp=consSiteURL3;
                        break;
                     case '-1':
                        mvarTemp=consSiteURL2;
                        break;
                     case '-2':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-4':
                        mvarTemp=consSiteURL2;
                        break;
                     case '-5':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-6':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-7':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-8':
                        mvarTemp=consSiteURL4;
                        break;
                     case '-9':
                        mvarTemp=consSiteURL4;
                        break;
                     case '888':
                        mvarTemp=consSiteURL4;
                        break;
                     default:
                        mvarTemp=consSiteURL1;
                        break;
                  }
               sURL=urlencodefull(mvarTemp+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGroup+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc);
               ZoneIndex.action=sURL;
               ZoneIndex.submit();
			   }
			   else
			{
				var Message='';
				switch (iLang)
				{
					case '1': 
					Message='Debes seleccionar País y Destino';
					break;
					case '2': 
					Message='Você deve escolher um destino e País';
					break;							
					case '3': 
					Message='You must select a country and Destination';
					break;
					default:
					Message='Debes seleccionar País y Destino';
					break;
				}
				alert(Message);
			}
            }
      }
      
	function GoTravel(iSecc)
	{
		with (window.document)
		{
			var tipo;
			if (iSecc==-3)
			{
				tipo=1;
			}
			else
			{
				tipo=2;
				iSecc=-3;
			}
			iLang=MenuR.lsidioma.value;
			if (tipo==1)
			{
				var i;
				iZon=ZoneIndex.cboZonaHome2.options[ZoneIndex.cboZonaHome2.selectedIndex].value;
				iLoc=ZoneIndex.cboLocalidadHome2.options[ZoneIndex.cboLocalidadHome2.selectedIndex].value;
			
				for (i=0;i<ZoneIndex.service2.length;i++)
				{ 
					if (ZoneIndex.service2[i].checked)
					{
						iGroup=ZoneIndex.service2[i].value;
						break;
					}
				}
			    //iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value; // ESTO ESTABA COMENTADO
			}
			else
			{
				iZon=MenuR_S.cboZona.options[MenuR_S.cboZona.selectedIndex].value;
				iLoc=MenuR_S.cboLocalidad.options[MenuR_S.cboLocalidad.selectedIndex].value;
				iGroup=MenuR_S.cboApp.options[MenuR_S.cboApp.selectedIndex].value;					
			}
			iApp=iGroup;
			//alert(iApp);
			if ((iZon!=0 && iLoc!=0 && iApp!=0) && (iZon!='' && iLoc!='' && iApp!=''))
			{
				if (iGroup==888)
				{
					iSecc=888;
				}
				if (iGroup==-1)
				{
					iSecc=-1;
				}
				if (iGroup==-4)
				{
					iSecc=-4;
				}
				if (iGroup==-5)
				{
					iSecc=-5;
				}
				if (iGroup==-9)
				{
					iSecc=-9;
					if (iLang==1)
					{
						iLangDir='spanish';
					}
					if (iLang==2)
					{
						iLangDir='portuguesse';
					}
					if (iLang==3)
					{
						iLangDir='english';
					}
					if (tipo==1)
					{
						GoSingleFile('html/'+iLangDir+'/id_country_'+iZon+'/id_zone_'+iLoc+'/valores.asp');
					}
					else
					{
						GoSingleFileMenu('html/'+iLangDir+'/id_country_'+iZon+'/id_zone_'+iLoc+'/valores.asp');
					}
					return;
				}
			
				switch (iGroup)
				{
					case '0':
					mvarTemp=consSiteURL1;
					break;
					case '2':
					mvarTemp=consSiteURL3;
					break;
					case '4':
					mvarTemp=consSiteURL2;
					break;
					case '9':
					mvarTemp=consSiteURL3;
					break;
					case '-1':
					mvarTemp=consSiteURL2;
					break;
					case '-2':
					mvarTemp=consSiteURL4;
					break;
					case '-4':
					mvarTemp=consSiteURL2;
					break;
					case '-5':
					mvarTemp=consSiteURL4;
					break;
					case '-6':
					mvarTemp=consSiteURL4;
					break;
					case '-7':
					mvarTemp=consSiteURL4;
					break;
					case '-8':
					mvarTemp=consSiteURL4;
					break;
					case '-9':
					mvarTemp=consSiteURL4;
					break;
					case '888':
					mvarTemp=consSiteURL4;
					break;
					default:
					mvarTemp=consSiteURL1;
					break;
				}
				sURL=urlencodefull(mvarTemp+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGroup+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc);
				if (tipo==1)
				{
					ZoneIndex.action=sURL;
					ZoneIndex.submit();
				}
				else
				{
					MenuR_S.action=sURL;
					MenuR_S.submit();	   
				}
			}
			else
			{
				var Message='';
				switch (iLang)
				{
					case '1': 
					Message='Debes seleccionar País y Destino';
					break;
					case '2': 
					Message='Você deve escolher um destino e País';
					break;							
					case '3': 
					Message='You must select a country and Destination';
					break;
					default:
					Message='Debes seleccionar País y Destino';
					break;
				}
				alert(Message);
			}
		}
	}
	
   function GoZoneSections(iCaseFlag)
      {
         with (window.document)
            {
               iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
               iLoc=Menu.cboLocalidad.options[Menu.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
               iApp=Menu.cboApp.options[Menu.cboApp.selectedIndex].value;
               sURL=(consSiteURL2+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion=-2');
               sURL=urlencodefull(sURL+'&caseflag='+iCaseFlag);
               Menu.action=sURL;
               Menu.submit();
            }
      }

     function GoLog(user,pass)
       {
		 with (window.document)
            {
               //iZon=MenuR_S.cboZona.options[MenuR_S.cboZona.selectedIndex].value;
			   //iLoc=MenuR_S.cboLocalidad.options[MenuR_S.cboLocalidad.selectedIndex].value;
               iLang=MenuR.lsidioma.value;
               iApp=1;
               iUser = user;
               iPassword = pass;
			   sURL=urlencodefull(consSiteURL2+consUserInfo+'&DoLog=1&DoUser='+iUser+'&DoPassword='+iPassword+'&App='+iApp+'&idioma='+iLang);
               //alert('sURL: ' +sURL);
			   MenuR.action = sURL;
               //alert('sURL: ' + sURL);
				MenuR.submit();
            }
       }

   function GoLoc(iZone, iLoc)
      {
         with (window.document)
            {
               try
               {
               Menu.cboZona.value=iZone;
               ChangeOptions('cboZona','cboLocalidad','arrLocalidades','Menu.');
               Menu.cboLocalidad.value=iLoc;
               GoIndex(-1);
               }catch(ex){}
            }
      }

   function GoLocLodge(iZone, iLoc, iSecc, iGroup)
      {
         with (window.document)
            {
               try
               {
               Menu.cboZona.value=iZone;
               ChangeOptions('cboZona','cboLocalidad','arrLocalidades','Menu.');
               Menu.cboLocalidad.value=iLoc;
               GoReserve(iSecc,iGroup);                                                            
               }catch(ex){}
            }
      }

   function GoToPageSorted()
      {
         with (window.document)
            {
               try
               {
               iZon=ZoneILocal.cboZona1.value;
               iLoc=ZoneILocal.cboLocalidad1.value;
               iLang=MenuR.lsidioma.value;
               iApp=6;
               sURL=(consSiteURL3+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSeccion);
               sURL=urlencodefull(sURL+'&orden='+ZoneILocal.cboOrden.value);
               ZoneILocal.action=sURL;
               ZoneILocal.submit();
               }catch(ex){}
            }
      }

   function GoToPageSortedPaged(iPage)
      {
         with (window.document)
            {
               iZon=ZoneILocal.cboZona1.value;
               iLoc=ZoneILocal.cboLocalidad1.value;
               iLang=MenuR.lsidioma.value;
               iApp=6;
               sURL=(consSiteURL3+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSeccion);
               sURL=urlencodefull(sURL+'&orden='+ZoneILocal.cboOrden.value+'&PageIndex='+iPage);
               ZoneILocal.action=sURL;
               ZoneILocal.submit();
            }
      }

   function LoadFramePRI(iframerec,ipres,iconsulta,ibegin,imoneda,iColor)
      {
         iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
         mSRC=urlencodefull(consSiteRootPath+'html/neutral/zoneilocal/priceiframe.asp?idioma='+iLang+'&id_prestacion='+ipres+'&consulta='+iconsulta+'&begin='+ibegin+'&id_moneda='+imoneda+'&sbColor='+iColor);
         if (iframerec != '')
            {
               iframerec.src=mSRC;
            }
         else
            {
               return mSRC;
            };
      }

   function LoadFrameMSG(iframerec,ipres,ititle,iservicio,iColor)
      {
         iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
         mSRC=urlencodefull(consSiteRootPath+'html/neutral/zoneilocal/msgiframe.asp?idioma='+iLang+'&id_prestacion='+ipres+'&title='+ititle+'&id_servicio='+iservicio+'&sbColor='+iColor);
         if (iframerec != '')
            {
               iframerec.src=mSRC;
            }
         else
            {
               return mSRC;
            };
      }

   function LoadFramePIC(iframerec,ipres,iColor,tTipoPrest,tZona)
      {  
         iZon=Menu.cboZona.options[Menu.cboZona.selectedIndex].value;
         iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
         mSRC=urlencodefull(consSiteRootPath+'html/neutral/zoneilocal/pictureiframe.asp?zona='+iZon+'&idioma='+iLang+'&id_prestacion='+ipres+'&sbColor='+iColor+'&TipoPrestacion='+tTipoPrest+'&TextoZona='+tZona);
         if (iframerec != '')
            {
               iframerec.src=mSRC;
            }
         else
            {
               return mSRC;
            };
      }

   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 OpenWindow(sURL,sTitle,sWidth,sHeight)
      {
         var str;
         var mvarURL;
         if (sURL.indexOf('dialogmodal')==-1 || sURL.indexOf('DVTEAM')>-1)
            {
               str = "height=" + sHeight + ",innerHeight=" + sHeight + ",width=" + sWidth + ",innerWidth=" + sWidth;
               if (window.screen) 
                  {
                     var ah = screen.availHeight - 50;
                     var aw = screen.availWidth - 10;
                     var xc = (aw - sWidth) / 2;
                     var yc = (ah - sHeight) / 2;
                     str += ",left=" + xc + ",screenX=" + xc;
                     str += ",top=" + yc + ",screenY=" + yc;
                  }
               str+=',dependent=yes,alwaysRaised=yes,scrollbars=no,status=no,resizable=yes,menubar=no';
               mvarURL=urlencodefull(sURL);
               window.open(mvarURL,sTitle,str);
            }
         else
            {
               OpenWindowModal(sURL,sTitle,sWidth,(sHeight+25));
            }
      }

   function OpenWindowModal(sURL,sTitle,sWidth,sHeight)
      {
         var vRet;
         var str;
         var mvarURL;
         str='help:no;status:no;dialogheight:'+ sHeight +'px;dialogwidth:' + sWidth + 'px;scroll:auto';
         mvarURL=urlencodefull(sURL);
         vRet=showModalDialog(mvarURL,0,str);
         return vRet;
      }

   function OpenWindowModalEX(pURL,pTitle,pWidth,pHeight,pConfirm)
      {
         var vRet;
         bOK=true;
         if (pConfirm==true)
            {
               bOK=confirm("Confirma la operación ?");
            }
         if (bOK==true)
            {
               vRet=OpenWindowModal(pURL,pTitle,pWidth,pHeight);
            }
         return vRet;
      }

   function attach(id)
      {
         var obj
         if(ns4) obj = document.layers[id];
         else if(ie4) obj = document.all[id];
         else if(ie5 || ns6) obj = document.getElementById(id);
         LastAttachedObject = obj;
      return obj
   }

   function hide_obj(id)
      {
         temp_Obj = attach(id);
         if(ns4) temp_Obj.visibility = "hide";
         else temp_Obj.style.visibility = "hidden";
      }

   function show_obj(id)
      {
         temp_Obj = attach(id);
         temp_Obj.zIndex=99;
         if(ns4) temp_Obj.visibility = "show";
         else temp_Obj.style.visibility = "visible"
      }

   function AttachObj(id)
      {
         var obj;
         if(NS4) obj = document.layers[id];
         else if(IE4) obj = document.all[id];
         else if(IE5 || NS6) obj = document.getElementById(id);
         return obj;
      }

   function HideObj(id)
      {
         var temp_Obj;
         temp_Obj = AttachObj(id);
         if(NS4) 
            {
               temp_Obj.visibility = "hide";
            }
         else
            {
               temp_Obj.style.visibility = "hidden";
            }
      }

   function ShowObj(id)
      {
         var temp_Obj;
         temp_Obj = AttachObj(id);
         if(NS4) 
            {
               temp_Obj.visibility = "show";
            }
         else
            {
               temp_Obj.style.visibility = "visible";
            }
      }
      
   function GoFirstPage()
      {
         with (window.document)
            {
               try
                  {
                     iLang=MenuR.lsidioma.options[MenuR.lsidioma.selectedIndex].value;
                  }
               catch(e)
                  {
                     iLang=iLangForced;
                  }
               ConfirmReserve_Send.action='http://www.interhabit.com/interhabit/index.asp?ID='+iLang;
               ConfirmReserve_Send.submit();
            }
      }
      
    function CloseForm() 
        {
        self.close();
        }

     function SearchFocus()
         {
            window.document.MenuR.Cadena.focus();
         }

     function GoSeek(i_lang)
        {
         with (window.document)
            {
               vCadena=Menu.Cadena.value;
               if (vCadena=='')
                  {
                     alert(sEmptyBusca);
                  }
               else
                  {
                     sURL=urlencodefull(consSiteIDURL4+'60'+i_lang+'&cadena='+vCadena);
                     Menu.action=sURL;
                     Menu.target='_top';
                     Menu.submit();
                  }
            }
        }
        
     function DoEnter(event)
        {   
           var i=checkEnter(event);
           if (i)
              {
                 GoSeek();
              }
        };

   function ChangeOptions(lstPrimary, lstSecondary, strArray, strForm) 
      {
         try
         {
         var alen = eval(strArray + ".length")
         var listLen = 0;
         var strKey = eval("document." + strForm + lstPrimary + ".options[document." + strForm + lstPrimary + ".selectedIndex].value");
         eval("document." + strForm + lstSecondary + ".options.length = 0");
         for (var i = 0; i < alen; i++) 
            {
               if (eval(strArray + "[i][0] == " + strKey))
                  {
                     eval("document." + strForm + lstSecondary + ".options[listLen] = new Option(" + strArray + "[i][2], " + strArray + "[i][1])");
                     listLen = listLen + 1;
                  }
            }
         if (listLen > 0)
            {
               eval("document." + strForm + lstSecondary + ".options[0].selected = true");
            }
         }catch(ex){}
      }

//   function ChangeOptions2(lstPrimary,lstSecondary,strArray,strForm,bTodos,bNinguno,bOtro) 
      function ChangeOptions2(lstPrimary,lstSecondary,strArray,strForm,bTodos,bNinguno) 
      {
		 var alen=eval(strArray + ".length");
         var listLen=0;
         var strKey=eval("document."+strForm+lstPrimary+".options[document."+strForm+lstPrimary+".selectedIndex].value");
         eval("document."+strForm+lstSecondary+".options.length=0");
         for (var i=0;i<alen;i++) 
            {
               if (eval(strArray+"[i][0]=="+strKey))
                  {
                     eval("document."+strForm+lstSecondary+".options[listLen]=new Option("+strArray+"[i][2], "+strArray+"[i][1])");
                     listLen=(listLen+1);
                  }
            }
        // if (bOtro==true) {eval("document."+strForm+lstSecondary+".options[listLen]=new Option('[Otro]',0)")};
         if (bNinguno==true) {eval("document."+strForm+lstSecondary+".options[listLen]=new Option('[Ninguno]',0)")};		 
         if (bTodos==true) {eval("document."+strForm+lstSecondary+".options[listLen]=new Option('[Todos]',0)")};
         //if (bOtro==true) {eval("document."+strForm+lstSecondary+".value=0")};
		 if (bNinguno==true) {eval("document."+strForm+lstSecondary+".value=0")};
         if (bTodos==true) {eval("document."+strForm+lstSecondary+".value=0")};
         if (bNinguno==false && bTodos==false && listLen>0) {eval("document."+strForm+lstSecondary+".options[0].selected=true")};
		 AddPuntitos(lstSecondary);
		 if (lstPrimary=='id_pais' && lstSecondary=='id_provincia' )
		{
			hide_obj('txtOtraProvincia');
		}
		 
      }

	function GoModal(iLang) 
      {
         OpenWindow('dialogmodal.asp?SQLTypeExec=TRAPLOSTDATA&idioma='+iLang+'&SQL=traplostada','',450,250);
      }

    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;
    }

    function SetCookie (name, value) {
    var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
    }

function isDate(dateStr) {

var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
var matchArray = dateStr.match(datePat); // is the format ok?

if (matchArray == null) {
return false;
}

day = matchArray[1];
month = matchArray[3]; // p@rse date into variables
year = matchArray[5];

if (day < 1 || day > 31) {
return false;
}

if (month < 1 || month > 12) { // check month range
return false;
}

if ((month==4 || month==6 || month==9 || month==11) && day==31) {
return false;
}

if (month == 2) { // check for february 29th
var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
if (day > 29 || (day==29 && !isleap)) {
return false;
}
}
return true; // date is valid
}

   function ValidateToFromDates(fd,fh)
      {
         var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
         var matchArrayD = fd.match(datePat); // is the format ok?
         dayD = matchArrayD[1];
         monthD = matchArrayD[3]; // p@rse date into variables
         yearD = matchArrayD[5];
         var matchArrayH = fh.match(datePat); // is the format ok?
         dayH = matchArrayH[1];
         monthH = matchArrayH[3]; // p@rse date into variables
         yearH = matchArrayH[5];
         var dFD = new Date(yearD,monthD,dayD);
         var dFH = new Date(yearH,monthH,dayH);
         if (dFD>dFH) {return false} else {return true};
      }

   function check_date(field)
      {
         var checkstr = "0123456789";
         var DateField = field;
         var Datevalue = "";
         var DateTemp = "";
         var seperator = "/";
         var day;
         var month;
         var year;
         var leap = 0;
         var err = 0;
         var i;
         err = 0;
         DateValue = DateField.value;
         /* Delete all chars except 0..9 */
         if (DateValue.length==10)
            {
               for (i = 0; i < DateValue.length; i++) 
                  {
	                  if (checkstr.indexOf(DateValue.substr(i,1)) >= 0) {DateTemp = DateTemp + DateValue.substr(i,1)};
                  }
               DateValue = DateTemp;
               /* Always change date to 8 digits - string*/
               /* if year is entered as 2-digit / always assume 20xx */
               if (DateValue.length == 6) {DateValue = DateValue.substr(0,4) + '20' + DateValue.substr(4,2)};
               if (DateValue.length != 8) {err = 19};
               /* year is wrong if year = 0000 */
               year = DateValue.substr(4,4);
               if (year == 0) {err = 20};
               /* Validation of month*/
               month = DateValue.substr(2,2);
               if ((month < 1) || (month > 12)) {err = 21};
               /* Validation of day*/
               day = DateValue.substr(0,2);
               if (day < 1) {err = 22};
               /* Validation leap-year / february / day */
               if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0)) {leap = 1};
               if ((month == 2) && (leap == 1) && (day > 29)) {err = 23};
               if ((month == 2) && (leap != 1) && (day > 28)) {err = 24};
               /* Validation of other months */
               if ((day > 31) && ((month == "01") || (month == "03") || (month == "05") || (month == "07") || (month == "08") || (month == "10") || (month == "12"))) {err = 25};
               if ((day > 30) && ((month == "04") || (month == "06") || (month == "09") || (month == "11"))) {err = 26};
               /* if 00 ist entered, no error, deleting the entry */
               if ((day == 0) && (month == 0) && (year == 00)) {err = 0; day = ""; month = ""; year = ""; seperator = ""};
               /* if no error, write the completed date to Input-Field (e.g. 13.12.2001) */
               if (err == 0) 
                  {
                     DateField.value = day + seperator + month + seperator + year;
                     return true;
                  }
               /* Error-message if err != 0 */
               else 
                  {
                     alert("Fecha incorrecta!");
                     DateField.value='';
                     DateField.select();
	                  DateField.focus();
                     return false;
                  }
            }
      }

   function EvalDates(oDesde,oHasta)
      {
         var bEval=true;
         try
         {
             bEval=check_date(oHasta);
             if (bEval==true)
                {
                   bEval=ValidateToFromDates(oDesde.value,oHasta.value);
                   if (bEval==false)
                      {
                         oDesde.value='';
                         oHasta.value='';
                         oDesde.select();
                         oDesde.focus();
                         alert('La fecha hasta debe ser mayor o igual a la fecha desde');
                      }
                }
          }catch(rex){}
         return bEval;
      }

   function checkMail(x)
      {
	      var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	      if (filter.test(x)) {return true} else {return false};
      }
	  
	function GoModHome (iLang){ 
   			window.open('/interhabit/dialogm.asp?SQLTypeExec=TRAPLOSTDATA&idioma='+iLang+'&SQL=traplostada',"","width=450,height=250,scrollbars=NO") 
		} 
		
	function GoChange (iLang){ 
   		window.open('get_new_password.asp?idioma='+iLang+'',"","width=250,height=400,scrollbars=NO") 
	}
	
	function OpenList (sUrl){
			document.MenuL.action=sUrl;
			document.MenuL.target='blanco'
			document.MenuL.onsubmit=window.open('', 'blanco', "width=450,height=350,scrollbars=YES")
         	document.MenuL.submit();
         	
		} 
		
	function show_Div(sDiv) // recibe el nombre del div como cadena
	{
		var oObj=attach(sDiv);
		oObj.style.overflow='visible';
		oObj.style.height='auto';
		oObj.style.visibility='visible';
	}

	function hide_Div(sDiv) // recibe el nombre del div como cadena
	{
		try
		{
		var oObj=attach(sDiv);
		oObj.style.overflow='hidden';
		oObj.style.height='1px';
		oObj.style.visibility='hidden';
		}catch(rex){}
	}	
		
   function BringTop(oTop,iSecc,iSeccSitio)
	{
		if (iSecc==2 ||iSecc==3 || iSecc==9 || iSecc==10)
		{
			show_Div(oTop);
			switch (iSecc)
			{
				case 2,'2':
						show_Div('divFecha_Hasta');
						show_Div('divAdultos');
						show_Div('divNinos');
						show_Div('divHabitaciones');
						if (iSeccSitio==0)
						{
							hide_Div('selectorExcursion');
							hide_Div('selectorTransfer');
							hide_Div('selectorPaquete');
							show_Div('selectorHoteles');
						}
						else
						{
							show_Div('linkSearch');
						}
					break;
				case 3,'3':
						show_Div('divFecha_Hasta');
						show_Div('divAdultos');
						show_Div('divNinos');
						hide_Div('divHabitaciones');
						if (iSeccSitio==0)
						{
							hide_Div('selectorHoteles');
							hide_Div('selectorExcursion');
							hide_Div('selectorPaquete');
							show_Div('selectorTransfer');
						}
						else
						{
							show_Div('linkSearch');							
						}
						
					break;
				case 9,'9':
						show_Div('divFecha_Hasta');
						show_Div('divAdultos');
						show_Div('divNinos');
						hide_Div('divHabitaciones');

						if (iSeccSitio==0)
						{
							hide_Div('selectorHoteles');
							hide_Div('selectorTransfer');
							hide_Div('selectorPaquete');
							show_Div('selectorExcursion');
						}
						else
						{
							show_Div('linkSearch');							
						}

					break;
				case 10,'10':
						hide_Div('divFecha_Hasta');
						show_Div('divAdultos');
						show_Div('divNinos');
						hide_Div('divHabitaciones');				

						if (iSeccSitio==0)
						{
							hide_Div('selectorHoteles');
							hide_Div('selectorExcursion');
							hide_Div('selectorTransfer');
							show_Div('selectorPaquete');
						}
						else
						{
							show_Div('linkSearch');
						}

					break;
			}
		}
		else
		{
			hide_Div(oTop);
			if (iSeccSitio==1)
			{
				hide_Div('linkSearch');
			}
		}
	}
	
	function CheckData(iSecc,oDesde,oHasta,iHome)
	{
		var fecha;
		var lenFechaDesde=oDesde.value;
		var lenFechaHasta=oHasta.value;
		if (lenFechaDesde.length>0 && lenFechaHasta.length>0)
		{
			fecha=EvalDates(oDesde,oHasta);
		}
		if (fecha==true || lenFechaDesde.length<1 || lenFechaHasta.length<1)
		{
			if (iHome==1)
			{
				GoReserve(-3,iSecc);
			}
			else
			{
				GoTravel(2);			
			}
		}
	}
	
	function MyReservations(sUrl)
		{
			document.Reservas.action=sUrl;
     		document.Reservas.target='_blank';
			document.Reservas.submit()
		}
	function DoGo(sUrl)
	{
		document.location.href=sUrl;

	}
	
	function AddPuntitos(oObjeto)
	{
		var ctrl=attach(oObjeto);
		var nomObj= new Array();// ctrl.options;
		var idObj= new Array();// ctrl.options;	
		var cantidad=ctrl.options.length;
		var opt=ctrl.options;
		var i=0;
		for(i=0; i<cantidad; i++)
		{
			nomObj[i]=opt[i].text;
			idObj[i]=opt[i].value;		
			//document.write (idPais[i] + ' ' + nomPais[i] + '<br>');
		}
		ctrl.options.length = 0;
		var optNull = document.createElement('option');
		optNull.value = -1;
		var texto = document.createTextNode('[...]');
		optNull.appendChild(texto);
		ctrl.appendChild(optNull);
		
		texto='';
		for(i=0; i<cantidad; i++)
		{
			var optReload = document.createElement('option');
			optReload.value = idObj[i];
			texto = document.createTextNode(nomObj[i]);
			optReload.appendChild(texto);
			ctrl.appendChild(optReload);
			//document.write (opt[i].value + ' ' + opt[i].text + '<br>');
		}	
	}

function setKeySeekValue(keycode,oThis,idioma,sTR)
 {
    if (keycode*1==13)
       {
          setClickSeekValue(oThis,idioma,sTR);
       }
 } 

function setClickSeekValue(oThis,idioma,sTR)
 {
    var o1 = attach("auto_popH");
    o1.value=oThis.options[oThis.selectedIndex].value;
    attach("auto_pop").value=oThis.options[oThis.selectedIndex].text
    var o2 = attach("producto_sel");
    if (o2==undefined){var o2 = attach("producto_in_show");}
    _url_search="index.asp?idioma=" + idioma + "&localidad=" + o1.value + "&producto_q=" + o2.value;
   // alert(_url_search);
    SubmitToURL(_url_search,"_top");
    DisplayNone(sTR);
 }

function setSearchButton()
  {
     SubmitToURL(_url_search,"_top");
  }

function seek_form(keycode,_url,_target,tr_seek,iDelay,oTexto,sIdioma)
 {
   var oSearch=attach('auto_pop');
   var ix=findPosX(oSearch);
   var iy=findPosY(oSearch);
   shiftTo(attach('div_sel_box'),ix,iy+23);
    if (oTexto.value.length*1>1)
    {
        if (iTimeOut!=0) 
        {
           window.clearTimeout(iTimeOut);
        }
        if (keycode*1==40)
        {
           window.frames[_target].document.forms['form_seek'].elements[tr_seek+'seek_list'].focus();
           try
           {
           window.frames[_target].document.forms['form_seek'].elements[tr_seek+'seek_list'].selectedIndex=0;
           }catch(ex){}
        }
        else
        {
          if (!window.event.shiftKey & !window.event.ctrlKey & !window.event.altKey)
            {
               if (keycode*1!=9 & keycode*1!=37 & keycode*1!=38 & keycode*1!=39 & keycode*1!=40 & keycode*1!=17 & keycode*1!=80)
               {
                  _url=_url + "?tr=" + tr_seek + "&seek=" + oTexto.value + "&idioma=" + sIdioma
                  iTimeOut=window.setTimeout('SubmitToURL("' + _url + '","' + _target + '");DisplayBlock("' + tr_seek + '");',iDelay); 
               }
            }
        }   
    }    
    else
    {
       DisplayNone(tr_seek);
    }
    if (keycode==-1)
    {
       _url=_url + "?tr=" + tr_seek + "&seek=" + oTexto.value + "&idioma=" + sIdioma
       iTimeOut=window.setTimeout('SubmitToURL("' + _url + '","' + _target + '");DisplayBlock("' + tr_seek + '");',iDelay); 
    }
 }

function SubmitToURL(sUrl,sFrame,sForm)
   {
      try
       {
           window.document.Menu.action= sUrl;
           window.document.Menu.target= sFrame;
           window.document.Menu.submit();
       }catch(ex){}
   }

function calcHeight(sID)
{
  try
     {
        var oH=attach(sID);
        var oW=attach(sID);
        var iH=oH.contentWindow.document.body.scrollHeight;
        var iW=oW.contentWindow.document.body.scrollWidth;
        var oObj=attach(sID);
        oObj.height=iH + 5;
     }
     catch(e) {}
}

   function GoIndexSeeker(iSecc,iCase)
      {
         with (window.document)
            {
               sURL=urlencodefull(consSiteURL3+'idioma='+iLang+'&App='+iApp+'&Grupo='+iGrupo+'&pais='+iZon+'&zona='+iLoc+'&seccion='+iSecc);
               window.document.Menu.action=sURL;
               window.document.Menu.submit();
            }
      }

    function SetService(s_id,s_id_producto,_url_forced,midioma)
    {
        var o1 = attach("auto_popH");
        var o2 = attach("producto_sel");
        if (o2==undefined){var o2 = attach("producto_in_show");}
        var p_original=o2.value;
	    attach('service').value=s_id;
	    o2.value=s_id_producto;
        switch (s_id*1)
           {
              case 2:
                DisplayBlock('tdFechaDesde');
                DisplayBlock('tdFechaHasta');
                DisplayBlock('tdHabitaciones');
                DisplayBlock('tdAdultos');
                DisplayBlock('tdChicos');
                break;
              case 9:
                DisplayBlock('tdFechaDesde');
                DisplayNone('tdFechaHasta');
                DisplayNone('tdHabitaciones');
                DisplayBlock('tdAdultos');
                DisplayBlock('tdChicos');
                break;
              case 3:
                DisplayBlock('tdFechaDesde');
                DisplayBlock('tdFechaHasta');
                DisplayNone('tdHabitaciones');
                DisplayBlock('tdAdultos');
                DisplayBlock('tdChicos');
                break;
              case 10:
                DisplayBlock('tdFechaDesde');
                DisplayBlock('tdFechaHasta');
                DisplayNone('tdHabitaciones');
                DisplayBlock('tdAdultos');
                DisplayBlock('tdChicos');
                break;
              case 11:
                DisplayBlock('tdFechaDesde');
                DisplayBlock('tdFechaHasta');
                DisplayNone('tdHabitaciones');
                DisplayBlock('tdAdultos');
                DisplayBlock('tdChicos');
                break;
              case 12:
                DisplayNone('tdFechaDesde');
                DisplayNone('tdFechaHasta');
                DisplayNone('tdHabitaciones');
                DisplayNone('tdAdultos');
                DisplayNone('tdChicos');
                break;
        }
        var _url="";
        if ((s_id*1)==12) 
        {
           o2.value=0;
           if (_url_forced==""){_url="index.asp?idioma=" + midioma + "&localidad=" + o1.value + "&producto_q=" + o2.value;}else{_url=_url_forced;}
           attach('localidad_sel').value=o1.value;
           attach('reviews').value='S';
           SubmitToURL(_url,"_top");
        }
        else
        {
            attach('reviews').value='';
            _url="index.asp?idioma=" + midioma + "&localidad=" + o1.value + "&producto_q=" + o2.value;
            if (p_original!=s_id_producto && o1.value!="" && (s_id*1)!=12)
            {
               SubmitToURL(_url,"_top");
            }
            else
            {
	            DisplayNone('trBuscador');
	            DisplayNone('auto_pop');
                DisplayNone('divLodging');
                DisplayNone('divTours');
                DisplayNone('divTransfers');
                DisplayNone('divPackages');
                DisplayNone('divCars');
                DisplayNone('divEval');
	            DisplayBlock('auto_pop');
 	            DisplayBlock('trBuscador');
                attach('tdLodging').style.borderBottomColor='white';
                attach('tdTours').style.borderBottomColor='white';
                attach('tdTransfers').style.borderBottomColor='white';
                attach('tdPackages').style.borderBottomColor='white';
                attach('tdCars').style.borderBottomColor='white';
                attach('tdEval').style.borderBottomColor='white';
                switch (s_id*1)
                {
                   case 2:
                      ColorObj('tdLodging','#c2d0f5');
                      attach('tdLodging').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divLodging');
                      break;
                   case 9:
                      ColorObj('tdTours','#c2d0f5');
                      attach('tdTours').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divTours');
                      break;
                   case 3:
                      ColorObj('tdTransfers','#c2d0f5');
                      attach('tdTransfers').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divTransfers');
                      break;
                   case 10:
                      ColorObj('tdPackages','#c2d0f5');
                      attach('tdPackages').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divPackages');
                      break;
                   case 11:
                      ColorObj('tdCars','#c2d0f5');
                      attach('tdCars').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divCars');
                      break;
                   case 12:
                   default:
                      ColorObj('tdEval','#c2d0f5');
                      attach('tdEval').style.borderBottomColor='#c2d0f5';
  		              DisplayBlock('divEval');
		              DisplayBlock('trBuscador');
                      break;   
                }
           }
       }
	}

    function SelectAll(oObj){oObj.focus();oObj.select();}
    function shiftTo(obj,x,y){obj.style.pixelLeft=x;obj.style.pixelTop=y;}

    function findPosX(obj)
      {
        var curleft = 0;
        if(obj.offsetParent)
            while(1)
            {
              curleft += obj.offsetLeft;
              if(!obj.offsetParent)
                break;
              obj = obj.offsetParent;
            }
        else if(obj.x)
            curleft += obj.x;
        return curleft;
      }

    function findPosY(obj)
      {
        var curtop = 0;
        if(obj.offsetParent)
            while(1)
            {
              curtop += obj.offsetTop;
              if(!obj.offsetParent)
                break;
              obj = obj.offsetParent;
            }
        else if(obj.y)
            curtop += obj.y;
        return curtop;
      }

function ResetFiltros(sURL)
      {
        attach('fecha_desde').value='';
        attach('fecha_hasta').value='';
        attach('habitaciones').value='0';
        attach('adultos').value='0';
        attach('chicos').value='0';
        attach('auto_pop').value='';
        attach('auto_popH').value='';
        SubmitToURL(sURL,'frHide');
      }

function ResetIndex(midioma,bPreserveProducto,smp)
   {
      var iProd='5';
      var vSer=attach('service').value;
      if (bPreserveProducto) {iProd=smp;}
      SubmitToURL('index.asp?reset=S&idioma=' + midioma + '&producto_q=' + iProd,'_top');
   }
   

