<!--
/*
# Copyright 2006 e21Software.com Ltd. All Rights Reserved.       
# The contents of this file may be modified but not sold, copied
# or reverse engineered. The contents may not be used on any
# website(s) or internet services other than those agreed in
# writing by authorised representatives of e21Software.com Ltd.
*/
var dom=(document.getElementById); //modern dom browsers
var iebrowser=document.all
var today=new Date;var Knt=0;
var CalObj = new Array();
var AVAILABLE_DAYS = {};
var ARRIVAL_DAYS = {};
var UNAVAILABLE_DAYS = {};
var DISABLE_DAYS = {};
var UNKNOWN_DAYS = {};
var SELECTED_DAYS = new Array();
var SELECTED_RANGE = new Array();
var DISABLE_CALENDAR = false;
var Language = setLanguage();
var Currency = 'MXP';
var resOptions = new Array();
var searchF = new Array();
var MA = new Array();
var Path = (location.pathname.indexOf('.php') > 0?(location.pathname.lastIndexOf('/') > 0?'../':''):'../');

function ListOptions(sta,end,sel,pos,id,step){
 var num;
 for(var i=sta;i<end+step;i+=step){
  num=String(i).substr(pos);
  document.writeln('<option id="'+(id==""?'':id+num)+'" value="'+num+(i==sel?'" selected>':'">')+num+'</option>');
 }
}

function OpenWindow(theURL, winName, features){if(theURL != ""){window.open(theURL, winName, features);}}

function openVideo(Url){
 var w=554;var h=430;
 var left=(screen.width - w)/2;var top=(screen.height - h)/2;
 var param = 'left='+left+',top='+top+',width='+w+',height='+h;
 param+='scrollbars=0,status=0,directories=no,location=no,toolbar=no,menubar=no';
 OpenWindow(Url,'_blank',param);
}

function OpenDetails(Ref,Tgt){
 var f=document.Details;
 f.action=Ref+".php";
 f.target=Tgt;
 f.submit();
}


function AccommresSearch(Option){
 var f=document.Search;
 if(Option == 'nop'){
  var nop=document.nopSearch;
  f.LocationType.value=nop.LocationType.value;
  f.Country.value=nop.Country.value;
  f.Place.value=nop.Place.value;
 }
 var txt={};
 if(Language == 'eng'){txt=["Please wait a moment, we are searching availability according to your request","Invalid Arrival date","Invalid Departure date","Number of persons not specified"];}
 if(Language == 'esp'){txt=["Por favor aguarda un momento, estamos buscando disponibilidad de acuerdo a tu solicitud.<hr width='80%' style='color:rgb(255,101,0);height:1px;'>Con <span style='font-size:12px;'><b>travel</b>residences</span>, ahora t&uacute; decides en qu&eacute; casa disfrutar&aacute;s tus pr&oacute;ximas vacaciones.","Fecha inv&aacute;lida de la Llegada","Fecha inv&aacute;lida de la Salida","N&uacute;mero de las personas requeridas"];}
 if(Language == 'ptg'){txt=["Processo da transação","Data inv&aacute;lida da chegada","Data inv&aacute;lida da partida","O n&uacute;mero das pessoas requereu"];}
 if(f.dd.value == "" && Option != "nop"){Option="nop";}
 f.Language.value=Language;
 f.dd.value = (f.dd.value <10 && f.dd.value !="")?"0"+f.dd.value:f.dd.value;
 f.mm.value = (f.mm.value <10 && f.mm.value !="")?"0"+f.mm.value:f.mm.value;
 f.ddD.value = (f.ddD.value <10 && f.ddD.value !="")?"0"+f.ddD.value:f.ddD.value;
 f.mmD.value = (f.mmD.value <10 && f.mmD.value !="")?"0"+f.mmD.value:f.mmD.value;
 
 
 if(Option != "nop"){
  if(f.dd.value == ""){alert(txt[1]);return(false);}
  var ds=new Date(f.yy.value,f.mm.value - 1,f.dd.value);
  if(ds.getDate() != f.dd.value){alert(txt[1]);f.dd.focus();return(false);}
  if((ds.getMonth() + 1) != f.mm.value){alert(txt[1]);f.mm.focus();return(false);}
  if(ds.getFullYear() != f.yy.value){alert(txt[1]);f.yy.focus();return(false);}
  var dt=new Date(f.yyD.value,f.mmD.value - 1,f.ddD.value);
  if(dt.getDate() != f.ddD.value){alert(txt[2]);f.ddD.focus();return(false);}
  if((dt.getMonth() + 1) != f.mmD.value){alert(txt[2]);f.mmD.focus();return(false);}
  if(dt.getFullYear() != f.yyD.value){alert(txt[2]);f.yyD.focus();return(false);}
  if(dt < ds){alert(txt[2]);f.ddD.focus();return(false);}
  if(isNaN(parseInt(f.Adults.value))){alert(txt[3]);f.Adults.focus();return(false);}
  f.ArrivalDate.value=f.dd.value+"/"+f.mm.value+"/"+f.yy.value;Option='';
  var s=document.resultsForm;
  s.searchForm.value=f.dd.value+f.mm.value+f.yy.value+'?'+f.ddD.value+f.mmD.value+f.yyD.value+'?'+f.Adults.value+'?'+f.LocationType.value+'?'+f.Country.value+'?'+f.Place.value+'?'+f.OfferCode.value+'?'+f.LocationType.options[f.LocationType.selectedIndex].text;

  if(f.ddD.value != ""){
   var arrD=new Date(f.yy.value,f.mm.value - 1,f.dd.value);var depD=new Date(f.yyD.value,f.mmD.value - 1,f.ddD.value);
   f.NumberNights.value=(depD - arrD)/86400000;
  }
 }
 if(f.PlaceCategories != null){
  f.MaxPrice.value='';
  if(f.MaxPriceRange.value != ''){f.MaxPrice.value=(f.MaxPriceRange.value*f.NumberNights.value);}
//  getId('Processing').innerHTML="  <table border='0' cellpadding='0' cellspacing='0' width='545'><tbody><tr><td colspan='5'></td></tr><tr><td valign='top' width='424'><div style='color:#efc159;font-size:24pt;'>"+txt[0]+" ...</div></td></tr></tbody></table>";
  document.body.style.cursor='wait';
  getId('Processing').innerHTML="  <table border='0' cellpadding='0' cellspacing='0' width='545'><tbody class=dflt-1><tr><td colspan='3'><img src="+Path+"images/reservar.jpg></td></tr><tr><td colspan=3 valign='top' style='background:#ffffff;'><center><img alt='' src='"+Path+"images/animado.gif'><br><span style='font-family:Helvetica;font-size:11px;'>"+txt[0]+"</span></center></td></tr></tbody></table>";
  var main=getId('maintext');
  if(main != null){main.style.display='none';}
  f.PlaceCategories.value='';f.Categories.value='';
  for(var e=0;e<f.elements.length;e++){
   if(f.elements[e].type == 'checkbox'){
    if(f.elements[e].checked){
     if(f.elements[e].id.substr(2,1) == '1'){f.PlaceCategories.value+=f.elements[e].value+'~';}
     if(f.elements[e].id.substr(2,1) == '2'){f.Categories.value+=f.elements[e].value+'~';}
//     if(f.elements[e].id == '3'){f.Categories.value+=f.elements[e].value+'~';}
//     if(f.elements[e].id == '4'){f.DevCategories.value+=f.elements[e].value+'~';f.Categories.value+=f.elements[e].value+'~';}
    }
   }
  }
 }else{
  var main=getId('mainDetails');
  if(main == null){main=getId('Processing');}
  if(main == null){main=getId('maintext');}else{getId('maintext').style.display='none';}
//  var cursor = document.layers ? document.cursor:document.all ? document.all.cursor:document.getElementById ? document.getElementById('cursor'):null;
  document.body.style.cursor='wait';
  main.innerHTML="  <table border='0' cellpadding='0' cellspacing='0' width='545'><tbody class=dflt-1><tr><td colspan='3'><img src="+Path+"images/reservar.jpg></td></tr><tr><td colspan=3 valign='top' style='background:#ffffff;'><center><img alt='' src='"+Path+"images/animado.gif'><br><span style='font-family:Helvetica;font-size:11px;'>"+txt[0]+"</span></center></td></tr></tbody></table>";
 }
 f.Options.value=Option;
 f.action="/searches.php";
 PageFrame("Search");
}

function AccommresBook(Ref){

 var txt={};
 if(Language == 'eng'){txt=["Process of transaction","Invalid Arrival date","Invalid Departure date","Number of persons not specified"];}
 if(Language == 'esp'){txt=["Por favor aguarda un momento, estamos buscando disponibilidad de acuerdo a tu solicitud.<hr width='80%' style='color:rgb(255,101,0);height:1px;'>Con <span style='font-size:12px;'><b>travel</b>residences</span>, ahora t&uacute; decides en qu&eacute; casa disfrutar&aacute;s tus pr&oacute;ximas vacaciones.","Fecha inv&aacute;lida de la Llegada","Fecha inv&aacute;lida de la Salida","N&uacute;mero de las personas requeridas"];}
 if(Language == 'ptg'){txt=["Processo da transação","Data inv&aacute;lida da chegada","Data inv&aacute;lida da partida","O n&uacute;mero das pessoas requereu"];}
 var s=document.Xtras;
 if(Ref == 1){s.action=Path+'disponibilidad.php';}
 if(Ref == 2){s.action=Path+'details.php';s.Id.value='d';}
 if(Ref == 3){s.action=Path+'ubication.php';s.Id.value='p';}
 if(Ref == 6){s.action=Path+'details.php';s.Id.value='i';}
 if(Ref == 4){
  s.action='https://www.e21reservations2.com/cgi/accommres_dbPrice.pl';
  if(isNaN(parseInt(s.Adults.value))){alert(txt[3]);s.Adults.focus();return(false);}
  s.ArrivalDate.value=s.dd.value+"/"+s.mm.value+"/"+s.yy.value;
  if(s.ddD.value == ""){alert(txt[2]);s.ddD.focus();return(false);}
  var arrD=new Date(s.yy.value,s.mm.value - 1,s.dd.value);var depD=new Date(s.yyD.value,s.mmD.value - 1,s.ddD.value);
  if(arrD < today){alert(txt[1]);s.dd.focus();return(false);}
  s.NumberNights.value=(depD - arrD)/86400000;
 }
 var f=document.Search;
 if(Ref == 5){
  s=document.Booking;f=null;
  if(String(s.ArrivalDate.value).length < 8){return(false);}
  s.action='https://www.e21reservations2.com/cgi/accommres_dbPrice.pl';
 }
 if(Ref == 7){s=document.Forms;f=null;s.action='search.php';}
 if(f != null){s.searchForm.value=f.dd.value+f.mm.value+f.yy.value+'?'+f.ddD.value+f.mmD.value+f.yyD.value+'?'+f.Adults.value+'?'+f.LocationType.value+'?'+f.Country.value+'?'+f.Place.value+'?'+f.OfferCode.value+'?'+f.LocationType.options[f.LocationType.selectedIndex].text;}
 s.Language.value=(s.Language.value == "")?Language:s.Language.value;
 s.Target='_self';
 s.submit();
}

/*
function AccommresCalendar(Unit,PlaceNo,DevNo,AccNo,Place,Dev,Acc){
 var f=document.Calendars;
 f.UnitID.value=Unit;f.PlaceNo.value=PlaceNo;f.DevNo.value=DevNo;f.AccNo.value=AccNo;
 f.Place.value=Place;f.Dev.value=Dev;f.Acc.value=Acc;
 f.submit();
}
*/

function AccommresInfo(Ref,Type,Xtra){
 if(Ref != ""){
  var i=2;var s=document.Xtras;s.target='_self';
  s.Fields.value='arrivaldate=--&InfoUnitNo='+Ref+Xtra;
  if(Type == 'p'){i=3;s.Fields.value='arrivaldate=--&PlaceNo='+Ref+Xtra;}
  AccommresBook(i);
 }
 return(true);
}


function Menu(ActionForm,Lng,Reset){
 var f=document.Forms;
 if(f){
  if(Lng != ""){document.Forms.Language.value=Lng;}
  if(Reset != ""){eval("document.Forms."+Reset+".value='';")}
  NvoAction=(Lng == "esp")?ActionForm.replace(/language=eng/, "language=esp"):ActionForm.replace(/language=esp/, "language=eng");
  //document.write (ActionForm);
  document.Forms.action=NvoAction;
  document.Forms.submit();
 }else{
  OpenWindow(ActionForm,'_self','');
 }
}

function SetFormField(Form,Field,Idx,Text,Blank){
 if(Idx == Blank){Text='';}
 try{
  eval('document.'+Form+'.'+Field+'.value="'+Text+'";');
 }catch(e){}
}

function SelectChange(chg){
 var i=chg.selectedIndex;
 var btn=document.getElementById('Infobtn1');
 document.Search.Place.value=chg.options[i].text;
 if(chg.options[i].id == '-1'){btn.style.display='none';}else{btn.style.display='inline';}
}

function SelectCountry(Ctry){
 if(Ctry != ""){
  document.selectCtry.Country.value=Ctry;
  document.selectCtry.submit();
 } 
}

function AccommresxInfo(Cde,Lng,aRes){
 var ths=document.form1.Place1;
 var uri='http://'+aRes+'/onlinebookings/'+Cde+'/'+Lng+'/location_'+ths.options[ths.selectedIndex].id+'_info.html';
 OpenWindow(uri,'',''); 
}

function CheckEmail(){
 var err1=document.getElementById('err1');
 var err2=document.getElementById('err2');
 var err3=document.getElementById('err3');
 var err1a=document.getElementById('err1a');
 var err2a=document.getElementById('err2a');
 //var thx=document.getElementById('thx');
 var f=document.Contact;var e=f.Email.value;var at=0;var dot=0;
 err1.style.display="none";
 err2.style.display="none";
 err3.style.display="none";
 err1a.style.display="none";
 err2a.style.display="none";
 //thx.style.display="none";
 if(e == ""){err1.style.display="inline";err2a.style.display="inline";return(false);}
 if(!validateEmail(e)){err2.style.display="block";err2a.style.display="inline";f.Email.focus();return(false);}
 if(f.Name.value == ""){err3.style.display="block";err1a.style.display="inline";f.Name.focus();return(false);}
 document.Contact.Eid.value='1';
 document.Contact.submit();
 return(false);
}

function CheckVisitor(){
 var err1=document.getElementById('err1');
 var err2=document.getElementById('err2');
 var err3=document.getElementById('err3');
 var err1a=document.getElementById('err1a');
 var err2a=document.getElementById('err2a');
 var f=document.Visitor;var e=f.Email.value;
 err1.style.display="none";err2.style.display="none";err3.style.display="none";
 err1a.style.display="none";err2a.style.display="none";
 if(e == ''&&f.Phone.value == ''){err1.style.display="inline";err2a.style.display="inline";return(false);}
 if(!validateEmail(e)){err2.style.display="block";err2a.style.display="inline";f.Email.focus();return(false);}
 if(f.Surname.value == ""){err3.style.display="block";err1a.style.display="inline";f.Surname.focus();return(false);}
 f.submit();
 return(false);
}

function llena_hidden(valueradio){
document.Visitor.radio1.value = valueradio;
}
function llena_hidden2(valueradio){
document.Visitor.radio2.value = valueradio;
}

function CheckVis(){
 	var f=document.Visitor;
	if (f.AF5639.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg1&modal=true", '');
 		f.AF5639.focus();
 		return(false);
 	}
 	if (f.AF5640.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg2&modal=true", '');
 		f.AF5640.focus();
 		return(false);
 	}

 	if(f.radio1.value == "" && f.radio2.value == ""){ 
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg7&modal=true", '');
 		f.AF5641.focus();
 		return(false);
 	}
 	 	if (f.AF5642.value == "día" || f.AF5643.value == "mes" || f.AF5644.value == "año"){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg8&modal=true", '');
 		return(false);
 	}
 
	if (f.EMAIL.value == '') {
		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg3&modal=true", '');
		f.EMAIL.focus();
		return(false);
	}
 	if (!validateEmail(f.EMAIL.value )){ 
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg4&modal=true", '');
 		f.Email.focus();
 		return(false);
 	}
 	if (f.AF5649.value == "..."){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg10&modal=true", '');
 		f.AF5649.focus();
 		return(false);
 	}

 	if (f.AF5651.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg5&modal=true", '');
 		f.AF5651.focus();
 		return(false);
 	}
 	if (f.AF5655.value == "..."){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg9&modal=true", '');
 		f.AF5655.focus();
 		return(false);
 	}
	
	if (!f.AF5656.checked) {
			tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg6&modal=true", '');
			return false;
		}
 	
 	f.submit();
 	return(false);
  }

function llena_hidden_eng(valueradio){
document.Visitor_eng.radio1.value = valueradio;
}
function llena_hidden2_eng(valueradio){
document.Visitor_eng.radio2.value = valueradio;
}

function CheckVis_eng(){
 	var f=document.Visitor_eng;
	if (f.AF5535.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg1&modal=true", '');
 		f.AF5535.focus();
 		return(false);
 	}
 	if (f.AF5537.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg2&modal=true", '');
 		f.AF5537.focus();
 		return(false);
 	}

 	if(f.radio1.value == "" && f.radio2.value == ""){ 
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg7&modal=true", '');
 		f.AF5641.focus();
 		return(false);
 	}
 	 	if (f.AF5539.value == "day" || f.AF5540.value == "months" || f.AF5541.value == "year"){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg8&modal=true", '');
 		return(false);
 	}
 
	if (f.EMAIL.value == '') {
		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg3&modal=true", '');
		f.EMAIL.focus();
		return(false);
	}
 	if (!validateEmail(f.EMAIL.value )){ 
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg4&modal=true", '');
 		f.Email.focus();
 		return(false);
 	}
 	if (f.AF5543.value == "..."){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg10&modal=true", '');
 		f.AF5543.focus();
 		return(false);
 	}
 	
 	if (f.AF5545.value == ""){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg5&modal=true", '');
 		f.AF5651.focus();
 		return(false);
 	}
 	if (f.AF5548.value == "..."){
 		tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg9&modal=true", '');
 		f.AF5548.focus();
 		return(false);
 	}
	
	if (!f.AF5549.checked) {
			tb_show('', "#TB_inline?height=105&width=300&inlineId=ErrorMsg6&modal=true", '');
			return false;
		}
 	
 	f.submit();
 	return(false);
}

function validateEmail(Email){
 var chr = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
 var at=0;var dot=0;
 if(Email){
  for(i=0;i < Email.length;i++){
 	 if(Email.charAt(i)=="@"){at++;}
 	 if(Email.charAt(i)=="."){dot++;}
   if(chr.indexOf(Email.charAt(i))<0){return(false);}
  }
  if(at!=1 || dot==0 || ".@".indexOf(Email.charAt(0))!=-1){return(false);}
 }
 return(true);
}

function NextPage(Page,Id,Max){
 if(Knt == 0){Knt=1;}
 var prv=eval("document.getElementById('"+Id+Knt+"')");
 Knt=Knt+Page;
 var bpE=document.getElementById('prev');bpE.style.display="inline";
 var bpD=document.getElementById('prevD');bpD.style.display="none";
 var bnE=document.getElementById('next');bnE.style.display="inline";
 var bnD=document.getElementById('nextD');bnD.style.display="none";
 if(Knt <= 1){Knt=1;bpE.style.display="none";bpD.style.display="inline";}
 if(Knt >= Max){Knt=Max;bnE.style.display="none";bnD.style.display="inline";}
 var nxt=eval("document.getElementById('"+Id+Knt+"')");
 prv.style.display="none";
 nxt.style.display="inline";
}

function CheckAddProperty(){
 var err1=document.getElementById('err1');
 var err2=document.getElementById('err2');
 var err3=document.getElementById('err3');
 var err4=document.getElementById('err4');
 var err5=document.getElementById('err5');
 var err6=document.getElementById('err6');
 var err7=document.getElementById('err7');
 var err8=document.getElementById('err8');
 var err9=document.getElementById('err9');
 var f=document.AddForm;var e=f.Email.value;var at=0;var dot=0;
 var chr = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
 err1.style.display="none";err2.style.display="none";err3.style.display="none";
 err4.style.display="none";err5.style.display="none";err6.style.display="none";
 err7.style.display="none"; err8.style.display="none";err9.style.display="none";
 if(f.Development.value == ""){err1.style.display="inline";f.Development.focus();return(false);}
 if(f.Address.value == ""){err2.style.display="inline";f.Address.focus();return(false);}
 if(f.Description.value == ""){err3.style.display="inline";f.Description.focus();return(false);}
 if(f.Directions.value == ""){err4.style.display="inline";f.Directions.focus();return(false);}
 if(f.Name.value == ""){err5.style.display="inline";f.Name.focus();return(false);}
 if(f.OwnerAddress.value == ""){err6.style.display="inline";f.OwnerAddress.focus();return(false);}
 if(f.Tel.value == ""){err7.style.display="inline";f.Tel.focus();return(false);}
 if(e == ""){err8.style.display="inline";f.Email.focus();return(false);}
 if(!validateEmail(e)){err9.style.display="inline";f.Email.focus();return(false);}
 return(true);
}
var IFrameObj;
function PageFrame(Id) {
  if(!document.createElement){return true};
  var IFrameDoc;
  var URL = buildQueryString(Id);
  if (!IFrameObj && document.createElement) {
   try {
    var tmpIFrame=document.createElement('iframe');
    tmpIFrame.setAttribute('id',Id);
    tmpIFrame.style.border='0px';
    tmpIFrame.style.width='0px';
    tmpIFrame.style.height='0px';
    IFrameObj = document.body.appendChild(tmpIFrame);
      
    if(document.frames){IFrameObj = document.frames[Id];} // IE5 Mac
   }catch(exception) {
    iframeHTML='\<iframe id="'+Id+'" style="border:0px;width:0px;height:0px;><\/iframe>'; // IE5 only
    document.body.innerHTML+=iframeHTML;
    IFrameObj = new Object();
    IFrameObj.document = new Object();
    IFrameObj.document.location = new Object();
    IFrameObj.document.location.iframe = document.getElementById(Id);
    IFrameObj.document.location.replace = function(location){this.iframe.src = location;}
   }
  }

  if(navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument){setTimeout('PageFrame()',10);return false;}
  if(IFrameObj.contentDocument){
   IFrameDoc = IFrameObj.contentDocument; // NS6 
  }else if(IFrameObj.contentWindow){
   IFrameDoc = IFrameObj.contentWindow.document; // IE5.5 & 6
  }else if(IFrameObj.document) {
    IFrameDoc = IFrameObj.document; // IE 5
  }else{return true;}

  IFrameDoc.location.replace(URL);
  return false;
}

function buildQueryString(theFormName) {
  theForm = document.forms[theFormName];
  var qs = '';
  for(e=0;e<theForm.elements.length;e++){
   if(theForm.elements[e].name!=''){
    qs+=(qs=='')?'?':'&';
    if(theForm.elements[e].type == 'checkbox'){
     if(theForm.elements[e].checked){qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value);}
    }else{
     if(theForm.elements[e].type == 'select-one'){
      var idx=theForm.elements[e].selectedIndex;
      if((theForm.elements[e].options[idx].value == '')&&(idx > 0)){
       qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].options[idx].text);
      }else{
       qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value);
      }
     }else{
      qs+=theForm.elements[e].name+'='+escape(theForm.elements[e].value);
     }
    }
   }
  }
  return(theForm.action + qs);
}

function checkQueryString(id1,id2,Query){
 var qry=window.location.search;
 if(qry.indexOf(Query) > 0){
  var d1=getId(id1);d1.style.display='none';
  var d2=getId(id2);d2.style.display='inline';
 }
 return(true);
}

function writeMovie(){
 var qt2=getId('qtime2');
 document.write('<object id="rci1" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="615" height="360">');
 document.write('<param name="src" value="TR-1F.mov" />');
// document.write('<param name="src" value="" />');
 document.write('<param name="controller" value="false" />');
 document.write('<param name="autoplay" value="false" />');
 document.write('<param name="scale" value="tofit" />');
 document.write('<param name="volume" value="100" />');
 document.write('<param name="loop" value="false" />');
 document.write('<param name="qtnext1" value="javascript:Menu('+"'contact.php','','');"+'" />');
 document.write('<param name="href" value="javascript:Menu('+"'contact.php','','');"+'" />');
// document.write('<embed name="rci1" qtnext1="javascript:Menu('+"'contact.php','','');"+'" pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" class="mov" width="615" height="360" src="TR-1F.mov" controller="false" autoplay="false" scale="tofit" volume="100" loop="false"></embed></object>');
 document.write('<embed name="rci1" qtnext1="javascript:Menu('+"'contact.php','','');"+'" pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" class="mov" width="615" height="360" controller="false" autoplay="false" scale="tofit" volume="100" loop="false"></embed></object>');
 qt2.style.left='-1000px';
}

function playMovie(){
 var iebody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
 var ie=document.all && !window.opera;
 var dom=document.getElementById;
 var Quick=getId('menu');
 var qt1=getId('qtime1');
 var qt2=getId('qtime2');
// var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset;
 var docwidth=(ie)? iebody.clientWidth : window.innerWidth;
// var docheight=(ie)? iebody.clientHeight: window.innerHeight
 var objwidth=qt2.offsetWidth;
// var objheight=qt1.offsetHeight;
 qt2.style.left=(docwidth/2-objwidth/2)+"px";
// qt2.style.top=scroll_top+docheight/2-objheight/2+"px"
 qt2.style.top=offTop(Node(Quick,'hbar'))+'px';
 document.rci1.Play();
}



function getId(Id){
 if(document.getElementById){return(document.getElementById(Id));}
 if(document.all){return(document.all[Id]);}
 if(document.layers){return(document.layers[Id]);}
}

function enableId(ref,Node,Start,End){
 if(Start == ''){Start=1;}
 for(var i=Start;i<=End;i++){if(i == Node){getId(ref+i).style.top='170px';}else{getId(ref+i).style.top='-1000px';}}
}

function Node(node,id){
 for(var i=0;i<node.childNodes.length;i++){
//  alert(node.childNodes[i].id);
  if(node.childNodes[i].id == id){return(node.childNodes[i]);}
 }
}

function offTH(obj){return(obj.offsetTop+obj.offsetHeight);}
function offLW(obj){return(obj.offsetLeft+obj.offsetWidth);}
function offTop(obj){return(obj.offsetTop);}
function offLeft(obj){return(obj.offsetLeft);}
function offWidth(obj){return(obj.offsetWidth);}
function offHeight(obj){return(obj.offsetHeight);}

function setLanguage(){
 var URL=new String(location.href);var lng='esp';
 if(URL.indexOf('/eng/') > 0){lng='eng';}
 if(URL.indexOf('/ptg/') > 0){lng='ptg';}
 return(lng);
}

function stdLoginForm(ref){
 var txt={};
 if(Language == 'eng'){txt=["Booking","Password","Go","Your Booking","Invalid Entry", "You have to input:","Close window" ];}
 if(Language == 'esp'){txt=["Reservaci&oacute;n","Contrase&ntilde;a","Entrar","Su Reservaci&oacute;n","Entrada inv&aacute;lida", "Tienes que ingresar:", "Cerrar ventana"];}
 
 if(ref == 1){txt[4]="";}
 document.writeln("<div id='loginform'>\n");
 document.writeln("  <form action='"+Path+"yourbook.php' method='post' name='YourBook'>\n");
 document.writeln("   <input type='hidden' name='Language' value='"+Language+"'>\n");
 document.writeln("   <input type='hidden' name='Continent' value='Americas'>\n");
 document.writeln("   <input type='hidden' name='Page' value='1'></td>\n");
 document.writeln("   <table id='ownlogin' border='0' cellpadding='0' cellspacing='0' width='200' style='font-size:9px;'>\n");
 document.writeln("   <tbody>\n");
 document.writeln("    <tr><td colspan='3' style='color:#ffffff;font-size:9px;'>"+txt[3]+"</td></tr>\n");
 document.writeln("    <tr style='font-size:10px;'><td colspan='2'>&nbsp;</td></tr>\n");
 document.writeln("    <tr style='font-size:10px;'><td>"+txt[0]+"&nbsp;&nbsp;</td><td class='kit'><input type='text' name='Login' value='' /></tr>\n");
 document.writeln("    <tr style='font-size:10px;'><td>"+txt[1]+"&nbsp;</td><td class='kit'><input type='password' name='Password' value='' /></td></tr>\n");
 document.writeln("    <tr style='font-size:10px;'><td style='color:red;'>"+txt[4]+"</td><td align='right' class='link12'><a href='#' onclick='ValidaYourBooking(\""+txt[0]+"\",\""+txt[1]+"\",\""+txt[5]+"\",\""+txt[6]+"\");'><b>"+txt[2]+"</b>&nbsp;<img src='"+Path+"images/go_button.gif' align='absmiddle' border='0' alt='"+txt[2]+"'></a></td></tr>\n");
 document.writeln("   </table>\n");
 document.writeln("  </form>\n");
 document.writeln("</div>\n");
}

function ValidaYourBooking ( Label1, Label2, Label3, Label4) {
	var error = "";
	if (document.YourBook.Login.value == "")
		error = "-" + Label1 + "\n";
	if (document.YourBook.Password.value == "")
		error = error + "-" + Label2;
	if (error != "") {
		Fullerror = Label3 + "\n\n" +error;
		alert(Fullerror);
	} else {
		document.YourBook.submit();
	}
}


function stdLanguages(){
 var txt={};
 if(Language == 'eng'){txt=["Language","Espa&ntilde;ol","English","Português"];}
 if(Language == 'esp'){txt=["Idioma","Espa&ntilde;ol","English","Português"];}
 if(Language == 'ptg'){txt=["L&iacute;ngua","Espa&ntilde;ol","English","Português"];}
 document.writeln("      "+txt[0]+"<br />\n");
 document.writeln("      <select name='Languages' onchange='changeLanguage(this.value,"+'"Y"'+");' style='width:89px;'>\n");
 document.writeln("       <option value='esp'"+(Language=='esp'?' selected>':'>')+txt[1]+"</option>\n");
 document.writeln("       <option value='eng'"+(Language=='eng'?' selected>':'>')+txt[2]+"</option>\n");
// document.writeln("       <option value='ptg'"+(Language=='ptg'?' selected>':'>')+txt[3]+"</option>\n");
 document.writeln("      </select>\n");
 return(true);
}

function changeLanguage(lng,refresh){
 if (lng == "")
 	return false;
 if (refresh == 'Y') {
  if (Path == '') {
  	Menu (location.href,lng,'');
  	return false;
  }
  var j=location.pathname.indexOf("/"+Language+"/");
  if (j != -1) {
  	var newHref=location.pathname.substr(0,j+1)+lng+'/'+htmlPage(location.pathname.substr(j+5),lng);
  } else {
   var sl1='-'+Language.substr(0,2);
   var sl2='-'+lng.substr(0,2);
   var newHref=location.protocol+location.hostname+location.pathname;newHref=newHref.replace(sl1+'/',sl2+'/');newHref=newHref.replace(sl1+'.',sl2+'.');
  }
  location.href=newHref;
 }
 Currency='MXP';
 if(lng == 'eng'){Currency='USD';}
 Language=lng;
}

function htmlPage(htm,lng){
 var trn={};var list='espeng';var idx=-1;
 var a=list.indexOf(Language)/3;var b=list.indexOf(lng)/3;
 trn[0]=["mapa_sitio","como_funciona","index","contacto","beneficios_rentar","beneficios_propietarios","nuestras_propiedades","quienes_somos","quiero_poner","busqueda_avanzada","registra_propiedad","terminos_condiciones","politicas_privacidad","preguntas_frecuentes_poner","preguntas_frecuentes_rentar","terminos_prestacion","presentacion"];
 trn[1]=["site_map","how_does_it_work","index","contact","benefits_of_renting","benefits_owners","our_properties","about_us","i_want_to_rent_my_property","advanced_search","register_your_property","terms_and_conditions","privacy_policy","faq_owner","faq_renter","terms_of_business","presentation"];
 for(var i=0;i<trn[a].length;i++){if(trn[a][i]+'.html' == htm){idx=i;}}
 if(idx == -1){return(htm);}else{return(trn[b][idx]+'.html');}
}

function serverResponse(Id,doc,Action) {
 var data = doc.getElementById('serverResults');
 var upd = document.getElementById(Id);
 if(Id == 'Server'){eval(data.innerHTML);optionUpdate('',0,0,1);if((searchF[0] != '')&&(searchF[0] != undefined)){optionUpdate(searchF[0],0,0,1);}}
 if(Id == 'maintext'){
// getId('maintext').innerHTML=data.innerHTML;
  var f=document.resultsForm;
  f.Language.value = Language;
  f.Results.value = data.innerHTML; 
  f.submit();
 }
 if(Id == 'Booking'){updateBookingForm(unescape(data.innerHTML));}
// var f=document.sqlForm;
// if(Id == 'Server'){f.Id.value='Ctry';f.Action.value='2';PageFrame('sqlForm');}
}

function optionUpdate(Value,Tag,Chk,Sel){
 var txt='Todo';
 if(Language == 'eng'){txt='All';}
 if(Language == 'ptg'){txt='Tudo';}
 var Id=(Sel==1?'optType':'Type');var prv='x?x';var j=0;var e1;var first='';
 var k=0;var idc='';var p='-9';var m=0;
 if(Tag == 1){Id=(Sel==1?'optCountry':'Country');j=2;}
 if(Tag == 2){Id=(Sel==1?'optLocation':'Location');j=3;idc=(Sel==1?'optType':'Type');}
 var f=document.getElementById(Id);
 if(idc != ''){var p=document.getElementById(idc).value;if(p == ''){p='-9';}}
 f.options.length = 0;
 if(Tag < 3){e1=document.createElement('option');e1.value='';e1.text=txt;f.options.add(e1,k);k++;}
 for(var i=0;i<resOptions.length;i++){
//if(Tag == 0){alert(Value+':'+resOptions[i][Chk]+'('+i+','+Chk+')->'+resOptions[i][m]+'('+i+','+m+')');}
//  if(Value == '' || Value == resOptions[i][Chk]){
   if(p == '-9' || p == resOptions[i][m]){
    prv=resOptions[i][j];
    for(var x=0;x<f.options.length;x++){if(f.options[x].value == prv){prv='-9';}}
    if(prv != '-9'){
     e1=document.createElement('option');
     prv=resOptions[i][j];if(first == ''){first=prv;}
     e1.value=prv;e1.text=prv;
     if(Tag == 0){e1.text=resOptions[i][1];}
     if(Tag == 1){e1.text=resOptions[i][4];}
//    f.appendChild(e1);
     f.options.add(e1,k);k++;
    }
   }
//  }
 }
 for(var x=0;x<f.options.length;x++){if(f.options[x].value == searchF[Tag]){f.selectedIndex=x;}}
 if(Tag == 0){optionUpdate(first,1,0,Sel);}
 if(Tag == 1){optionUpdate(first,2,2,Sel);}
 if(Tag == 2 && Sel == 1){
  if(document.nopSearch != null){optionUpdate('',0,0,2);}
 }
}

function showImage(name,img){
 if(document.images[name] != null){
  document.images[name].src=img.src;
  document.images[name].alt=img.alt;
 }
}

function searchFormUpdate(Start,End,Num,Type,Country,Place,Offer,Agency){
 var f=document.Search;
 f.dd.value=Start.substr(0,2);f.mm.value=Start.substr(2,2);f.yy.value=Start.substr(4,4);
 f.ddD.value=End.substr(0,2);f.mmD.value=End.substr(2,2);f.yyD.value=End.substr(4,4);
 f.Adults.value=Num;f.OfferCode.value=Offer;
 if((f.AgencyCode)&&(Agency != undefined)){f.AgencyCode.value=Agency;}
 searchF[0]=Type;searchF[1]=Country;searchF[2]=Place;
}

function registerForm(Ref){
 var txt={};
 if(Language == 'eng'){txt=["Please enter your Name","Please enter an Email address","Please enter a Telephone number"];}
 if(Language == 'esp'){txt=["Por favor introduzca su Nombre","Por favor introduzca una direcci&oacute;n de e-mail","Por favor introduzca un n&uacute;mero de tel&eacute;fono"];}
 if(Language == 'ptg'){txt=["Por favor insira o seu Nome","Por favor insira um endereço de Email","Por favor insira um n&uacute;mero de Telefone"];}
 if(Ref == 1){
  var r=document.Register;
  if(r.Owner_Name.value == ''){alert(txt[0]);r.Owner_Name.focus();return(false);}
  if(r.Owner_Email.value == ''){alert(txt[1]);r.Owner_Email.focus();return(false);}
  if(r.Owner_Office_Tel.value == '' && r.Owner_Home_Tel.value == '' && r.Owner_Mobile.value == ''){alert(txt[2]);r.Owner_Office_Tel.focus();return(false);}
  r.submit();
 }
}

/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var fadebgcolor="white"
////NO need to edit beyond here/////////////
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML="";var dtl='';
if(this.theimages[picindex]==null){return(false);}
if (this.theimages[picindex][2]!="") //if associated link exists for image
//slideHTML='<a href="#" onclick="alert();accommresInfo('+"'"+this.theimages[picindex][3]+"','"+this.theimages[picindex][2]+"');"+'">';
if(this.theimages[picindex][2] == 'p'){dtl='&Place='+this.theimages[picindex][1];dtl=dtl.replace(", ","&Property=");dtl=dtl.replace(", ","&Country=");}
if(this.theimages[picindex][2] == 'u'){dtl='&Country='+this.theimages[picindex][1];dtl=dtl.replace(": ","&Place=");dtl=dtl.replace(", ","&Property=");}
//dtl='&Country='+this.theimages[picindex][1];dtl=dtl.replace(": ","&Place=");dtl=dtl.replace(", ","&Property=");
//slideHTML="<a href='#'' onclick='AccommresInfo("+'"'+this.theimages[picindex][3]+'","'+this.theimages[picindex][2]+'","'+dtl+'");'+"' target='_blank'>";
slideHTML="<a href='#'' onclick='AccommresInfo("+'"'+this.theimages[picindex][3]+'","'+this.theimages[picindex][2]+'","'+dtl+'");'+"'>";
//if(this.theimages[picindex][2] == 'p'){slideHTML="<a href='#'' onclick='AccommresInfo("+'"'+this.theimages[picindex][3]+'","'+this.theimages[picindex][2]+'","'+dtl+'");'+"' target='_blank'>";}
//if(this.theimages[picindex][2] == 'p'){slideHTML='<a href="#" onclick='AccommresInfo(dtl,details.php?Fields='+"'PlaceNo="+this.theimages[picindex][3]+dtl+"'&Id="+this.theimages[picindex][2]+'" target="_blank">';}
//if(this.theimages[picindex][2] == 'd'){slideHTML='<a href="../details.php?Fields='+"'InfoUnitNo="+this.theimages[picindex][3]+dtl+"'&Id="+this.theimages[picindex][2]+'" target="_blank">';}
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px" alt="'+this.theimages[picindex][1]+'">';
if (this.theimages[picindex][2]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}


fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

function addEvent(obj, evType, fn){
 if (obj.addEventListener){
   obj.addEventListener(evType, fn, false);
   return true;
 } else if (obj.attachEvent){
   var r = obj.attachEvent("on"+evType, fn);
   return r;
 } else {
   return false;
 }
}

/*
function setFooter(top){
 var txt={};
 if(!top){top=offTH(getId('maintext'))+10;}
 // ----------------------------------
 // Updated to close ticket #31
 // Author: EAGC / CTI
 // Date: 15/November/2007
 // ----------------------------------

 if(Language == 'esp'){txt=['Copyright 2007 &copy; TravelResidences.com','T&eacute;rminos y Condiciones','Pol&iacute;ticas de Privacidad','T&eacute;rminos de la Prestaci&oacute;n','Mapa de sitio','Tel&eacute;fonos: 52 (55) 9138–9243 Fax. 52 (55) 5283-1183  Interior de la Rep&uacute;blica. 01800 633 8989 Email.&nbsp;<span class=footer><a href="mailto:servicio@travelresidences.com">servicio@travelresidences.com</a></span>. Todo el material publicado en esta p&aacute;gina web es propiedad de o cuenta con los permisos y autorizaciones de uso necesarios y/o aplicables a favor de Resort Condominiums International de M&eacute;xico, S. de R.L. de C.V. ® 2007. Derechos Reservados','terminos_condiciones','politicas_privacidad','terminos_prestacion','mapa_sitio'];}
 
 // ----------------------------------
 // End of Update
 // ----------------------------------
 
 if(Language == 'eng'){txt=['Copyright 2007 &copy; TravelResidences.com','Terms and Conditions','Privacy Policy','Terms of Service','Site Map','All material published on this website is the property of and can not be used without the authorized permission of Resort Condominiums International de M&eacute;xico, S. de R.L. de C.V. ® 2007. All Rights Reserved.','terms_and_conditions','privacy_policy','terms_of_business','site_map'];}
// document.writeln('<div id="footer_base" style="position:absolute;padding-left:0px;top:'+top+'px;"><img alt="'+txt[0]+'" src='+Path+'images/travel_residences_footer.jpg></div>');
 document.writeln('<div id="copyright" style="position:absolute;padding-left:0px;top:'+top+'px;">');
// document.writeln('  <table border="0" cellspacing="0" cellpadding="0" width="770"><tbody class=fsize1><tr><td height="30" width=198><br></td><td width=222 style="padding-top: 3px;"></td><td width=120><span class=footer><a class=footer href='+Path+Language+'/'+txt[6]+'.html>'+txt[1]+'</a></span></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=110><span class=footer><a class=footer href='+Path+Language+'/'+txt[7]+'.html>'+txt[2]+'</a></span></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=120><span class=footer><a class=footer href='+Path+Language+'/'+txt[8]+'.html>'+txt[3]+'</a></span></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=65><span class=footer><a href='+Path+Language+'/'+txt[9]+'.html>'+txt[4]+'</a></td></tr><tr><td colspan="4" height="10"></td></tr><tr><td colspan="9"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="5"><br></td><td colspan="2" style="text-align: justify;" class=copyright>'+txt[5]+'</td><td width="5"><br></td><td><img border="0" alt="Valid HTML 4.01 Transitional" src="'+Path+'images/valid-html401.jpg"><img border="0" alt="Secure Site" src="'+Path+'images/securesite.jpg"></td></tr></tbody></table></td></tr></tbody></table>');
// document.writeln('  <table border="0" cellspacing="0" cellpadding="0" width="770"><tbody class=fsize1><tr><td colspan=2><div align="left"><img src="'+Path+'images/'+Language+'/telephone_bar.gif" width="761" height="44" /></div></td></tr><tr><td width="145" height="26"><div align="center"><img src="'+Path+'images/'+Language+'/grupo_rci.gif" width="128" height="26" /></div></td><td width='625' valign='top'><table width='591' border='0' cellpadding='0' cellspacing='0'><tbody class=footer><tr><td width='585'><div align='right'><a class=footer href='+Path+Language+'/'+txt[6]+'.html>'+txt[1]+'</a></div></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=110><span class=footer><a class=footer href='+Path+Language+'/'+txt[7]+'.html>'+txt[2]+'</a></span></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=120><span class=footer><a class=footer href='+Path+Language+'/'+txt[8]+'.html>'+txt[3]+'</a></span></td><td width="6"><img src=../images/footer_splitter.jpg></td><td width=65><span class=footer><a href='+Path+Language+'/'+txt[9]+'.html>'+txt[4]+'</a></td></tr><tr><td colspan="4" height="10"></td></tr><tr><td colspan="9"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="5"><br></td><td colspan="2" style="text-align: justify;" class=copyright>'+txt[5]+'</td><td width="5"><br></td><td><img border="0" alt="Valid HTML 4.01 Transitional" src="'+Path+'images/valid-html401.jpg"><img border="0" alt="Secure Site" src="'+Path+'images/securesite.jpg"></td></tr></tbody></table></td></tr></tbody></table>');
 document.writeln('  <table id="footer_base" width="770" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td colspan="2"><div align="left"><img src="'+Path+'images/'+Language+'/telephone_bar.gif" width="761" height="44" /></div></td></tr><tr><td width="145" height="26"><div align="center"><img src="'+Path+'images/'+Language+'/grupo_rci.gif" width="128" height="26" /></div></td><td width="625" valign="top"><table width="591" border="0" cellpadding="0" cellspacing="0"><tbody class=footer><tr><td width="585"><div align="right"><a href="http://www.travelresidences.com/'+Language+'/'+txt[6]+'.html" target="_self">'+txt[1]+'</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="http://www.travelresidences.com/'+Language+'/'+txt[7]+'.html" target="_self">'+txt[2]+'</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="http://www.travelresidences.com/'+Language+'/'+txt[8]+'.html" target="_self">'+txt[3]+'</a>&nbsp;&nbsp;     |&nbsp;&nbsp; <a href="http://www.travelresidences.com/'+Language+'/'+txt[9]+'.html" target="_self">'+txt[4]+'</a></div></td></tr></tbody></table></td></tr><tr><td colspan="2" height="5"></td></tr><tr><td colspan="9"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="5"><br></td><tr><td colspan="2" style="text-align: justify;" class=copyrght>'+txt[5]+'</td><td width="5"><br></td><td><img border="0" alt="Valid HTML 4.01 Transitional" src="'+Path+'images/valid-html401.jpg"><img border="0" alt="Secure Site" src="'+Path+'images/securesite.jpg"></td></tr></tbody></table></td></tr></tbody></table>');
 document.writeln('</div>');
}

function setRightLine(height){
// var ftr=offTH(getId('maintext'))+9;var page=offTH(document.body);
// if(ftr < page){height=page;}
// alert(ftr+'='+page+'='+height);
// if(ftr > height){height=ftr;}
// document.writeln('<div id="rightline" class="rightline"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td width="5" height='+height+' style="background:url('+Path+'images/right_line.jpg); repeat-y"><br></td></tr></tbody></table></div>');
}

*/

function showPage(idx,max,obj){
 var id=getId('pg-'+Page);
 id.style.fontWeight='';id.style.fontSize='10pt';
 if(isNaN(idx)){
  if(idx == '-'){idx=Number(Page) - 1;}else{idx=Number(Page) + 1;}
  if(idx == 0){idx=1;}
  if(idx > max){idx=max;}
  id=getId('pg-'+idx);
  id.style.fontWeight='bold';id.style.fontSize='13pt';
 }else{
  obj.style.fontWeight='Bold';obj.style.fontSize='13pt';
 }
 if(Page != idx){getId('Page-'+Page).style.display='none';}
 getId('Page-'+idx).style.display='block';
 Page=idx;
}

function setCookie(ref,id,code){
 var exp=new Date();exp.setDate(exp.getDate()+3650);var c='undefined';var fav=getId('fav');
 var ck=document.cookie.split(code+'=');
 if(ck[1]){ck=ck[1].split(';');c=unescape(ck[0]);}
 if(c.indexOf(ref) == -1){
  ck=c.split(':');if(ck.length > 14){return(false);}
  c=c.replace('undefined','');
  if(c.indexOf(ref) == -1){c+=ref;}
  getId('scr-'+id).style.display='inline';getId('sca-'+id).style.display='none';
  if(fav){fav.style.display='inline';}
 }else{
  c=c.replace(ref,'');
  getId('scr-'+id).style.display='none';getId('sca-'+id).style.display='inline';
  if(fav){fav.style.display='none';}
 }
 document.cookie='Favourites='+c+';expires='+exp.toGMTString()+';path=\;';
 return(true);
}

function setFlash(id,file,image,w,h,fill,type,ref,showIcons){
 if(fill == undefined){fill='none';}
 if(type == undefined){type='swf';}
 if(ref == undefined){ref='rci'}
 if(showIcons == undefined){showIcons='false'}
	var s1 = new SWFObject("../mediaplayer.swf",ref,w,h,"7");
	s1.addParam("allowfullscreen","true");
	s1.addVariable("file",file);
	s1.addVariable("displaywidth",w);
	s1.addVariable("displayheight",h);
	s1.addVariable("image",image);
	s1.addVariable("width",w);
	s1.addVariable("height",h);
	s1.addVariable("overstretch",fill);
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","true");
	s1.addVariable("enablejs","true");
	s1.addVariable("javascriptid",ref);
	s1.addVariable("showdigits","false");
	s1.addVariable("showicons",showIcons);
	s1.addVariable("showdownload","true");
	s1.addVariable("type",type);
	s1.addVariable("usecaptions","false");
	s1.write(id);
}

function PageLoad(){
// try{
  if (document.SearchNew != null)
  	initDynamicOptionLists();
  if(document.Search != null){PageFrame('sqlForm');}
// }catch(e){return(false);}
}


function SwitchLanguage (Ver) {
	document.cookie='lenguaje=' +Ver+ '; expires=Thu, 2 Aug 2010 20:47:11 GMT; path=/;'
	var Valor=eval("Version_"+Ver);	
	
	var Relocation = location.protocol+"//"+location.hostname + "/" + Valor;
	Relocation = Relocation.replace(".html&",".html?");
	//Relocation.replace(".php&",".php?");	
  location.href=Relocation;
}

function openBox(Pagina,h,w) {
	h=h-7;
	w=w-24;
	return tb_show('Promociones travelresidences',Pagina+'KeepThis=true&TB_iframe=true&height='+h+'&width='+w+'');
}

addEvent(window,'load',PageLoad);
-->
