﻿kccPix = new Array('images/photoback01.jpg','images/photoback02.jpg','images/photoback03.jpg','images/photoback04.jpg','images/photoback05.jpg','images/photoback06.jpg')

imgCt = kccPix.length
var timer = null;
aTag ="";

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 noNav()
	{
  	  var x = new getObj(aTag);
  	  x.style.visibility = "hidden";
	}
	
	function turnon(theTag,tag)
	{
	  var x = new getObj(theTag);
	  var y = new getObj(tag);
	  clearTimeout(timer);
	  if(aTag != ""){
	  noNav();
	  }
	  x.style.visibility = "visible";
	  y.style.background = "#86a6c6";
	  
	}
	
	function turnoff(theTag,tag)
	{
// 	  var x = new getObj(theTag);
// 	  x.style.visibility = "hidden";
//	  y.style.background = "url(images/button.gif) repeat-x";
	  var y = new getObj(tag);
	  y.style.background = "";
 	  clearTimeout(timer);
	  aTag = theTag;
	  timer = setTimeout("noNav()",200);
	}
		
	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();
		}
	}

