/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/menu/photo_click.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */

function Clicker() {
	clickMenu('gallery1');
}

function clickMenu(menu) {
	var getEls = document.getElementById(menu).getElementsByTagName("LI");
	var getAgn = getEls;

	for (var i=0; i<getEls.length; i++) {
		getEls[i].onclick=function() {
			for (var x=0; x<getAgn.length; x++) {
				getAgn[x].className=getAgn[x].className.replace("click", "");
			}
			this.className+=" click";
		}
	}
}

/** /
ieHover = function() {
	var ieULs, iframe, li;
	if($('nav')){
	    ieULs = $('nav').getElementsByTagName('ul');
    	for (var j=0; j<ieULs.length; j++) {
    		iframe = document.createElement('IFRAME');
    		iframe.src = BLANK_URL;
    		iframe.scrolling = 'no';
    		iframe.frameBorder = 0;
    		iframe.style.width = ieULs[j].offsetWidth+"px";
    		iframe.style.height = ieULs[j].offsetHeight+"px";
    		ieULs[j].insertBefore(iframe, ieULs[j].firstChild);
    		ieULs[j].style.zIndex="1";
    	}
	}
}
Event.observe(window, 'load', ieHover);
/ **/
navHover = function() {
	var list = document.getElementById("gallery1").getElementsByTagName("LI");
	for (var i=0; i<list.length; i++) {
		list[i].onmouseover=function() {
			this.className+=" iehover";
		}
		list[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
/**/