function RunOnLoad(countryId,cityId)
{
	QuickSearch_Onload(countryId,cityId);//user control Qs onload event in 'QuickSearch.js'
}

function openUrl(strurl)
{			
	window.parent.location.href=strurl	;
}
function onWrapup(objName){
	var img = document.getElementById("img"+objName);
	var tab = document.getElementById("td"+objName);
	if(img.src.indexOf("minus.png")>0){					
		img.src="./images/plus.png";
		tab.style.display="none";										
	}				
	else if (img.src.indexOf("plus.png")>0){
		img.src="./images/minus.png";
		tab.style.display="block";											
	}				
}
function backtotop(){
	parent.location.href = parent.location.href.replace(/(#.*)?$/,'#topOfPage')
}		
function AddToFaves_hp()
{
	var is_4up = parseInt(navigator.appVersion);
	var is_mac   = navigator.userAgent.toLowerCase().indexOf("mac")!=-1;
	var is_ie   = navigator.userAgent.toLowerCase().indexOf("msie")!=-1;
	var thePage = location.href;
	var title = '';
	if (arguments.length>0) 
		title = arguments[0]
	else
		title = document.title
		
	if (thePage.lastIndexOf('#')!=-1)

		thePage = thePage.substring(0,thePage.lastIndexOf('#'));

	if (is_ie && is_4up && !is_mac) 

		window.external.AddFavorite(thePage,title);
	
	else if ((typeof  window.sidebar ==   'object')   &&   (typeof   window.sidebar.addPanel   ==   'function'))//Gecko  
			
			window.sidebar.addPanel(title,thePage,title);  
			
	else if (is_ie || document.images)

		booker_hp = window.open(thePage,'booker_','menubar,width=325,height=100,left=140,top=60');
}	
function setqsHeightSize1(){
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
	var theframe=document.getElementById('qs')
	if (theframe && !window.opera){
		theframe.style.display="block"
		if (theframe.contentDocument && theframe.contentDocument.body.offsetHeight) {			
			var newheight = theframe.contentDocument.body.offsetHeight;
			newheight = newheight;
			theframe.height = newheight + FFextraHeight;
			theframe.width = theframe.contentDocument.body.offsetWidth;} 
		else if (theframe.Document && theframe.Document.body.scrollHeight) {
			theframe.height = theframe.Document.body.scrollHeight-12;
			theframe.width = theframe.Document.body.scrollWidth; 
			//alert(theframe.height);	
		}
		
	}
}

function setqsHeightSize(){
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
	var theframe=document.getElementById('qs')
	if (theframe && !window.opera){
		theframe.style.display="block"
		if (theframe.contentDocument && theframe.contentDocument.body.offsetHeight) {			
			var newheight = theframe.contentDocument.body.offsetHeight;
			newheight = newheight;
			theframe.height = newheight + FFextraHeight;
			theframe.width = theframe.contentDocument.body.offsetWidth;} 
		else if (theframe.Document && theframe.Document.body.scrollHeight) {
			theframe.height = theframe.Document.body.scrollHeight-12;
			theframe.width = theframe.Document.body.scrollWidth; }
		
	}
}

function qsAutoHeight(obj,lang){	
	if (window.ActiveXObject)
		if(lang=='en')
			obj.height=225;//quicksearch.document.body.scrollHeight-15 for EngLish page In IE;
		else
			obj.height=233;//quicksearch.document.body.scrollHeight-15 for Chinese page In IE;		
	else if (document.getBoxObjectFor)
		if(lang=='en')
			obj.height=235;//quicksearch.document.body.scrollHeight-15 for EngLish page In ff;
		else
			obj.height=243;//quicksearch.document.body.scrollHeight-15 for Chinese page in ff;		
}
function onWrapupCity(objName){
		var img = document.getElementById("img"+objName);
		var tab = document.getElementById("td"+objName);
		if(img.src.indexOf("minus.png")>0){					
			img.src="./images/plus.png";
			tab.style.display="none";											
		}				
		else if (img.src.indexOf("plus.png")>0){					
			img.src="./images/minus.png";
			tab.style.display="block";									
		}				
}
function onMoveOverHotel(obj){
	obj.style.color='#FF0099';		
	obj.style.textDecoration='underline';
	obj.style.cursor='hand';
}
function onMoveOutHotel(obj){
	obj.style.color='#FF0000';
	obj.style.textDecoration='none';
}