/*
* This function opens and sizes the window to view pictures on the photos page.
*/
function popPictureWindow(photo_dir)
{
	window.open('photos/' + photo_dir + '/index.html','PHOTOS','top=80,left=100,width=700,height=650,resizable=yes,toolbar=no,status=no,scrollbars=yes,location=no,menubar=no,directories=no');
}

/*  
* This function opens and sizes the window to view the venue information.
*/  
function popClubWindow(url, venue)
{
	window.open( url + '?venue=' + venue,'VENUE','width=220,height=250,top=100,left=100,menubar=no,location=no,resizable=no,scrollbars=no,status=no');
	
}

/*  
* This function validates the email submittion form.
*/  
function checkForm(form)
{
	var email = document.signup.email.value;
	// Expression to check for valid email format.
	var emailFilter=/^.+@.+\..{2,3}$/; 
	// Expression to check for any illegal charicters.
	var illegalChars=/[\(\)\<\>\,\;\:\\\/\"\[\]]/;  
	
	if (email == "")
	{
		alert("Please enter a valid Email Address.");
		document.signup.email.focus();
		return false;
	}
	else if (!(emailFilter.test(email))) {                 
        alert("Please enter a valid email address.");
        document.signup.email.value = "";
        document.signup.email.focus();
		return false;
    }
    else if (email.match(illegalChars)) {
        alert("Please enter a valid email address.");
        document.signup.email.value = "";
        document.signup.email.focus();
		return false;
    }
    else{
        alert("THANKS! You'll be hearing from us soon.");
	    return true;
	}
	
}