window.onload = rolloverInit;

function rolloverInit() {
for (var i=0; i<document.links.length; i++) {
if (document.links[i].className == "primary") {		
var linkObj = document.links[i];
			if (linkObj.id) {
				var imgObj = document.getElementById(linkObj.id + "_bullet");
				if (imgObj) {

              				setupRollover(linkObj, imgObj);
				}
	
			}}
		}
		secondaryRolloverInit() ;

	}




function setupRollover(thisLink, thisImage) {

	thisLink.imgToChange= thisImage;
	thisLink.onmouseout = rollOut;
	thisLink.onmouseover = rollOver;

	thisLink.outImage = new Image();
	thisLink.outImage.src = thisImage.src;
	
	thisLink.overImage = new Image();
	thisLink.overImage.src = "images/bullet_over.gif";
	
}



function rollOver() {
	this.imgToChange.src = this.overImage.src;
}

function rollOut() {
	this.imgToChange.src = this.outImage.src;

}






function secondaryRolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			if (document.images[i].className == "secondary_nav") {
				setupRollover2(document.images[i]);
			}
		}
	    
	}
}

function setupRollover2(thisImage2) {
	thisImage2.outImage2 = new Image();
	thisImage2.outImage2.src = thisImage2.src;
	thisImage2.onmouseout = rollOut2;

	thisImage2.overImage2 = new Image();
	thisImage2.overImage2.src = "images/" + thisImage2.id + "_over.gif";
	thisImage2.onmouseover = rollOver2;	
}

function rollOver2() {
	this.src = this.overImage2.src;
}

function rollOut2() {
	this.src = this.outImage2.src;
}

						
	
