sfHover = function() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function showNav2() {
	document.getElementById('nav02').className = 'snavEnjoy';
}

function hideNav2() {
	document.getElementById('nav02').className = 'navEnjoy';
}

function trim(inputString)
{
	if (typeof inputString != "string") { return inputString; }

	var retValue = inputString;
	var ch = retValue.substring(0, 1);

	// CHECKS FOR SPACES AT THE BEGINNING OF THE STRING
	while (ch == " ") 
	{
		retValue = retValue.substring(1, retValue.length);
		ch = retValue.substring(0, 1);
	}
	ch = retValue.substring(retValue.length-1, retValue.length);

	// CHECKS FOR SPACES AT THE END OF THE STRING
	while (ch == " ") 
	{ 
		retValue = retValue.substring(0, retValue.length-1);
		ch = retValue.substring(retValue.length-1, retValue.length);
	}

	// LOOK FOR MULTIPLE SPACES WITHIN THE STRING.	
	while (retValue.indexOf("  ") != -1) 
	{ 
		retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
	}

   return retValue; 
} 

function ApplyWithRate() {
	if (trim(document.getElementById("Company_RateCode").value) == '') {
		alert('Please enter your rate code.');
		document.getElementById("Company_RateCode").select();
	}
	else {
		jvarURL = "applyform.cfm?RateCode=" + document.getElementById("Company_RateCode").value.toUpperCase();
		location.href = jvarURL;
	}
}