 /******************************************************************************
* lib_temagami.js                                                              *
*                                                                              *
* Temagami Shores v.2 javascript library, form validation functions,           *
*******************************************************************************/

function openWeather()
{
open ("weather.asp","Weather", "height=90,width=150,left=250,top=250,screenX=250,screenY=250,scrollbars=no,location=0,resizable=no,status=no,border=no")
}
function openGallery()
{
open ("gallery.asp","Gallery", "height=450,width=600,scrollbars=no,location=0,resizable=no,status=no,border=no")
}
function popUp()
{
open ("pop_package.asp","Package", "height=200,width=270,scrollbars=yes,location=0,resizable=no,status=no,border=no")
}

function openSample()
{
open ("gallery.asp","Gallery", "height=450,width=600,scrollbars=no,location=0,resizable=no,status=no,border=no")
}
function openPhoto(variable_value) 
{
open ("photo_large.asp?id="+variable_value+"","Photo", "height=400,width=600,scrollbars=no,location=0,resizable=no,status=no,border=no")
}

	function VerifyRequest()
	{
	var email_ad=document.form2.email.value
		if (document.form2.fname.value == "")
		{
			alert ("Please enter your full name!");
			return false;
		}
		else if (document.form2.lname.value == "")
		{
			alert ("Please enter your full name!");
			return false;
		}
				
		else if (document.form2.street.value == "")
		{
			alert ("Please enter your full mailing address");
			return false;
		}
		else if (document.form2.city.value == "")
		{
			alert ("Please enter your full mailing address");
			return false;
		}
		else if (document.form2.province.value == "")
		{
			alert ("Please enter your full mailing address");
			return false;
		}
		else if (document.form2.postal.value == "")
		{
			alert ("Please enter your full mailing address");
			return false;
		}
		else if (document.form2.phone.value == "")
		{
			alert ("You must enter a phone number at which we may contact you to confirm our availability.");
			return false;
		}		
		else if ((email_ad.indexOf("@")==-1) || (email_ad.indexOf(".")==-1))
		{
			alert ("Please enter a valid email address at which we may contact you to confirm our availability.");
			return false;
		}
		else if (document.form2.party.value == "")
		{
			alert ("Please enter the number of people in your party (if unsure, estimate).");
			return false;
		}																			
		else		
			return true;
	}
