<!--//--><![CDATA[//><!--

//preload images
//var ImageBank = {
//	sharedImgURI : ["images/globe49x49.png","images/top_banner.jpg","images/top_banner_02.gif","images/top_banner_03.gif","images/paddling_logo.gif","icons/delicious.png","icons/digg.png","icons/stumbleit.png","icons/reddit.png","icons/furl.png","icons/facebook.png","icons/google.png","icons/yahoo.png"]	
//	preloadImages : function() {
//		var ImgObj= new Image();
//		for (var i=0; i < this.sharedImgURI.length;i++) {
//			ImgObj.src = this.sharedImgURI[i];
//		}
//	}
//}
//ImageBank.preloadImages();

//preloading IMAGES
if (document.images)
{
  

  pic1= new Image(600,120); 
  pic1.src="images/Foleyheadermodified3.jpg"; 

  
  pic4= new Image(49,49); 
  pic4.src="images/globe49x49.png"; 
  
  pic5= new Image(100,100); 
  pic5.src="images/paddling_logo.gifg"; 
  pic6= new Image(100,100); 
  pic6.src="images/paddling_logo.gif"; 
  
  
    pic7= new Image(16,16); 
  pic7.src="icons/delicious.png"; 
  
      pic8= new Image(16,16); 
  pic8.src="icons/digg.png"; 
  
      pic9= new Image(16,16); 
  pic9.src="icons/stumbleit.png"; 
  
      pic10= new Image(16,16); 
  pic10.src="icons/reddit.png"; 
  
      pic11= new Image(16,16); 
  pic11.src="icons/furl.png"; 
  
      pic12= new Image(16,16); 
  pic12.src="icons/facebook.png"; 
  
      pic13= new Image(16,16); 
  pic13.src="icons/google.png"; 
  
      pic14= new Image(16,16); 
  pic14.src="icons/yahoo.png"; 
  
       pic15= new Image(40,40); 
  pic15.src="IMAGES/LEFTARROW.PNG"; 
  
         pic15= new Image(40,40); 
  pic15.src="IMAGES/RIGHTARROW.PNG"; 
  
        pic16= new Image(41,127); 
  pic16.src= "http://banners.wunderground.com/banner/gizmotemp/global/stations/71260.gif"; 
  
           pic17= new Image(37,37); 
  pic17.src="images/email2.png"; 
             pic18= new Image(100,100); 
  pic18.src="images/linkback6.png"; 
}


startList = function(id,elem) {
//elem = type of element to be selected i. LI, UL
//id = id to seelct element tree, and elem selects first children
	//var list="test ";
	if (document.all&&document.getElementById) {
        navRoot = document.getElementById(id);
	//list= "childnodes =" + navRoot.childNodes.length;
        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName==elem) {
		// list+="nodename=" + node.nodeName + " " + i +" \nl";    
                node.onmouseover=function() {
                    this.className+=" over";
		
                }
                node.onmouseout=function() {
                    this.className=this.className.replace(" over", "");
                }
            }
        }
    } 
   // window.alert('hello ' + list);
}
//window.onload=startList;
//initiate left navigation function


function toggle(obj) {
	var el = document.getElementById(obj);

	document.getElementById(obj).style.visibility = 'visible';
	
	document.getElementById(obj).style.position = 'absolute';
	document.getElementById(obj).style.left = '0';
	document.getElementById(obj).style.top = '0';
//	document.getElementById(obj).style.backgroundColor = "#387b9a";

	
}
function toggleblank(obj) {
	var el = document.getElementById(obj);

	document.getElementById(obj).style.visibility = 'visible';
	document.getElementById(obj).style.display = 'block';
	document.getElementById(obj).style.left = '0';
	document.getElementById(obj).style.bottom = '0';


	
}


	 
	
//window.onload = sidebar; window.onload=startList;



	 
	 
	function addLoadEvent(func) { 
	  var oldonload = window.onload; 
	  if (typeof window.onload != 'function') { 
	    window.onload = func; 
	  } else { 
	    window.onload = function() { 
	      if (oldonload) { 
	        oldonload(); 
	      } 
	      func(); 
	    } 
	  } 
	} 

function highlight(){
	//this pgm highlights anchor of current page in left menu
	//select left nav bar
	var navRoot = document.getElementById("sidenav");
	//get page filename
	var from= window.location.pathname.toUpperCase();
	//document.write("filename ="  + from +"<br>");
	var filename;	
	var start=from.lastIndexOf("/");
	if (start+1) filename=from.substring(start+1);
	

		
//document.write("filename ="  + filename +"<br>");		
	//get anchor list from left nav bar 	
	selelement = navRoot.getElementsByTagName("A");	
	//document.write("no anchors ="  + selelement.length +"<br>");

	//compare hrefs in anchor list with page name. If they match hcange style attributes to stand out
	for (i=0; i<selelement.length; i++) {
		//document.write("href =" + i + " " + selelement[i].href +"<br>");
		//document.write("hreefattrib=" + i + "=" + selelement[i].nodeName+ " "+ selelement[i].getAttributeNode("href").value +"<br>");
	var compare=selelement[i].getAttributeNode("href").value.toUpperCase();
	start=compare.lastIndexOf("/");
	compare=compare.substring(start+1);
	
	//document.write("compare =" + i + " " + compare +"<br>");
		
	if (compare == filename) {
		//document.write("filename =anchor= " +compare +"<br>");
		selelement[i].style.color = "purple";	
		selelement[i].style.backgroundColor = "#FFFFCC";
		}
		
		}
		
}	
//highlight();
			
	
	
addLoadEvent( function() { startList ('nav','LI') } );
addLoadEvent( function() { startList ('level1','LI') } );

addLoadEvent( function() { startList ('topnavbar','LI') } );
addLoadEvent(highlight);
//	addLoadEvent( function() { toggle ('River Trips') } )
	 
	









//--><!]]>
