
		var subcount = 0;
		String.prototype.trim = function()
		{
			// Use a regular expression to replace leading and trailing
			// spaces with the empty string
		
			return this.replace(/(^\s*)|(\s*$)/g, "");
		}
		
		function CheckSub(f) {
			var arrFrom;
			var arrTo;
			var arr;
			var arrb;
			var i;
		
			if (f.From){
				if(!f.From.value==""){
					arrFrom = f.From.value.split(";");
					for(i=0;i<arrFrom.length;i++){
					if(!echeck(arrFrom[i])){alert("From email address is invalid, cannot send...");f.From.focus();return(false)}
					}
					}
				if(f.From.value==""){alert("From email address is invalid, cannot send...");f.From.focus();return(false)}
					}
			if (f.To){
				if(!f.To.value==""){
					arrTo = f.To.value.split(";");
					for(i=0;i<arrTo.length;i++){
					if(!echeck(arrTo[i])){alert("To email address is invalid, cannot send...");f.To.focus();return(false)}
					}
					}
				if(f.To.value==""){alert("To email address is invalid, cannot send...");f.To.focus();return(false)}
					}
			if (f.CC){
				if(!f.CC.value==""){
					arr = f.CC.value.split(";");
					for(i=0;i<arr.length;i++){
					if(!echeck(arr[i])){alert("CC email address is invalid, cannot send...\n (If you are attempting to use multi CCs, separate with semicolon)");f.CC.focus();return(false)}
					}
					}
					}
			if (f.BCC){
				if(f.BCC.value!=""){
					arrb = f.BCC.value.split(";");
					for(i=0;i<arrb.length;i++){
					if(!echeck(arrb[i])){alert("BCC email address is invalid, cannot send...\n (If you are attempting to use multi BCCs, separate with semicolon)");f.BCC.focus();return(false)}
					}
					}
					}
		 if (subcount < 1) {subcount++; return true;}
		 else {alert("This Email form has already been submitted. Thanks!"); return false;}
		}
		
		function echeck(str) {
			var at="@"
			var dot="."
			var lat=str.indexOf(at)
			var lstr=str.length
			var ldot=str.indexOf(dot)
			if (str.indexOf(at)==-1){return(false)}
			if (str.indexOf(" ")!=-1){return (false)}
			if (str.indexOf(at,(lat+1))!=-1){return (false)}
			if (str.indexOf(dot,(lat+2))==-1){return (false)}
			if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){return (false)}
			if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){return (false)}
			if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){return (false)}
			return(true)
			}
			
		function CheckVerify(f) {
			if (f.FirstName){
				if(f.FirstName.value==""){alert("First Name is empty.");f.FirstName.focus();return(false)}
				}
			if (f.LastName){
				if(f.LastName.value==""){alert("Last Name is empty.");f.LastName.focus();return(false)}
				}
			if (f.Email){
				if(!f.Email.value==""){
					if(!echeck(f.Email.value)){alert("Email address is invalid, cannot send...");f.Email.focus();return(false)}
					}
				if(f.Email.value==""){alert("Email address is empty.");f.Email.focus();return(false)}
				}
			}

function popemail(url)
	{
	window.open(url,"PopUp","width=744,height=422,resizable=yes,scrollbars=yes");
	}
	
function MyPopUp2(url)
	{
	window.open(url,"PopUp","width=550,height=520,resizable=yes,scrollbars=yes");
	}