var baseopacity=100

function high(which2){
	
	imgobj=which2
	
	browserdetect = which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""

	instantset(baseopacity)
	
	highlighting=setInterval("gradualfade(imgobj)", 20)
}


function low(which2){
	
	cleartimer();
	
	setTimeout(function() {gradualfadeout(which2);}, 20);
}

function instantset(degree){

	if (browserdetect=="ie")
	
		imgobj.filters.alpha.opacity=degree
	else
		imgobj.style.opacity = degree/100;
}

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

function gradualfade(cur2){

	if (browserdetect == "ie" && cur2.filters.alpha.opacity > 70) {
		
		cur2.filters.alpha.opacity -= 10
		
	} else if (browserdetect != "ie") {
		
		cur2.style.opacity = Math.max(parseFloat(cur2.style.opacity) - 0.1, 0.70)

	}  else if (window.highlighting) {
		
		clearInterval(highlighting)
		
	}
}

function gradualfadeout(cur3){

	cr3 = setTimeout(function() {gradualfadeout(cur3);}, 20)

	
	if (browserdetect=="ie" && cur3.filters.alpha.opacity <= 100)

		cur3.filters.alpha.opacity=cur3.filters.alpha.opacity + 10

	else if (cur3.style.opacity <= 1)

		cur3.style.opacity=Math.min(parseFloat(cur3.style.opacity) + 0.1)


	if (browserdetect=="ie" && cur3.filters.alpha.opacity >= 100)

		clearTimeout(cr3);

	else if (cur3.style.opacity >= 1)

		clearTimeout(cr3);
}