//POP UP PAGE 'javascript:gallerypop("XXX.htm")'
function gallerypop(imagename) {
popwin = this.open(imagename, "gallery", "width=600,height=420,left = 0,top = 0, toolbar=no,menubar=no,location=no,scrollbars=yes,status=no,resize=no,noresize");
}
//RESERVATION FORM
function checkData()
{
	var correct = true
	
	if (document.Form1.name.value == "") {correct = false; alert("Please enter your Name!")
			document.Form1.name.focus()
			return false}
	if (document.Form1.AreaCode.value == "") {correct = false; alert("Please enter your Area Code!")
			document.Form1.AreaCode.focus()
			return false}
	if (document.Form1.phone.value == "") {correct = false; alert("Please enter your Phone Number!")
			document.Form1.phone.focus()
			return false}
				vale=document.Form1.Email.value.indexOf("@" && ".")
	if (vale==-1){  
 		alert("You must enter a valid e-mail");
		document.Form1.Email.select();
		return false}
	if (document.Form1.Guests.value == "") {correct = false; alert("Please enter the number of People \n you would like to Reserve for !")
			document.Form1.Guests.focus()
			return false}
	if (document.Form1.Referred_by.value == "No answer") {correct = false; alert("Please Select From...")
			document.Form1.AreaCode.focus()
			return false}
	if (document.Form1.Time.value == "Select Time") {correct = false; alert("Please Select Time!")
			document.Form1.AreaCode.focus()
			return false}
}
function DatePopUp(oForm)
{
	var sPage = "datepicker.php?PickedDate=" + oForm.value+ "&FormName=" + oForm.name;
	var x=340;
	var y=240;
	var x_offset = document.width/2;
	var y_offset = document.height/2;
	
	var windetails = "width=" + x + ",height=" + y + ",toolbar=0,scrollbars=0,resizable=1,screenX=" + x_offset + ",screenY=" + y_offset;  
	win = window.open(sPage,"DatePicker", windetails);
}
//EMAIL SPAM javascript:hideml();
function hideml(path1, path2, path3)
{
 path = 'mailto:antonpotvin@hotmail.com'
 path += ''
 path += ''
 location.href = path;
}
//CONTEST
var oCurrent_window;
		function PopUpWidow()
		{
			iWidth  = 650; iHeight = 500;
			// http://www.dine.to
			sPage_name = "http://www.dine.to/mycp/external_surveys/casamendoza/outside_survey_page.html";
			//sPage_name = "../../Dine_to/mycp/external_surveys/pan/outside_survey_page.html";
			
			iX_offset = parseInt( (screen.availWidth/2) - (iWidth/2) );
			iY_offset = parseInt( (screen.availHeight/2) - (iHeight/2) );

			//sValue = document.getElementById(sID_field_name).value;

			sUrl = sPage_name;

			sWindow_features = 'toolbar=0,scrollbars=1,resizable=1,width=' + iWidth + ',height=' + iHeight + ',top=' + iY_offset + ',left=' + iX_offset;
			if (!oCurrent_window || oCurrent_window.closed) {
				oCurrent_window = window.open(sUrl,'current_window', sWindow_features );
			} else {
				oCurrent_window.location = sUrl
				oCurrent_window.focus();
			}

		}
