function CheckForm(){
//********************************************************************//
//		Start Common Field Validation
//********************************************************************//

	// Inquiry
	if (document.getElementById('inquiry').selectedIndex  == 0){
		alert("Please tell us what you are inquiring about.");
		document.getElementById('inquiry').focus();
		document.getElementById('inquiry').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('inquiry').style.backgroundColor = 'white';
	}
	
	
	if (document.getElementById('first_name').value == "" ){
		alert("Please enter your First Name.");
		document.getElementById('first_name').focus();
		document.getElementById('first_name').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('first_name').style.backgroundColor = 'white';
	}

	if (document.getElementById('last_name').value == "" ){
		alert("Please enter your Last Name.");
		document.getElementById('last_name').focus();
		document.getElementById('last_name').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('last_name').style.backgroundColor = 'white';
	}

	if (document.getElementById('email').value == "" ){
		alert("Please enter your Email.");
		document.getElementById('email').focus();
		document.getElementById('email').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('email').style.backgroundColor = 'white';
	}


	if (document.getElementById('email').value != document.getElementById('confirm_email').value ){
		alert("Your email address does not match your confirm email.");
		document.getElementById('email').focus();
		document.getElementById('email').style.backgroundColor = '#f4f4f4';
		document.getElementById('confirm_email').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('email').style.backgroundColor = 'white';
		document.getElementById('confirm_email').style.backgroundColor = 'white';
	}
	
		
			// Check email Address Format	
			var str = document.getElementById('email').value;
			var instancecounter = 0;
			str += '';
			intAt = str.indexOf( '@', 1 );							// przypisanie @
			intDot = str.lastIndexOf( '.' );						// ostatni "."
			namestr = str.substring( 0, intAt );					// wszystko przed znakiem "@"
			domainstr = str.substring( intAt +1, str.length );		// wszystko po znaku "@"
			toplevelstr = str.substring( intDot +1, str.length);	// wszystko po ostatniej"."
		
			if ((str.indexOf(" ")!=-1) || (intAt == -1) || (intDot == -1 ) || (namestr.length == 0) || (domainstr.length == 0) || (intAt > intDot) || (domainstr.indexOf(".") <= 0) || (toplevelstr.length <= 1)){
				alert("Email address appears to be invalid");
				document.getElementById('email').focus();
				document.getElementById('email').style.backgroundColor = '#f4f4f4';
				document.getElementById('confirm_email').style.backgroundColor = '#f4f4f4';
				return false; 
			}else{
				document.getElementById('email').style.backgroundColor = 'white';
				document.getElementById('confirm_email').style.backgroundColor = 'white';
			}
		
		
	if (document.getElementById('company').value == "" ){
		alert("Please enter your Company Name.");
		document.getElementById('company').focus();
		document.getElementById('company').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('company').style.backgroundColor = 'white';
	}
	
	if (document.getElementById('company_url').value == "" ){
		alert("Please enter your Company URL.");
		document.getElementById('company_url').focus();
		document.getElementById('company_url').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('company_url').style.backgroundColor = 'white';
	}	
	
	if (document.getElementById('phone').value == ""){
		alert("Please enter day phone number.");
		document.getElementById('phone').focus();
		document.getElementById('phone').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('phone').style.backgroundColor = 'white';
	}	
	// Referred By
	if (document.getElementById('referred').selectedIndex  == 0){
		alert("Please tell us who referred you.");
		document.getElementById('referred').focus();
		document.getElementById('referred').style.backgroundColor = '#f4f4f4';
		return false;	
	}else{
		document.getElementById('referred').style.backgroundColor = 'white';
	}
	return true;
	
	
	
	
	
	
	
}