<!--

function validate(){
	var f = document.myform;
	var name = f.name.value;
	var company = f.company_name.value;
	var phone = f.phone.value;
	var email = f.email.value;

	var how_did_you_find_acisco = f.how_did_you_find_acisco.value;
	var other_specify = f.other_specify.value;

	if(name == ""){
		alert("Please provide your name.");
		f.name.focus();
		return false;
	}
	if(company == ""){
		alert("Please provide your company's name.");
		f.company_name.focus();
		return false;
	}
	if(email == ""){
		alert("Please provide your email address.");
		f.email.focus();
		return false;
	}else if(!isValidEmail(email)){
		alert("The email address doesn't seem valid.\n Please provide a valid address.\n(ex: name@yourdomain.com)");
		f.email.focus();
		return false;
	}
	if(phone == ""){
		alert("Please provide your phone number.");
		f.phone.focus();
		return false;
	}
	if($('input[@name=request_info]:checked').size() == 0) {
		alert("Please indicate what you would like more information about.");
		f.request_info[0].focus();
		return false;
	}
	if(how_did_you_find_acisco == "") {
		alert("Please provide use with how you found Acisco.com.");
		f.how_did_you_find_acisco.focus();
		return false;
	}
	if(how_did_you_find_acisco == "other" && other_specify == "") {
		alert("Please specify how you found Acisco.com.");
		f.other_specify.focus();
		return false;
	}
	return true;
}

function isValidEmail(str){
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}


function toggle_other() {
    if($('#how_did_you_find_acisco').val() == 'other') {
        $('#other_text').show();
    }
    else {
        $('#other_text').hide();
        $('#other_specify').val('');
    }
    return true;
}

$('#how_did_you_find_acisco').change(function() {
	return toggle_other();
});

$('#how_did_you_find_acisco').ready(function() {
	return toggle_other();
});
//-->

