	
	
	//If javascript is enabled make form viewable & validate
	document.getElementById("form").style.display = 'block';
	document.getElementById("sp").value = 'jsval'
	

	
	function validate(){
		
		
		//Check First Name
		if (document.Form1.FirstName.value=="" ){
			window.alert("Please fill in first name.");
			return false;
		}
		
		//Check Last Name
		if (document.Form1.LastName.value=="" ){
			window.alert("Please fill in last name.");
			return false;
		}
		
		//Check Company
		if (document.Form1.Company.value=="" ){
			window.alert("Please fill in company name.");
			return false;
		}
		
		//Check Email
		if (document.Form1.CorporateEmail.value=="" ){
			window.alert("Please fill corporate email address.");
			return false;
		}
		
		//Validate email address1
		if (document.Form1.CorporateEmail.value.indexOf("@") < 0 ){
			window.alert("E-mail Address doesn't appear to be valid.");
			return false;
		}
		if (document.Form1.CorporateEmail.value.indexOf("\.") < 0 ){
			window.alert("E-mail Address doesn't appear to be valid.");
			return false;
		}
		
		
		
		
		//Check Email Address
		if (document.Form1.CorporateEmail2.value=="" ){
			window.alert("Please fill in re-enter corporate email address for verification purposes.");
			return false;
		}
		
		//Compare two email addresses
		if (document.Form1.CorporateEmail.value!=document.Form1.CorporateEmail2.value ){
			window.alert("The two email addresses entered don't match. Please update so they do.");
			return false;
		}
		
		//submit form
		document.Form1.setAttribute("action","whitepaper-process.asp");

	}
	
	