//dimehoteles.com 2007

function ShowWaiter() {
	try{
		var x,y;
		var test1 = document.body.scrollHeight;
		var test2 = document.body.offsetHeight
		if (test1 > test2) // all but Explorer Mac
		{
			x = document.body.scrollWidth;
			y = document.body.scrollHeight;
		}
		else // Explorer Mac;
			 //would also work in Explorer 6 Strict, Mozilla and Safari
		{
			x = document.body.offsetWidth;
			y = document.body.offsetHeight;
		}
		
		document.getElementById('courtain').style.height=y;	
		document.getElementById('courtain').style.width=x;	

		document.getElementById('courtain').style.visibility='visible';	
	}
	catch(e){}

	/*try{
		document.getElementById('flashwaiter').Rewind();
		document.getElementById('flashwaiter').Play();
	}
	catch(e){}*/

	try{
		document.getElementById('waiter').style.visibility='visible';
		HideCombos();
	}
	catch(e){}


	try{
		document.getElementById('inlinewaiterbox').style.display='inline';
	}
	catch(e){}

	try{
		setTimeout('IEWaiter()', 300);  //iexplorer 6 bug >:(
	}
	catch(e){}


}

function IEWaiter() {
	try{
		document.images["waiterloader"].src = "/Images/waiter-loader.gif";
	}
	catch(e){}	

	try{
		document.images["waiterloader2"].src = "/Images/waiter-loader-nice.gif";
	}
	catch(e){}	
}


// search box
function ShowSearchBox(id) {
	
	document.getElementById('hotelid').value=id;
	
	try{
		var x,y;
		var test1 = document.body.scrollHeight;
		var test2 = document.body.offsetHeight;
		if (test1 > test2) // all but Explorer Mac
		{
			x = document.body.scrollWidth;
			y = document.body.scrollHeight;
		}
		else // Explorer Mac;
			 //would also work in Explorer 6 Strict, Mozilla and Safari
		{
			x = document.body.offsetWidth;
			y = document.body.offsetHeight;
		}
		
		/*document.getElementById('ocultsearchbox').style.height=200;	
		document.getElementById('ocultsearchbox').style.width=500;	*/
		//document.getElementById('ocultsearchbox').style.marginTop=y;	

		document.getElementById('ocultsearchbox').style.visibility='visible';
	}
	catch(e){}

	try{
		document.getElementById('ocultsearch').style.visibility='visible';
		//HideCombos();
	}
	catch(e){}
	
	//window.scroll(0,0);

/*
	try{
		document.getElementById('inlineocultsearchbox').style.display='inline';
	}
	catch(e){}

	try{
		setTimeout('IESearchBox()', 300);  //iexplorer 6 bug >:(
	}
	catch(e){}
*/

}


function HideCombos(){  //iexplorer 6 bug >:(
    if(!window.attachEvent) return false;
    var selects = document.getElementsByTagName('select');
    for( var i=0; i<selects.length; i++ ){
        selects[i].style.visibility = 'hidden';
    }
}

function ShowCombos(){  //iexplorer 6 bug >:(
    if(!window.attachEvent) return false;
    var selects = document.getElementsByTagName('select');
    for( var i=0; i<selects.length; i++ ){
        selects[i].style.visibility = 'visible';
    }
}
