onscroll=function() {
	if ($("rightside") && window.XMLHttpRequest) {
		if (document.documentElement.scrollTop>105) {
			$("rightside").style.position="fixed"; 
			$("rightside").style.top="0";
		}
		else {
			$("rightside").style.position="absolute"; 
			$("rightside").style.top="105px";
		}
	}
}
onload=function() {
	externalLinks();
	if ($("advertise_page")) {
		for (var i=0; i<document.links.length; i++) {
			var rels=new Array();
			if (document.links[i].getAttribute("rel")) {
				rels=document.links[i].getAttribute("rel").split(" ");
				//if (rels.inArray("external") && rels.inArray("nofollow")) {
				if (document.links[i].getAttribute("rel")=="external") {
					document.links[i].onclick=function() {
						newwindow=window.open(this.href, "name", "height=400,width=480,scrollbars=yes");
						if (window.focus) {newwindow.focus()}
						return false;
					}
				}
			}
		}
	}
	function popitup(url) {
		newwindow=window.open(url,"name","height=400,width=640");
		if (window.focus) {newwindow.focus()}
		return false;
	}
	if ($("go_state")) {
		$("go_state").setAttribute("disabled", "disabled");
		$("sel_state").onchange=function() {
			if (this.value!="") $("go_state").removeAttribute("disabled");
			else $("go_state").setAttribute("disabled", "disabled");
		}
		$("go_state").onclick=function() {window.location.href="http://www.commercial-plumbing.com/"+$("sel_state").value;}
	}
}
function $(id) {return document.getElementById(id);}
function externalLinks() {
	for (var i=0; i<document.links.length; i++) {
		if (document.links[i].getAttribute("rel")=="external") {
			document.links[i].onclick=function() {
				window.open(this.href);
				return false;
			}
		}
	}
}