function validate(frm){
	var str = "";
	valAr = Array("os0","first_name","last_name","address1","city","state","night_phone_a","night_phone_b","night_phone_c");
	valDesc = Array("Event","First name","Last name","Address","City","State","Area Code","Prefix","Phone number");
	for(x = 0; x < valAr.length; x++){
		fld = eval("document.mainform." + valAr[x]);
		if(fld.value.length == 0){
			str += valDesc[x] + "\n";
		}
		
	}
	if(str.length > 0){
		alert("You must complete the form. Please fill in the following fields\n" + str);
		return false;
	}

	var r = document.getElementById("chk_release");
	var chk = document.getElementById("release");
	if( r == 0){
		return;
	}else{
		if(chk.checked == false){
			alert("You must agree to the liability release to continue");
			return false;
		}
	}
}

function checkNum(obj,num,fcs){
	isNumber(obj);
	fs = eval("document.mainform." + fcs);
	chk = obj.value.length;
	if(chk == num){
		fs.focus();
	}
}

function isNumber(field) {
	var re = /^[0-9]*$/;
	if (!re.test(field.value)) {
	//alert('Value must be all numberic charcters, including "." or "," non numerics will be removed from field!');
	field.value = field.value.replace(/[^0-9-'.'-',']/g,"");
	}
}

function enable(obj){
	sbmt = document.getElementById("go");
	if(obj.checked == true){
		sbmt.disabled = false;
	}else{
		sbmt.disabled = true;
	}
}




