/*
Logo Rollover 
Date: 17 April 2009
Name of image element determines which image is overImage
*/

window.onload = rolloverInit;

function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].src.indexOf("logo") > -1) {
			setupRollover(document.images[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;

	thisImage.overImage = new Image();
	if (thisImage.name == "indexlogo")  {
	thisImage.overImage.src = "images/DPlogo180.gif" ;
	} else {
	if (thisImage.name == "whowearelogo")  {
	thisImage.overImage.src = "../images/logo2_180.gif" ;
	} else {
	thisImage.overImage.src = "../images/logo180.gif";
	}
		}
	thisImage.onmouseover = rollOver;	
}

function rollOver() {
	this.src = this.overImage.src;
}

function rollOut() {
	this.src = this.outImage.src;
}
