

function bookmark(url, who){

	var url = "http://www.nrhs.redbridge.sch.uk/"+url;
	if (!who) var who = "The New Rush Hall Group";

	var ver = navigator.appName
	var num = parseInt(navigator.appVersion)
	if ((navigator.platform.indexOf("Win32") != -1) && (ver == "Microsoft Internet Explorer") && (num >= 4)) 
	{
   		window.external.AddFavorite(url,who);
	}
	else if (navigator.platform=="MacPPC" || navigator.platform=="Mac68K")
	{
		alert("Press Command and D together to bookmark this page.");
	}
	else
	{
   		alert("Press Control and D together to bookmark this page.");
	} 
}

function displayRange(ref, div) {
	if (ref.value == "range") turnOn(div);
	else turnOff(div);
}

// turn on function
function turnOn(DivID) {
	if (document.getElementById) { //gecko(NN6) & IE 5+
		document.getElementById(DivID).style.visibility = "visible";
		document.getElementById(DivID).style.display = "block";
	} else if (document.all) { // IE 4+
		document.all[DivID].style.visibility = "visible";
		document.all[DivID].style.display = "block";
	} else if (document.layers) { // NS4+
		document.layers[DivID].visibility = "show";
		document.layers[DivID].display = "block";
	} else {
		// nothing
	}
}

// turn off function
function turnOff(DivID) {
	if (document.getElementById) { //gecko(NN6) & IE 5+
		document.getElementById(DivID).style.visibility = "hidden";
		document.getElementById(DivID).style.display = "none";
	} else if (document.all) { // IE 4+
		document.all[DivID].style.visibility = "hidden";
		document.all[DivID].style.display = "none";
	} else if (document.layers) { // NS4+
		document.layers[DivID].visibility = "hide";
		document.layers[DivID].display = "none";
	} else {
		// nothing
	}
}
