// JavaScript Document
function disableRightClick(e)
{
	//Code written by Chris Garvey
  var message = "Sorry right click not available.";
  
  if(!document.rightClickDisabled)
  {
    if(document.layers) 
    {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
  }
  if(document.layers || (document.getElementById && !document.all))
  {
    if (e.which==2||e.which==3)
    {
      alert(message);
      return false;
    }
  }
  else
  {
    alert(message);
    return false;
  }
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
disableRightClick();

	sub=window.location.href
	subway=sub.substr(0,15)

	function cgurl()
	{
		if(subway=="http://intranet")
		{
			window.open("file://kirkbksrv0\\student resources$")
		}
		else
		{
			window.open("ftp://80.176.245.196/Pupil Public")
		}
	}
	
	function clipart()
	{
		if(subway=="http://intranet")
		{
			window.open("\\\\dellsrv\\clipart$")
		}
		else
		{
			window.open("http://www.free-graphics.com")
		}
	}
	
	function homefolder()
	{
		if(subway=="http://intranet")
		{
			window.open("file://h:\\")
		}
		else
		{
			window.open("ftp://80.176.245.195")
		}
	}
	
	function opencalc()
	{
		clc=window.open("calc1.htm")
		clc.resizeTo(270,400)
	}
	function community()
	{
		if(subway=="http://intranet")
		{
			window.open("file://kirkbksrv0\\communityresources$")
		}
		else
		{
			window.open("ftp://80.176.245.197")
		}
	}
	
	function teacherpage()
	{
		window.location="http://www.kirkbalk.org/kbstaff.htm"
	}