/** * (c) 2008, Wacko-Wacko!
 * @author daclip
 */
 function WHighLight(ref) {	var hlContainer = null;	var timer = null;	var timerSpeed = 5;	var timerValue = 0.05;	var maxValue = 0.97;	var minValue = 0.05;	var stepValue = 0.04;	this.hide = function() {		set_state(0.2);		this.fadeout();	}		this.show = function() {		set_state(0.2);		showLayer();		this.fadein();	}	var hideLayer = function() {		hlContainer.style.visibility = "hidden";	}	var showLayer = function() {		hlContainer.style.visibility = "visible";	}	var set_state = function(value) {		hlContainer.style.opacity = value;		hlContainer.style.filter = 'alpha(opacity=' + value*100 + ')';	}		var set_hl_container = function(objectRef) {		(typeof(objectRef) == String) ?			hlContainer = objectRef :			hlContainer = document.getElementById(objectRef);	}	 	var init = function() { 		set_hl_container(ref); 	} 	this.fadein = function() { 		var __backref = this; 		timerValue += stepValue; 		timerValue = Math.round(timerValue * 100) /100; 		 		if (timerValue >= maxValue) { 			clearTimeout(timer); 			timerValue = maxValue; 			return false; 		} 		set_state(timerValue); 		timer = setTimeout(function() { __backref.fadein(); }, timerSpeed); 	} 	this.fadeout = function() { 		var __backref = this; 		timerValue -= stepValue; 		timerValue = Math.round(timerValue * 100) /100; 		 		if (timerValue <= minValue) { 			clearTimeout(timer); 			timerValue = minValue; 			hideLayer(); 			return false; 		} 		set_state(timerValue); 		timer = setTimeout(function() { __backref.fadeout(); }, timerSpeed); 	} 	init(); 		// End of class}
