/***********************************************
* Gradual Highlight image script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/******
* This code has been heavily modified by Design Fuse
* For more information please contact info@designfuse.ca 
* 08.03.24
******/

var baseopacity=100;

function slowhigh(which2){

       
imgobj=document.getElementById( which2 ); 

browserdetect=imgobj.filters? "ie" : typeof imgobj.style.MozOpacity=="string"? "mozilla" : ""; 

instantset( imgobj, baseopacity)

highlighting=setInterval("gradualfade(imgobj)",25);
}

function slowlow(which2){

imgobj=document.getElementById( which2 ); 

cleartimer()
instantset(imgobj, baseopacity)
}

function instantset(target, degree){
if (browserdetect=="mozilla")
	target.style.MozOpacity=degree/100;
else if (browserdetect=="ie")
{	
	/* This code makes little or no sense but works so I'm going with it */ 
	target.style.filter = "alpha(opacity=" + degree + ")";	
	target.filters.alpha.opacity = degree;
}
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){

if (browserdetect=="mozilla" && cur2.style.MozOpacity<=1)
{ 
	cur2.style.MozOpacity-=0.1;  
	//cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)-0.1, 0.99);
}
else if (browserdetect=="ie" && cur2.filters.alpha.opacity>=10)
{	
if ( cur2.filters.alpha.opacity > 10 ) 
	cur2.filters.alpha.opacity-=10
	//cur2.style.filter = 'alpha(opacity='+0+')';
	//cur2.filters.alpha.opacity=1; alert ( cur2.filters.alpha.opacity ); 
}
else if (window.highlighting)
	clearInterval(highlighting);
}