function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function Browser(){
this.name = navigator.appName;
if (this.name == 'Microsoft Internet Explorer') this.browser = 'ie';
else if (this.name.match(/Netscape/)) this.browser = 'ns';
else this.browser = this.name;
this.version = parseInt(navigator.appVersion);
this.ns = (this.browser=='ns' && this.version>=4);
this.ns4 = (this.browser=='ns' && this.version==4);
this.ns6 = (this.browser=='ns' && this.version>=5);
this.ie = (this.browser=='ie' && this.version>=4);
this.ie4 = (this.browser=='ie' && navigator.userAgent.indexOf('MSIE 4')>-1);
this.ie5 = (this.browser=='ie' && navigator.userAgent.indexOf('MSIE 5')>-1);
this.ie6 = (this.browser=='ie' && navigator.userAgent.indexOf('MSIE 6')>-1);
if (this.ie5) this.version = 5;
this.op5 = (navigator.userAgent.indexOf('Opera 5')>-1);
if (this.op5){this.browser = 'op'}
this.dom1 = (document.implementation && document.implementation.hasFeature)?true:false;
this.os = (navigator.platform)?navigator.platform:'unknown';
if (this.ie){ this.language = navigator.userLanguage.substring(0,2).toLowerCase() } else if (this.ns || this.op5) { this.language = navigator.language.substring(0,2).toLowerCase() }
this.toString = function(){ return '[object Browser]'}
return this;
}

function setOpacity2(objId, i){
	
	
	
obj = document.getElementById(objId);
obj.style.filter = "alpha(opacity=" + i + ")"; // For IE filter to work, obj MUST have layout
obj.style.KHTMLOpacity = i / 100; // Safari and Konqueror
obj.style.MozOpacity = i / 100; // Old Mozilla and Firefox
obj.style.opacity = i / 100; // CSS3 opacity for browsers that support it

}




function fadeOpacity(objId, sOpacity, fOpacity,speed){
b = new Browser()

var finished = false
if (sOpacity == fOpacity){finished=true}
else if (sOpacity > fOpacity){ sOpacity-- }
else if (sOpacity < fOpacity){ sOpacity++ }
setOpacity2(objId,sOpacity)
if (finished!=true) document.TC_opacity = setTimeout('fadeOpacity(\''+objId+'\','+sOpacity+','+fOpacity+','+speed+')',speed)

}
//-->

















































//Gradual Elements Fader- By Dynamic Drive at https://www.dynamicdrive.com
//Last updated: Nov 8th, 07' 

var gradualFader={}

gradualFader.baseopacity=0.4 //set base opacity when mouse isn't over element (decimal below 1)
gradualFader.increment=0.2 //amount of opacity to increase after each iteration (suggestion: 0.1 or 0.2)

document.write('<style type="text/css">\n') //write out CSS to enable opacity on "gradualfader" class
document.write('.gradualfader{filter:progid:DXImageTransform.Microsoft.alpha(opacity='+gradualFader.baseopacity*100+'); -moz-opacity:'+gradualFader.baseopacity+'; opacity:'+gradualFader.baseopacity+';}\n')
document.write('</style>')

gradualFader.setopacity=function(obj, value){ //Sets the opacity of targetobject based on the passed in value setting (0 to 1 and in between)
	var targetobject=obj
	if (targetobject && targetobject.filters && targetobject.filters[0]){ //IE syntax
		if (typeof targetobject.filters[0].opacity=="number") //IE6
			targetobject.filters[0].opacity=value*100
		else //IE 5.5
			targetobject.style.filter="alpha(opacity="+value*100+")"
		}
	else if (targetobject && typeof targetobject.style.MozOpacity!="undefined") //Old Mozilla syntax
		targetobject.style.MozOpacity=value
	else if (targetobject && typeof targetobject.style.opacity!="undefined") //Standard opacity syntax
		targetobject.style.opacity=value
	targetobject.currentopacity=value
}

gradualFader.fadeupdown=function(obj, direction){
	var targetobject=obj
	var fadeamount=(direction=="fadeup")? this.increment : -this.increment
	if (targetobject && (direction=="fadeup" && targetobject.currentopacity<1 || direction=="fadedown" && targetobject.currentopacity>this.baseopacity)){
		this.setopacity(obj, targetobject.currentopacity+fadeamount)
		window["opacityfader"+obj._fadeorder]=setTimeout(function(){gradualFader.fadeupdown(obj, direction)}, 50)
	}
}

gradualFader.clearTimer=function(obj){
if (typeof window["opacityfader"+obj._fadeorder]!="undefined")
	clearTimeout(window["opacityfader"+obj._fadeorder])
}

gradualFader.isContained=function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
}

gradualFader.fadeinterface=function(obj, e, direction){
	if (!this.isContained(obj, e)){
		gradualFader.clearTimer(obj)
		gradualFader.fadeupdown(obj, direction)
	}
}

gradualFader.collectElementbyClass=function(classname){ //Returns an array containing DIVs with specified classname
	var classnameRE=new RegExp("(^|\\s+)"+classname+"($|\\s+)", "i") //regular expression to screen for classname within element
	var pieces=[]
	var alltags=document.all? document.all : document.getElementsByTagName("*")
	for (var i=0; i<alltags.length; i++){
		if (typeof alltags[i].className=="string" && alltags[i].className.search(classnameRE)!=-1)
			pieces[pieces.length]=alltags[i]
	}
	return pieces
}

gradualFader.init=function(){
	var targetobjects=this.collectElementbyClass("gradualfader")
	for (var i=0; i<targetobjects.length; i++){
		targetobjects[i]._fadeorder=i
		this.setopacity(targetobjects[i], this.baseopacity)
		targetobjects[i].onmouseover=function(e){gradualFader.fadeinterface(this, e, "fadeup")}
		targetobjects[i].onmouseout=function(e){gradualFader.fadeinterface(this, e, "fadedown")}
	}
}
