/* Primary nav img rollover func, by B. Hyslop */
	// arg[0]=img id, arg[1]=change status to */
function swap(){
var args=swap.arguments;
var path='imgs/nav/';
var rollArray = new Array("navhome","your_home","navbiz","your_biz","navcustsvc","cust_svc","navrebates","rebates","navsafety","safety","navfield","field_work","navclaims","claims");

	imgID=rollArray[args[0]*2];
	imgFile=rollArray[args[0]*2+1];
	document.images[imgID].src=''+path+imgFile+'_'+args[1]+'.gif';
} // end


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function popWin()
{
	var args;
	args=popSite.arguments;
	window.open(args[0],args[1],'height=460,width=640,left=20,top=20,screenX=20,screenY=20,toolbar,location,scrollbars,menubar,resizable,status');
}

function popSite()
{
	var args;
	args=popSite.arguments;
	window.open(args[0],args[1],'height=460,width=640,left=20,top=20,screenX=20,screenY=20,toolbar,location,scrollbars,menubar,resizable,status');
}


function loadinparent(url, closeSelf){ // used by popups
	self.opener.location = url;
	if(closeSelf) self.close();
	}

// ************ added poll functions  - Jeff Held 12/2003 ***************
var doThePoll = false;	
function doPoll () {
	
	var theURL = document.URL;
	// determine pages poll appears on based on URL
	// rebates
	if (theURL.indexOf("/res/") != -1) {
		if (theURL.substr(-5,5) == "/res/") {
			doThePoll = true;
		}
		if(theURL.indexOf("/res/index.html") != -1) {
			doThePoll = true;
		}
	}
	if (theURL.indexOf("/res/rebates/") != -1) {
		doThePoll = true;
	}
	if (theURL.indexOf("/rebates/") != -1) {
		doThePoll = true;
	}
	if (theURL.indexOf("/biz/rebates/") != -1) {
		doThePoll = true;
	}
	// careers
	if (theURL.indexOf("/careers/") != -1) {
		if (theURL.substr(-9,9) == "/careers/") {
			doThePoll = true;
		}
		if(theURL.indexOf("/careers/index.html") != -1) {
			doThePoll = true;
		}
	}
	
	if (theURL.indexOf("/careers/mgmt_prof/index.html") != -1) {
		doThePoll = true;
	}
	if (theURL.indexOf("/careers/skilled/index.html") != -1) {
		doThePoll = true;
	}
	if (theURL.indexOf("/careers/college/index.html") != -1) {
		doThePoll = true;
	}
	if (theURL.indexOf("/careers/skilled/plant_security_technical_ecological/index.html") != -1) {
		doThePoll = true;
	}
	// understanding your bill
	if (theURL.indexOf("/res/understanding_bill/index.html") != -1) {
		doThePoll = true;
	}
	// biz
	if (theURL.indexOf("/biz/") != -1) {
		if (theURL.substr(-5,5) == "/biz/") {
			doThePoll = true;
		}
		if(theURL.indexOf("/biz/index.html") != -1) {
			doThePoll = true;
		}
	}
	// establishing service	
	if (theURL.indexOf("/customer_service/establishing_service/index.html") != -1) {
		doThePoll = true;
	}
	
	// alert(doThePoll);
	return doThePoll;
}

// launch script for survey JEFF HELD 10/2003 --

	var bites = document.cookie.split("; "); // break cookie into array of bites
	
	function launch() {
	// alert("Launch!");
		if (doThePoll){
			if (!getCookie("PollQuestion")) {
				if (!getCookie("v25")) {
					var URL = "/ask_survey.html";
					window.open(URL,"ask","height=190,width=312,status=no");
				}
			}	
		}
	}
	// name to search for is: PollQuestion
	function getCookie(name) { // use: getCookie("name");
	   for (var i=0; i < bites.length; i++) {
	     nextbite = bites[i].split("="); // break into name and value
	     if (nextbite[0] == name) // if name matches
	       return true; // return true
	   }
	// if there is no match
	   return false;
	}