// JavaScript Document

// Newsletter Pop Up Window
function BP_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function emailCheck(theForm){
	
	var errorString = "";
	
	if(theForm.firstname.value.length<1){
		errorString = errorString+"Your first name\r\n";
	}
	
	if(theForm.lastname.value.length<1){
		errorString = errorString+"Your last name\r\n";
	}
	
	if(theForm.email.value.length<1){
		errorString = errorString+"Your email address\r\n";
	} else if((theForm.email.value.indexOf("@")<1) || (theForm.email.value.indexOf(".")<1)){
		errorString = errorString+"A valid email address\r\n";
	}

	if(errorString.length>0){
		alert("Sorry, there was a problem. Please check you have entered the following;\r\n"+errorString);
		return false;
	} else {
		return true;
	}
}

