// JavaScript Document
function ajaxvalidate(form_id) {
	var f_object = form_id.elements;
	for (var i=0; i < f_object.length; i++ ) {
		if (f_object[i].name != '') {
			// state
			if(f_object[i].value == "none") {
				alert("Choose a State");
				return false;
			}
			// end state
			if ( f_object[i].alt == 1) { 
				ret = validate_value(f_object[i]);
				if(ret == false) return false;
			}
		}
	}
	document.form.submit()
}


//request.send(param);

function validate_value(y){
	if(y.value==''){
		alert('Please fill the following field!');
		y.style.border = '2px solid #ff0000';
		y.style.background = '#ffddfa';
		y.focus();
		return false;
	}
return true;
}
