function pageRefresh()
{
	document.getElementById('number').blur();
	document.getElementById('number').value='';
}
function Validate()
{
	if(frmEnquiry.txtName.value=="")
	{
		alert("Please enter the name");
		frmEnquiry.txtName.focus();
		return false;
	}
	if(frmEnquiry.txtEmail.value=="")
	{
		alert("Please enter the Email Id");
		frmEnquiry.txtEmail.focus();
		return false;
	}
	else if (checkmail(frmEnquiry.txtEmail.value) == false)
	{
			alert("Please enter valid Email Id");
			frmEnquiry.txtEmail.focus();
			return false;
	}
	if(frmEnquiry.txtPhone.value=="")
	{
		alert("Please enter the phone no.");
		frmEnquiry.txtPhone.focus();
		return false;
	}
	frmEnquiry.submit();
}

function ValidateRoom()
{
	if(frmRoomEnquiry.txtName.value=="")
	{
		alert("Please enter the name");
		frmRoomEnquiry.txtName.focus();
		return false;
	}
	if(frmRoomEnquiry.txtPhone.value=="")
	{
		alert("Please enter the phone no.");
		frmRoomEnquiry.txtPhone.focus();
		return false;
	}
	if(frmRoomEnquiry.txtEmail.value=="")
	{
		alert("Please enter the Email Id");
		frmRoomEnquiry.txtEmail.focus();
		return false;
	}
	else if (checkmail(frmRoomEnquiry.txtEmail.value) == false)
	{
			alert("Please enter valid Email Id");
			frmRoomEnquiry.txtEmail.focus();
			return false;
	}
	if(frmRoomEnquiry.txtDays.value=="")
	{
		alert("Please enter the No. of Days");
		frmRoomEnquiry.txtDays.focus();
		return false;
	}
	frmRoomEnquiry.submit();
}

function roomType()
{
	if( document.getElementById("rType").value=="Super Deluxe")
	{
		document.getElementById("sdlx").style["display"]='inline';
		document.getElementById("lxy").style["display"]='none';
		document.getElementById("suite").style["display"]='none';
	}
	if( document.getElementById("rType").value=="Luxury")
	{
		document.getElementById("sdlx").style["display"]='none';
		document.getElementById("lxy").style["display"]='inline';
		document.getElementById("suite").style["display"]='none';
	}
	if( document.getElementById("rType").value=="Suite")
	{
		document.getElementById("sdlx").style["display"]='none';
		document.getElementById("lxy").style["display"]='none';
		document.getElementById("suite").style["display"]='inline';
	}
	if( document.getElementById("rType").value=="--Select--")
	{
		document.getElementById("sdlx").style["display"]='none';
		document.getElementById("lxy").style["display"]='none';
		document.getElementById("suite").style["display"]='none';
	}
}


var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
function checkmail(eid)
{
	return emailfilter.test(eid)
}

function SendSMS()
{	
 	/*var newWindow = window.open("sms.php?MSG="+document.getElementById('number').value,"myWindow","top=50%, left=50%, width=200,height=50");
	alert("Your SMS has been sent...");
	setTimeout("newWindow.close();document.getElementById('number').value='';",1500);*/
	$('#mysmsData').load('sms.php',{MSG:document.getElementById('number').value},function(){
		$('#mysmsData').html('');
		alert('SMS has been sent succesfully...');
		document.getElementById('number').value='';
		/*if(($('#mysmsData').html()).indexOf('sent')>=0 || ($('#mysmsData').html()).indexOf('Sent')>=0)
		{
			$('#mysmsData').html('');
			alert('SMS has been sent succesfully...');
			document.getElementById('number').value='';
		}
		else
		{
			$('#mysmsData').html('');
			alert('Error in sending SMS please try later...');
		}*/
	});
}