function change(href, url, img_w, img_h)
{
	document.getElementById('img_link').href = href;
	var t = document.getElementById('img_thumb');
	t.src    = url;
	t.width  = img_w; 
	t.height = img_h; 
}

/***********************************************
* 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
***********************************************/

var baseopacity=40;

function slowhigh(obj, href, url, img_w, img_h){
	change(href, url, img_w, img_h);
	imgobj=obj;
	browserdetect=obj.filters? "ie" : typeof obj.style.opacity=="string"? "non-ie" : "";
	instantset(baseopacity);
	highlighting=setInterval("gradualfade(imgobj)",50);
}

function slowlow(){
	cleartimer();
	instantset(baseopacity);
}

function instantset(degree){
	if (browserdetect=="non-ie")
		imgobj.style.opacity=degree/100
	else if (browserdetect=="ie")
		imgobj.filters.alpha.opacity=degree;
}

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

function gradualfade(cur2){
	if (browserdetect=="non-ie" && cur2.style.opacity<1)
		cur2.style.opacity=Math.min(parseFloat(cur2.style.opacity)+0.1, 0.99)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=10
	else {
		cleartimes();
	}
}

