sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	// for each list item in the menu...
	for (var i=0; i < sfEls.length; i++) {
		// Is this IE7?  If so, use onmouseleave to fix the fact that onmouseout won't fire
		is_IE7 = navigator.appVersion.indexOf("MSIE 7.0") != -1;
	
		sfEls[i].onmouseover = function() {
			this.className+=" sfHover";
			// is this a top-level menu item?
			var child_ul = this.getElementsByTagName('ul')[0];
			if (child_ul && is_IE7){
				// fix for IE7
				child_ul.style.position = 'static';
			}
		}

		sfEls[i].onmouseleave = function() {
			// is this a top-level menu item?
			var child_ul = this.getElementsByTagName('ul')[0];
			if (child_ul && is_IE7){
				// fix for IE7
				child_ul.style.position = 'absolute';
				child_ul.style.left = '-9000px';
			}
		}
	
		sfEls[i].onmouseout = function() {
			this.className=this.className.replace(new RegExp(" sfHover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

function getLanderLink () {
	var dreferrer = document.referrer;
	if (dreferrer == "" || dreferrer.match("http://www.low.com") != null || dreferrer.match("http://low.com") != null){
		//type-in traffic
  		window.location = "http://t.onrampadvertising.com/LowInsurance/?x=Fou4QzH8fYnLLVfCqcc/5QJCBRvqWjoKTopX";
	} else {
		//SEO traffic
		window.location = "http://t.onrampadvertising.com/LowInsurance/?x=EFqyQzH8fYnLLVfCqcc/5QJCBZEfW9dPR7Uk";
	}
}

function getQueryStringVariable(variable) {
	var query = window.location.search.substring(1);
	var vars = query.split('&');
	for (var i=0;i<vars.length;i++) {
		var pair = vars[i].split('=');
		if (pair[0] == variable) {
			return pair[1];
		}
	}
}
function healthResults(form){
	var healthType = getQueryStringVariable('healthInsType');
	var healthzip = getQueryStringVariable('zip');
	if(healthType != null){
		document.getElementById('text').innerHTML = "";
		document.getElementById('healthform').id = "healthform2";
	}

	bwapsprodid = healthType;
	bwapsstate = "";
	bwapszip = healthzip;
	bwapsaid = "10253";
	bwapscid = "431";
	bwapsmaxads = "5";
	bwapsadsource = "";

	
}