// Copyright Acro Media Inc. 1998-2005, www.acromediainc.com

var W3CDOM = (document.createElement && document.getElementsByTagName);
var imgOuts = new Array();
var imgOvers = new Array();
var navList = new Array("nav");

function addImageHandlers(){
	var imgNumber = 0;

	if(!W3CDOM){
		return;
	}
	for(i=0;i< navList.length; i++){
	
		var theseImages = document.getElementById(navList[i]).getElementsByTagName('img');
		
		for(n = 0; n < theseImages.length; n++){
			var suffixCheck = theseImages[n].src.substring(theseImages[n].src.lastIndexOf('_'), theseImages[n].src.lastIndexOf('.'));
			var prefixCheck = theseImages[n].src.substring(theseImages[n].src.indexOf('_'), theseImages[n].src.indexOf('b_'));
			if((suffixCheck == "_01" || suffixCheck == "_02" || suffixCheck == "_03")  ){
				theseImages[n].onmouseover = onOver;
				theseImages[n].onmouseout = onOut;
				
				var fileType = theseImages[n].src.substring(theseImages[n].src.lastIndexOf('.'));
				
				imgOuts[imgNumber] = new Image();
				imgOuts[imgNumber].src = theseImages[n].src;
				imgOvers[imgNumber] = new Image();
				imgOvers[imgNumber].src = theseImages[n].src.substring(0, theseImages[n].src.lastIndexOf('_')) + "_02" + fileType;
				theseImages[n].number = imgNumber;
				imgNumber++;
			}
		}
	}
}


function onOver(){
	this.src = imgOvers[this.number].src;
}
function onOut(){
	this.src = imgOuts[this.number].src;
}

// Copyright Acro Media Inc. 1998-2005, www.acromediainc.com

var hasFlash = 0;

// check with objects first
if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
	if(navigator.plugins && navigator.plugins["Shockwave Flash"]){
		hasFlash = 1;
	}
}
// check with IE objects
else if (navigator.userAgent && (navigator.userAgent.indexOf("MSIE")>=0)){
	if((navigator.userAgent.indexOf("Windows 95") != -1) || (navigator.userAgent.indexOf("Windows 98") != -1) || (navigator.userAgent.indexOf("Windows NT") != -1)) {
		with(document){
			writeln('<SCRIPT LANGUAGE=VBScript\>');
			writeln('on error resume next');
			writeln('hasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash")))');
			writeln('<\/SCRIPT\>');
		}
	}
	// give Macs one last chance - Mac IE 4.5 cannot detect flash, but is guaranteed to have it.
	else if((navigator.userAgent.indexOf("Mac") != -1) && (parseFloat(navigator.appVersion) >= 4)){
		hasFlash = 1;
	}
}