function refreshCaptcha()
{
	var img = document.images['captchaimg'];
	img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
}

function checkForm(Form){
	if (Form.name.value == ""){
		alert("You must provide your name.")
		return false
	}
	if (Form.company.value == ""){
		alert("You must provide your company name.")
		return false
	}
	
	if (Form.phone.value == ""){
		alert("You must provide a phone number.")
		return false
	}
	
	if (Form.email.value == ""){
		alert("You must provide an Email address.")
		return false
	}
	
	if (!validateEmail(Form.email.value)){
		alert("You must provide a valid Email address.")
		return false
	}
	
	if (Form.city.value == ""){
		alert("You must provide the city where you are located.")
		return false
	}
	if (Form.state.value == ""){
		alert("You must provide the state where you are located.")
		return false
	}
	if (Form.category.value == ""){
		alert("You must provide the category you are interested in.")
		return false
	}
	if (Form.captcha.value == ""){
		alert("You must enter in the captcha.")
		return false
	}
	
	
	return true
	
}

function validateEmail(emailAddress){
	atPos = emailAddress.indexOf("@",1)
	periodPos = emailAddress.indexOf(".",atPos)
	
	if (atPos == -1){
		return false
	}
	
	if (periodPos == -1){
		return false
	}
	
	if ((periodPos - atPos) < 3 ){
		return false
	}
	
	if ((emailAddress.length - periodPos) < 3){
		return false
	}
	
	return true

}



