document.observe('dom:loaded', function () {
	var ReserContain = $('ReserContain');
	var reservation = $('MainBoxUL');
	ReserContain.setStyle({
		'opacity': 0.5					  
	});
	reservation.setStyle({opacity: 1});
	reservation.setStyle({
		left : parseInt(ReserContain.getStyle('left')) + 'px',
		top : ( parseInt(ReserContain.getStyle('top')) + parseInt($('ContentContainer').getStyle('height')) ) + 'px'
	});
});

function __doPostBack(eventTarget, eventArgument, formName) {
	var theform = makeTheForm(formName);
	
	theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
	theform.__EVENTARGUMENT.value = eventArgument;
	theform.submit();
}

function makeTheForm(formName){
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) 
		theform = eval("document."+formName);
	else
		theform = document.forms[formName];
	return theform;
		
}


function chkValidForm(formName){
	error = '';
	var theform = makeTheForm(formName);
	if(theform.name.value == "") error += '\n - Name';
	if(theform.surname.value == "") error += '\n - Surname';
	if(theform.email.value == "") error += '\n - E-Mail';
	if(theform.tel.value == "") error += '\n - Tel No.';
	if(theform.country.value == "") error += '\n - Country';
	if(theform.adult.value == "") error += '\n - No. Adults';
	if(theform.children.value == "") error += '\n - No. Childrens';
	if(theform.room.value == "") error += '\n - No. of Rooms Required';
	if(theform.chkIn.value == "") error += '\n - Check in date';
	if(theform.chkOut.value == "") error += '\n - Check out date';
	
	if(error!=""){
		alert('Please Enter: ' + error);
		return false;
	}else
		return true;
}