// Fade Effect for Staff Page

var FadeSteps = new Array();
	FadeSteps[1] = "ff";
	FadeSteps[2] = "ee";
	FadeSteps[3] = "dd";
	FadeSteps[4] = "cc";
	FadeSteps[5] = "bb";
	FadeSteps[6] = "aa";
	FadeSteps[7] = "99";
	FadeSteps[8] = "88";
	FadeSteps[9] = "77";
	FadeSteps[10] = "66";
function doFade(colorId, targetId) {
    if (colorId >= 1) {
		document.getElementById(targetId).style.backgroundColor = "#ffff" + FadeSteps[colorId];
        if (colorId==1) {
            document.getElementById(targetId).style.backgroundColor = "transparent";
		}
        colorId--;
        setTimeout("doFade("+colorId+",'"+targetId+"')", 100);
	}
}
//URL Fade: Function to create a fade effect linking from another page.
//How to use:
//1. Put an onLoad funciton in the body of the page where the fade is to occur.  Example: <body onLoad="URLfade();">
//2. Add a "?targetID" to the referring link. Example: /aud/commencement/commencement.htm?10#Photographer
function URLfade() {
	var strHref = window.location.href;
	var strParam = strHref.substring(strHref.indexOf("?")+1,strHref.indexOf("#"));
	try {
		if (strParam != "")
			doFade(10,strParam);
	}
	catch(err) {
		//do nothing and ignore the error
	}
}

