function ValidateForm()
{
	var strErr = "";
	
	var tmpZip = trim(document.getQuoteForm.zip.value);
	document.getQuoteForm.zip.value = tmpZip;
	if (tmpZip.search(/^\d{5}/) == -1 ||  tmpZip.length > 5) {
		strErr = strErr + " \n Zip Code is required and must be in the format: \n\n 00000.\n";
	}
	if (!document.getQuoteForm.Insured[0].checked && !document.getQuoteForm.Insured[1].checked) {
		strErr = strErr + "\n Currently Insured is required and you must select: \n\n Yes or No.\n";
	}
	if (strErr != "") {
		alert(strErr);
		return false;
	}
	preserveRefby();
	return true;
}

function trim(str){
	return((" "+ str).replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,"$1"));
}

/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}