
var mainFunctions = {
		
	load : function() {
		mainFunctions.openWindow();
		mainFunctions.printWindow();
		mainFunctions.mainNav();
		mainFunctions.handsover();
	},
	
	openWindow : function(){
		
		allNodes = $A(document.getElementsByClassName("openWindow")); 
		allNodes.each(function(node, i) {
		allNodes[i].onclick = function() {window.open(this.href); return false};
		});
	},
	
	printWindow : function(){
		
		allNodes = $A(document.getElementsByClassName("printWindow")); 
		allNodes.each(function(node, i) {
		allNodes[i].onclick = function() {window.print()};
		});

	},
	
	mainNav : function(){
		if ($('mainnav')) {
		allNodes = $A($('mainnav').childNodes)
		
		allNodes.each(function(node, i) {
			if (node.nodeName=="LI") {
				node.onmouseover = function() {this.childNodes[0].childNodes[0].src= this.childNodes[0].childNodes[0].src.replace('1','2');};
				node.onmouseout = function() {this.childNodes[0].childNodes[0].src= this.childNodes[0].childNodes[0].src.replace('2','1');};
			}

		});		
		}
	},
	
	
	handsover  : function() {
		if ($('handsover')) {
			$('handsover').onmouseover = function(){$('handsover').src='/images/layup/hands-logo-over.gif';}
			$('handsover').onmouseout = function() {$('handsover').src='/images/layup/hands-logo.gif';}
		}
	}
	
	
}


Event.observe(window, 'load', mainFunctions.load, false);