function addOnload(newFunction) {
	var oldOnload = window.onload;
	
	if (typeof oldOnload == "function") {
		window.onload = function() {
			if (oldOnload) {
				oldOnload();
			}
			newFunction();
		}
	}
	else {
		window.onload = newFunction;
	} 
}

addOnload(rolloverInit);

function rolloverInit() {
	for (var i=0; i<document.links.length; i++) {
		var linkObj = document.links[i];
		if (linkObj.className) {
			var imgObj = document.getElementById(linkObj.className);
			if (imgObj) {
				setupRollover(linkObj,imgObj);
			}
		}
	}
}

function setupRollover(thisLink,textImage) {
	thisLink.imgToChange = new Array;
	thisLink.outImage = new Array;
	thisLink.overImage = new Array;

	thisLink.imgToChange[0] = textImage;
	thisLink.onmouseout = rollOut;
	thisLink.onmouseover = rollOver;	
	
	thisLink.outImage[0] = new Image();
	thisLink.outImage[0].src = textImage.src;

	thisLink.overImage[0] = new Image();
	thisLink.overImage[0].src = "http://www.sportsdigitalcontent.com/footballbigimages/" + thisLink.id + ".jpg";
	
	var rolloverObj = document.getElementById("divider");
	if (rolloverObj) {
		thisLink.imgToChange[1] = rolloverObj;

		thisLink.outImage[1] = new Image();
		thisLink.outImage[1].src = rolloverObj.src;
	
		thisLink.overImage[1] = new Image();
		thisLink.overImage[1].src = "/siteimages/footballnews/" + thisLink.name + ".gif";
		
	} 
}

function rollOver() {
	for (var i=0;i<this.imgToChange.length; i++) {
		this.imgToChange[i].src = this.overImage[i].src;
	}
}

function rollOut() {
	for (var i=0;i<this.imgToChange.length; i++) {
		this.imgToChange[i].src = this.overImage[i].src;
	}
}




//function to display extra links on rollover

function init() {
document.getElementById('box1').style.display = 'block';
}

addOnload(init);


function ShowItem2(myItem) {
	document.getElementById('box1').style.display = 'none';
	document.getElementById('box2').style.display = 'none';
	document.getElementById('box3').style.display = 'none';
	document.getElementById('box4').style.display = 'none';
	document.getElementById(myItem).style.display = 'block';
}


