// FLY-OUT NAVIGATION SCRIPT

flyOutNavigation = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("flyoutNav");
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", "");
   }
   }
  }
 }
}




// RANDOM IMAGE SCRIPT

/* ####################### begins list of images to be used ####################### */
currentIndx=0;
RandomPhoto=new Array();
RandomPhoto[0]='/images/banner_photo1.jpg';
RandomPhoto[1]='/images/banner_photo2.jpg';
RandomPhoto[2]='/images/banner_photo3.jpg';
RandomPhoto[3]='/images/banner_photo4.jpg';
RandomPhoto[4]='/images/banner_photo5.jpg';
/* ####################### now we preload the images ####################### */
imagesPreloaded = new Array(5)
for (var i = 0; i < RandomPhoto.length ; i++)
{
		imagesPreloaded[i] = new Image(348,118)
		imagesPreloaded[i].src=RandomPhoto[i]
}
/* ####################### this function loads a random image ####################### */
function randomImage() {
currentIndx=Math.round(Math.random()*4)
document.randomBannerImage.src=imagesPreloaded[currentIndx].src
}




// CHANGE CSS STYLE FOR CURRENT PAGE IN GLOBAL NAVIGATION

function hilightCurrentPage(){
   if(!document.layers){
      var atags=document.getElementsByTagName("a");
      for(var i=0;i<atags.length;i++){
         if(atags[i].className=="nav"){
            if(document.location.href.indexOf(atags[i].href)!=-1){
               atags[i].className="active";
            }
         }
      }
   }
}




// ZEBRA-STRIPE TABLE SCRIPT

	function alternate(id) {
		if (document.getElementsByTagName) {
			var table = document.getElementById(id);
			var rows = table.getElementsByTagName("tr");
			for (i = 0; i < rows.length; i++) {
			//manipulate rows
			if (i % 2 == 0) {
				rows[i].className = "even";
			} else {
				rows[i].className = "odd";
			}
		} 
	} 
 }