/* Mouseover and Back to Home for H1 */

/* Function to capture mouseover and mouseout events on the H1 */
function mouseOverH1() {
	if(!document.getElementById && !document.getElementsByTagName) return false;
	var el = document.getElementsByTagName('h1');
	el[0].onmouseover = function() {
		// When the mouse is over, change the background and cursor
		this.style.cursor = "pointer";
	}
	el[0].onmouseout = function() {
		// When the mouse is out, change cursor back
		this.style.cursor = "default";
	}
}

/* Function to return to Main Page when clicking H1 */
function clickH1() {
	if(!document.getElementById && !document.getElementsByTagName) return false;
	var el = document.getElementsByTagName('h1');
	el[0].onclick = function() {
		window.location.href = "/default.aspx"   
	}
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

addLoadEvent(clickH1);
addLoadEvent(mouseOverH1);