<!-- //hide the script
function checkEmail(strng) {
	var error = "";

	var emailFilter=/^.+@.+\..{2,6}$/;

	if (!(emailFilter.test(strng))) {
		return false;
	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/

	if (strng.match(illegalChars)) {
		return false;
	}

	return true;
}

function form_validator(theForm)
{

 	if(theForm.sender.value == "") {
 		 alert("Please enter your Full Name.");
 		 theForm.sender.focus();
 		 return(false);
 	}

 	if(theForm.address.value == "") {
 		 alert("Please enter your Address.");
 		 theForm.address.focus();
 		 return(false);
 	}

 	if(theForm.telephone.value == "") {
 		 alert("Please enter your Telephone Number.");
 		 theForm.telephone.focus();
 		 return(false);
 	}

	if(!checkEmail(theForm.email.value)) {
		 alert("Please enter a valid Email Address");
		theForm.email.focus();
		 return false;
	}

	return (true);
}

function checkSubmit(obj, e) {
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return false;

	if (keycode == 13 || keycode == 0) {

		usePointFromPostcode(document.getElementById('gmap-from').value, loadDirectionsFromPoint);
		return false;
	}
	return true;
}

function PrintMap() {
var WinPrint =
window.open('', '', 'width=600,height=600,left=0,top=0,toolbar=0,scrollbars=1,status=0');

	WinPrint.document.write('<html><head><link rel="stylesheet" href="/hotel.css" type="text/css" /></head><body>');
	//WinPrint.document.write('<div id="gmap" style="width: 580px; height: 480px;">' + document.getElementById('gmap').innerHTML + '</div>');
	WinPrint.document.write('<div id="gdirections" style="width: 580px;"><div id="gmap-panel" style="padding: 5px;">' + document.getElementById('gmap-panel').innerHTML + '</div></div></body></html>');

	WinPrint.document.close();
	WinPrint.focus();
	WinPrint.print();
}

// end script hiding -->
