
/* functions for grads site */

function printPage() {
	if (window.print) {
		window.print();
	}
}

function essentialBehaviours() {
	window.open('essential-behaviours.html','','width=400, height=450,top=0,left=0,tollbar=no,statusbar=no');
}

window.onload = function() {
	if (document.location.href.indexOf("candidate_update.cfm") !== -1) {
		document.getElementById("left").style.display = "none";
		document.getElementById("right").style.width = "716px";
		document.getElementById("right").style.margin = "0px";
		
	}
	if (isIE) {
		if (document.getElementById("left")) {
			var listitems = document.getElementById("left").getElementsByTagName("LI");
			for (var i = 0; i < listitems.length; i++) {
				if (listitems[i].className.indexOf("active") == -1) {
					if (listitems[i].parentNode.getAttribute("id").length == 0) {
						listitems[i].onmouseover = function() {
							this.style.background = "#7fd2ea";
						}
						listitems[i].onmouseout = function() {
							this.style.background = "#3399cc";
						}	
					} else {
						listitems[i].onmouseover = function() {
							this.style.background = "#ccc";
						}
						listitems[i].onmouseout = function() {
							this.style.background = "#eee";
						}
					}
				}
			}
		}
	}
}

function isIE() {
	if (navigator.appName.indexOf("Microsoft Internet Explorer") !== -1) {
		return true;
	} else {
		return false;
	}
}
