		var classElements = new Array();
		
		var alphaVal=40;
		var ALPHA_MIN=40;
		var ALPHA_MAX=100;
	
		var fadeInterval;
		
	
		function getElementsByClass(searchClass,node,tag){
			
			if(node==null){
				node=document;
				}
			if(tag==null){
				tag='*';
				}
			var els = node.getElementsByTagName(tag);
			var elsLen = els.length;
			var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
			for(i=0,j=0;i<elsLen;i++){
				if(pattern.test(els[i].className)){
					classElements[j] = els[i];
					j++;
				}
			}
			return classElements;
		}
		function showFaders(){
			var el=getElementsByClass('fading');
			alert(el.length);
		}
		
		function overHandler(){
			
			var passMe = this.id;		
			clearInterval(this.fadeInterval);
			this.currentOpacity=100;				
			this.style.opacity=this.currentOpacity/100;
			this.style.MozOpacity=this.currentOpacity/100;
			this.style.filter="alpha(opacity="+this.currentOpacity+")";
			//this.fadeInterval=window.setInterval('fadeIn('+passMe+')',1);			
		}
		function outHandler(){
			
			var passMe = this.id;
			clearInterval(this.fadeInterval);
			this.fadeInterval=window.setInterval('fadeOut('+passMe+')',1);
		}
		
		function fadeIn(x){
			
			//alert("fadeOut("+x+"); currentOpacity is = "+classElements[x].currentOpacity);
			if(classElements[x].currentOpacity<classElements[x].maximumOpacity){
				classElements[x].currentOpacity+=15;				
				classElements[x].style.opacity=classElements[x].currentOpacity/100;
				classElements[x].style.MozOpacity=classElements[x].currentOpacity/100;
				classElements[x].style.filter="alpha(opacity="+classElements[x].currentOpacity+")";
				
			}
			else{
				clearInterval(classElements[x].fadeInterval);
				//alert("interval cleared");
			}
		}
		
		function fadeOut(x){
			//alert("fadeOut("+x+"); currentOpacity is = "+classElements[x].currentOpacity);
			if(classElements[x].currentOpacity>classElements[x].minimumOpacity){
				classElements[x].currentOpacity-=2;				
				classElements[x].style.opacity=classElements[x].currentOpacity/100;
				classElements[x].style.MozOpacity=classElements[x].currentOpacity/100;
				classElements[x].style.filter="alpha(opacity="+classElements[x].currentOpacity+")";
				
			}
			else{
				clearInterval(classElements[x].fadeInterval);
				//alert("interval cleared");
			}
		}
		
		giveScriptsToFaders = function (){
			var el=getElementsByClass('fading');
			for(i=0;i<el.length;i++){
				el[i].onmouseover= overHandler;
				el[i].onmouseout= outHandler;				
				el[i].id=i;
				el[i].currentOpacity=alphaVal;
				el[i].minimumOpacity=ALPHA_MIN;
				el[i].maximumOpacity=ALPHA_MAX;
				el[i].fadeInterval;
			}
		} 
		if (window.attachEvent){//IE,Opera
			window.attachEvent("onload", giveScriptsToFaders);
		}
		else if (window.addEventListener){//Mozilla,Firefox,Netscape
			window.onload=giveScriptsToFaders;
		}
		
		
		
		
		
		
		
		
		


sfHover = function() {
	
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");

	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);














function summonFlash(){
	
	window.open("http://www.drexle.com/v2006.html", "myWindow",  "height=500, width=400, status=0, resizable=0 toolbar=0 location=0 scrollbars=0");
	if (window.focus) {newwindow.focus()}
	return false;
}













function newWindow(url, h, w){

	window.open(url, "galleryItem",  "height="+h+", width="+w+", status=0, resizable=0 toolbar=0 location=0 scrollbars=0");
	if (window.focus) {newwindow.focus()}
	return false;
	
	
}





