//radio button and checkbox validationfunction noneChecked(field) {	if (numChecked(field) == 0) {		return true;	} else {		return false;	}}function numChecked(field) {	var count = 0;	if (undefined == field.length) { 		if (field.checked) { 			return 1;     		} else { 			return 0;    		}	}	for (i = 0; i < field.length; i++) { 		if (field[i].checked) {  			count++; 		}	}	return count;}//dropdown field validationfunction noneSelected(field) {	if(field.selectedIndex < 1) {		return true;	} else {		return false;	}}function ValidateAreaCode(strAreaCode) {	var intLen, intIdx, cChar;	var intDigCount = 0;	if (!strAreaCode) return false;	// iterate through string, counting numeric characters	intLen = strAreaCode.length;	for (intIdx=0; intIdx < intLen; intIdx++) {		cChar = strAreaCode.charAt(intIdx);		if (cChar == parseInt(cChar,10)) intDigCount++;	}	if (intDigCount >= 3)	return true;	else return false;}function ValidatePhoneNumber(strPhoneNumber) {	var intLen, intIdx, cChar;	var intDigCount = 0;	if (!strPhoneNumber) return false;	// iterate through string, counting numeric characters	intLen = strPhoneNumber.length;	for (intIdx=0; intIdx < intLen; intIdx++) {		cChar = strPhoneNumber.charAt(intIdx);		if (cChar == parseInt(cChar,10)) intDigCount++;	}	if (intDigCount == 10)	return true;	else return false;}function formatPhone (fld) {	var phone = fld.value;// Phone number entered with dashes or dots	//111-111-1111	if (phone.length == 12) {		while (phone.indexOf(".") > -1) {			phone = phone.replace(".", "-");		}		phone = "(" + phone.substr(0, 3) + ") " + 		phone.substr(4, 3) + "-" + phone.substr(8, 4);		return phone;	}// Phone entered with no punctuation	//2222222222	if (phone.length == 10) {		phone = "(" + phone.substr(0, 3) + ") " + 		phone.substr(3, 3) + "-" + phone.substr(6, 4); 		return phone;	} // end if		//(920) 444-4444	if (phone.length == 14) return phone;// we can't deal with this format	alert("Phone must be entered as:" + 		"\n\n    999.999.9999 or " +         "\n    999-999-9999 or " +         "\n    9999999999")	fld.focus(); 	return phone;}function ValidateEmail(strEmail) {	if (strEmail.indexOf("@") + "" != "-1" && strEmail.indexOf(".") + "" != "-1" && strEmail != "") 		return true; 	else return false;}function isNum(value) {  if (!value) return false;  for(var i = 0; i < value.length; i++) {    var c = value.charAt(i);    var ci = parseInt(c);    if(isNaN(ci)) {      return false;    }  }  return true;}function SetCookie (name,value,expires,path,domain,secure) {document.cookie = name + "=" + escape (value) +((expires) ? "; expires=" + expires.toGMTString() : "") +((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "") +((secure) ? "; secure" : ""); }function GetCookie (name) {var arg = name + "=";var alen = arg.length;var clen = document.cookie.length;var i = 0;while (i < clen) {var j = i + alen;if (document.cookie.substring(i, j) == arg)return getCookieVal (j);i = document.cookie.indexOf(" ", i) + 1;if (i == 0) break;}return null;}function getCookieVal (offset) {var endstr = document.cookie.indexOf (";", offset);if (endstr == -1)endstr = document.cookie.length;return unescape(document.cookie.substring(offset, endstr));}function DeleteCookie (name,path,domain) {if (GetCookie(name)) {document.cookie = name + "=" +((path) ? "; path=" + path : "") +((domain) ? "; domain=" + domain : "") +"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}function getPath() {	var path = window.location.pathname.toLowerCase();	var nsfPos = path.indexOf(".nsf");	path = path.substr(0, nsfPos + 5);	path = path.charAt(path.length-1) == "/" ? path:path+"/"; 	return path;}