﻿kccPix = new Array('images/photoback01.jpg','images/photoback02.jpg','images/photoback03.jpg','images/photoback04.jpg','images/photoback05.jpg')

imgCt = kccPix.length

function choosePic() {

	if (document.images) {
		randomNum = Math.floor ((Math.random() * imgCt))
		document.header.src = kccPix[randomNum]
	}
}
	function getObj(name)
	{
	  if (document.getElementById)
	  {
	  	this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	  }
	  else if (document.all)
	  {
		this.obj = document.all[name];
		this.style = document.all[name].style;
	  }
	  else if (document.layers)
	  {
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	  }
	}

	function turnon(theTag,tag)
	{
	  var x = new getObj(theTag);
	  var y = new getObj(tag);
	  x.style.visibility = "visible";
	  y.style.background = "url(images/buttonon.gif) repeat-x";
	  
	}
	
	function turnoff(theTag,tag)
	{
  	  var x = new getObj(theTag);
	  var y = new getObj(tag);
  	  x.style.visibility = "hidden";
	  y.style.background = "url(images/button.gif) repeat-x";
	}
		
	function setBookmark(url,title){
		if (title == "") title = url;
		if(document.all){
			window.external.AddFavorite(url,title);
		}
		else if (window.sidebar) window.sidebar.addPanel(title,url,"");
		else if( window.opera && window.print )
		{
		var mbm = document.createElement('a');
		mbm.setAttribute('rel','sidebar');
		mbm.setAttribute('href',url);
		mbm.setAttribute('title',title);
		mbm.click();
		}
	}

	
	
	function clickIE4(){
		if (event.button==2){
		return false;
		}
	}
	
	function clickNS4(e){
		if (document.layers||document.getElementById&&!document.all){
			if (e.which==2||e.which==3){
			return false;
			}
		}
	}
	
	if (document.layers){
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}
	else if (document.all&&!document.getElementById){
		document.onmousedown=clickIE4;
	}
	
	document.oncontextmenu=new Function("return false")
	