// JavaScript Document
function ajaxpage(url, containerid){
	var xmlhttp_obj = false;
	if (window.XMLHttpRequest) // if Mozilla, Safari etc
		xmlhttp_obj = new XMLHttpRequest();
	else if (window.ActiveXObject){ // if IE
		try {
		xmlhttp_obj = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e){
			try{
				xmlhttp_obj = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){}
		}
	}
	else
	return false;
	document.getElementById(containerid).innerHTML="<div style='padding:50px 0px 0px 20px'><img src='images/loader.gif' /></div>" ;
	xmlhttp_obj.onreadystatechange=function(){
		if ( xmlhttp_obj.readyState == 4 && xmlhttp_obj.status==200 )
		document.getElementById(containerid).innerHTML=xmlhttp_obj.responseText;
	}
	xmlhttp_obj.open('GET', url, true);
	xmlhttp_obj.setRequestHeader("Accept-Charset","UTF-8");
	xmlhttp_obj.send(null);
}

function checkEMail(){
	var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
	var email = document.getElementById("txtEmail");

	if (!filter.test(email.value)) {
		alert('Invalid Email');
		email.focus;
		return false;
	}else if(email.value==""){
		alert("Email's not blank");	
		email.focus;
	}
	else{
		return true;
	}
}

function RegEmail(lang){
	var emailStr = document.getElementById("txtEmail");
	if(checkEMail()){
		ajaxpage('EmailReg.aspx?email='+emailStr.value+"&lang="+lang,'box_right');	
	}
}

function popup(url) 
{
	//var lang = document.getElementById("ctl00_txtLang").value;		
	params  = 'width='+screen.width;
	params += ', height='+screen.height;
	params += ', top=0, left=0'
	params += ', fullscreen=yes,scrollbars=yes';

 newwin=window.open(url,'window1', params);
 if (window.focus) {newwin.focus()}
 return false;
}

function checkBooking(){
	ajaxpage('Reversation.aspx','box_right');		
}

/*window.onload = function(){
    ajaxpage("BoxAdsTop.aspx","top_ads_item");
    ajaxpage("BoxAdsBottom.aspx","bottom_ads_item");
}*/






