<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->

function advancedSearch(as) {
	if (as==1) { searchAdvanced.style.display="inline"; asLink.text='< normal search' }
	else { searchAdvanced.style.display="none" }
}


	currentRoom=null;
	rates28=new Array();
	rates28b=new Array();
	offerArray=new Array();
	function showQuoteInfo() {
		document.getElementById("quoteInfo").innerHTML = roomArray[document.form001.quoteRoom.selectedIndex];
		document.getElementById("rateFull").innerHTML = rackArray[document.form001.quoteRoom.selectedIndex];

		if (currentRoom!=document.form001.quoteRoom.selectedIndex && offerArray.length!=0) {
			rates28=offerArray[document.form001.quoteRoom.selectedIndex].split("~");
			document.form001.offer.options.length=0;
			for (i=0; i!=rates28.length; i++) {
				rates28b=rates28[i].split("^");
				if (rates28b[2]!=null) {
					document.form001.offer.options[i]=new Option();
					document.form001.offer.options[i].text=rates28b[2];
				}
			}
			currentRoom=document.form001.quoteRoom.selectedIndex;
		}
		tmp = setTimeout("showQuoteInfo()",500);
	}

	dC="";
	function redraw(y,x) {
		http = "http://";
		if (window.location.href.indexOf("https://") != -1) { http = "https://" }
		if (y == 'dC') {
			dC=x;
			url2=http +  urlReload + "/locations.cgi?dC=" + x;
		}
		else {
			dC=document.form001.searchCountry.options[document.form001.searchCountry.selectedIndex].value;
			url2=http + urlReload + "/locations.cgi?dC=" + dC + "&dM=" + x;
		}

		getit();

	}

	initS=1;
	function redraw2(L) {
		http = "http://";
		if (window.location.href.indexOf("https://") != -1) { http = "https://" }
//		url2=http + urlReload + "/locations.cgi?d2=1&L=" + L + "&L0=" + "&L0=" + document.form001.d2country.options[document.form001.d2country.selectedIndex].value + "&L1=" + document.form001.d2state.options[document.form001.d2state.selectedIndex].value + "&L2=" + document.form001.d2region.options[document.form001.d2region.selectedIndex].value + "&L3=" + document.form001.d2suburb.options[document.form001.d2suburb.selectedIndex].value;
		url2=http + urlReload + "/locations.cgi?d2=1&L=" + L + "&L0=";
		if (document.form001.d2country.options.length!=0) {
			url2+=document.form001.d2country.options[document.form001.d2country.selectedIndex].value;
		}
		url2 += "&L1=";
		if (document.form001.d2state.options.length!=0) {
			url2+=document.form001.d2state.options[document.form001.d2state.selectedIndex].value;
		}
		url2 += "&L2=";
		if (document.form001.d2region.options.length!=0) {
			url2+=document.form001.d2region.options[document.form001.d2region.selectedIndex].value;
		}
		url2 += "&L3=";
		if (document.form001.d2suburb.options.length!=0) {
			url2+=document.form001.d2suburb.options[document.form001.d2suburb.selectedIndex].value;
		}
		getit2(L);
	}

	var xmlhttp;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	try {
		xmlhttp = new ActiveXObject( 'Msxml2.XMLHTTP' );
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject( 'Microsoft.XMLHTTP' );
			} catch (E) {
			xmlhttp = false;
		}
	}
	@else
		if (
		!xmlhttp && document.createElement ) {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}@end @*/

	if ( !xmlhttp && document.createElement ) {
		xmlhttp = new XMLHttpRequest();
	}

	function getit2(L) {

		sel0 = document.form001.d2country.selectedIndex;
		document.form001.d2country.options.length=1;
		document.form001.d2country.options[0].text = "Loading...";
		document.form001.d2country.disabled=1;

		sel1 = document.form001.d2state.selectedIndex;
		document.form001.d2state.options.length=1;
		document.form001.d2state.options[0].text = "";
		document.form001.d2state.disabled=1;

		sel2 = document.form001.d2region.selectedIndex;
		document.form001.d2region.options.length=1;
		document.form001.d2region.options[0].text = "";
		document.form001.d2region.disabled=1;

		sel3 = document.form001.d2suburb.selectedIndex;
		document.form001.d2suburb.options.length=1;
		document.form001.d2suburb.options[0].text = "";
		document.form001.d2suburb.disabled=1;
		var now = new Date(), dif, txt, url = url2;
		if( url ) {
			xmlhttp.open( 'GET', url, true );
			xmlhttp.onreadystatechange = function() {
				if ( xmlhttp.readyState===4 ) {
					dif = new Date() - now;
					txt = xmlhttp.responseText;
					yeh = new Array();
					yeh = txt.split("\n");
					yeh2 = txt.split("\n");
					oldLevel="";
					for (i=0; i!=yeh.length; i++) {
						if (yeh[i].length!=0) {
							if (yeh[i].indexOf("test") == -1) {
								yeh2 = yeh[i].split("|");
								obj = eval("document.form001.d2" + yeh2[0]);
								if (oldLevel != yeh2[0]) {
									obj.options.length=0;
									oldLevel = yeh2[0];
								}
								obj.options[obj.options.length] = new Option();
								obj.options[obj.options.length-1].value = yeh2[1];
								obj.options[obj.options.length-1].text = yeh2[2];
							}
							else {
//								alert(yeh[i]);
							}
						}
					}
				} 
			
				document.form001.d2country.disabled=0;
				document.form001.d2state.disabled=0;
				document.form001.d2region.disabled=0;
				document.form001.d2suburb.disabled=0;
				if (sel0 != -1) {
//					if (L==0) { document.form001.d2country.selectedIndex=sel0 }
					document.form001.d2country.selectedIndex=sel0;
//					else { document.form001.d2country.selectedIndex=0 }
				}

				if (sel1 != -1) {
					if (L==1) { document.form001.d2state.selectedIndex=sel1 }
					else { document.form001.d2state.selectedIndex=0 }
				}

				if (sel2 != -1) {
					if (L==2) { document.form001.d2region.selectedIndex=sel2; document.form001.d2state.selectedIndex=sel1 }
					else { document.form001.d2region.selectedIndex=0 }
				}

			}
			xmlhttp.send( null );
		

		}
	}


	function getit(f) {

		document.form001.searchCountry.options.length=1;
		document.form001.searchCountry.options[0].text = "Loading...";
		document.form001.searchCity.options.length=1;
		document.form001.searchCity.options[0].text = "Loading...";
		document.form001.searchLocation.options.length=1;
		document.form001.searchLocation.options[0].text = "Loading...";

		document.form001.searchCountry.disabled=1;
		document.form001.searchCity.disabled=1;
		document.form001.searchLocation.disabled=1;

		iG=0;
		counter=0;
		iG3done=0;
		var now = new Date(), dif, txt, url = url2;
		if( url ) {
			xmlhttp.open( 'GET', url, true );
			xmlhttp.onreadystatechange = function() {
				if ( xmlhttp.readyState===4 ) {
					dif = new Date() - now;
					txt = xmlhttp.responseText;
					yeh = new Array();
					yeh = txt.split("\n");
					for (i=0; i!=yeh.length; i++) {
						if (yeh[i].indexOf("[search")!=-1) { iG=0 }

						if (yeh[i].length == 0) {
							iG=4;
						}

						if (iG==1) {
							yeh2 = new Array();
							yeh2 = yeh[i].split("^");
							document.form001.searchCountry.options[counter] = new Option();
							document.form001.searchCountry.options[counter].value = yeh2[0];
							document.form001.searchCountry.options[counter].text = yeh2[2];
							if (yeh2[1]==1) { document.form001.searchCountry.options[counter].selected = true }
							counter++;
						}
						else if (iG==2) {
							if (yeh[i] == "-") {
								document.form001.searchCity.options[counter] = new Option();
								document.form001.searchCity.options[counter].value = "X";
								document.form001.searchCity.options[counter].text = "-------------------";
							}
							else {
								yeh2 = new Array();
								yeh2 = yeh[i].split("^");
								document.form001.searchCity.options[counter] = new Option();
								document.form001.searchCity.options[counter].value = yeh2[0];
								document.form001.searchCity.options[counter].text = yeh2[2];
								if (yeh2[1]==1) { document.form001.searchCity.options[counter].selected = true }
							}
							counter++;
						}
						else if (iG==3) {
							yeh2 = new Array();
							yeh2 = yeh[i].split("^");
							document.form001.searchLocation.options[counter] = new Option();
							document.form001.searchLocation.options[counter].value = yeh2[0];
							document.form001.searchLocation.options[counter].text = yeh2[2];
							if (yeh2[1]==1) { document.form001.searchLocation.options[counter].selected = true }
							counter++;
							iG3done=1;
						}

						if (yeh[i] == "[searchCountry]") {
							iG=1;
						}
						else if (yeh[i] == "[searchCity]") {
							iG=2;
							counter=0;
						}
						else if (yeh[i] == "[searchLocation]") {
							document.form001.searchLocation.options[0] = new Option();
							document.form001.searchLocation.options[0].value = "Z";
							document.form001.searchLocation.options[0].text = "All Locations";
							iG=3;
							counter=1;
						}
					}
				} 
			
				document.form001.searchCountry.disabled=0;
				document.form001.searchCity.disabled=0;
				document.form001.searchLocation.disabled=0;

			}
			xmlhttp.send( null );
		}
	}



Xoffset=-60;
Yoffset= 20;
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers;
var ns6=document.getElementById&&!document.all;
var ie4=document.all;

if (ns4) { skn=document.dek }
else if (ns6) { skn=document.getElementById("dek").style }
else if (ie4) { skn=document.all.dek.style }
if (ns4) { document.captureEvents(Event.MOUSEMOVE) }
else { skn.visibility="visible"; skn.display="none" }
document.onmousemove=get_mouse;

function popup(msg) {
	//msg = incArray[msg];
	if (msg == "") { return 1 }
	var content="<TABLE WIDTH=150 BORDER=0 bgcolor=black CELLPADDING=1 CELLSPACING=1><TD aLIGN=center bgcolor=white>" + msg + "</TD></TABLE>";
  yyy=Yoffset;
  if(ns4){ skn.document.write(content);skn.document.close();skn.visibility="visible" }
  if(ns6){ document.getElementById("dek").innerHTML=content;skn.display='' }
  if(ie4){ document.all("dek").innerHTML=content;skn.display='' }
}

function popup2(msg) {
//	if (msg == "") { return 1 }
	var content="<TABLE WIDTH=150 BORDER=0 bgcolor=black CELLPADDING=1 CELLSPACING=1><TD aLIGN=center bgcolor=white>" + iA[msg] + "</TD></TABLE>";
  yyy=Yoffset;
  if(ns4){ skn.document.write(content);skn.document.close();skn.visibility="visible" }
  if(ns6){ document.getElementById("dek").innerHTML=content;skn.display='' }
  if(ie4){ document.all("dek").innerHTML=content;skn.display='' }
}

iA=new Array();
function p2(v,msg) {
//	if (msg == "") { return 1 }
	incA = new Array();
	incA = iA[v].split("^");
	var content="<TABLE WIDTH=150 BORDER=0 bgcolor=black CELLPADDING=1 CELLSPACING=1><TD aLIGN=center bgcolor=white>" + incA[msg] + "</TD></TABLE>";
  yyy=Yoffset;
  if(ns4){ skn.document.write(content);skn.document.close();skn.visibility="visible" }
  if(ns6){ document.getElementById("dek").innerHTML=content;skn.display='' }
  if(ie4){ document.all("dek").innerHTML=content;skn.display='' }
}

function fR(rates) {
	tmp = new Array();
	tmp2 = new Array();
	tmp = rates.split("|");
	rates="";
	bgcolor="white";
	for (i=0; i!=tmp.length-1; i++) {
		tmp2 = tmp[i].split("^");
		rates += "<tr bgcolor=" + bgcolor + "><td nowrap>" + tmp2[0] + ": \$" + tmp2[1] + "</td></tr>";
		if (bgcolor=="white") { bgcolor="#EAEAEA" }
		else { bgcolor="white" }
	}
	popup("<table cellpadding=4 cellspacing=1 border=0><tr><Td nowrap><b>Full Rates for Room Types:</b></td></tr>" + rates + "</table>");
}

function get_mouse(e) {
  var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
  if (x>120) {
		skn.left=x-120;
	}
  var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
  skn.top=y+yyy;
}

function kill() {
  yyy=-1000;
  if (ns4) { skn.visibility="hidden" }
  else if (ns6 || ie4) { skn.display="none" }
}

function k() {
  yyy=-1000;
  if (ns4) { skn.visibility="hidden" }
  else if (ns6 || ie4) { skn.display="none" }
}


