		function setBackgroundImage (id, imageURL) {
		  if (document.layers)
		    document[id].background.src = imageURL == 'none' ? null : imageURL;
		  else if (document.all)
		    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
		  else if (document.getElementById)
		    document.getElementById(id).style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
		}
		
		function rolloverImg (imgname, imageURL) {
			document.images[imgname].src = imageURL;
		}
		
		function preloadRolloverImages (myArray) {
			// myArray = ['shipnowroll.jpg', 'getestimateroll.jpg', 'cancelshipmentroll.jpg', 'custservroll.jpg', 'trackshiproll.jpg'];
			myCount = myArray.length;
			i = 1;
			for (i; i<=myCount; i++) {
				myImg = new Image();
				myImg.src = "../images/" + myArray[i];
			}
		}
		
		function openWin (myURL, myOptions) {
			myWin = window.open(myURL, "popup", myOptions);
			myWin.focus();
		}
		
		function genRandom() {
	// generate a random number and return as string
	var myNum = Math.round(Math.random() * 9999999999999999) + 1;
	myNum = myNum + "";
	return myNum;
}

function SetCookie (name, value, expires, path, domain) {
	// set cookie value for specified path & domain  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}

//if cookie doesn't contain value for PuroTrace set it
var myValue = document.cookie.indexOf("PuroTrace");
if (myValue == -1) {
	var exp = new Date(); 
	exp.setTime(exp.getTime() + (360*24*60*60*1000));
	var myNumber = genRandom();
	var myDate = new Date();
	var elapsed = myDate.getTime();
	myNumber = myNumber+elapsed+"";
	SetCookie ("PuroTrace", myNumber, exp, "/", ".purolator.com"); 
}