//@author:  Antonio Gámez
//@empresa: Doble H Multimedia
//
// Colocar en el evento onmouseover=On(this.id) y en el evento onmouseout=Off(this.id) y disfrutar
//este valor debe coincidir con el valor del estilo inicial que le demos a al objeto q usa estas funciones
//de lo contrario el estado de retorno no seria el mismo
var baseopacity=25;
//____________________________________________________________________________________
function OpacidadOn(id){
	textcontainerobj=document.getElementById(id);
	browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : "";
	instantset(baseopacity);
	highlighting=setInterval("gradualfade(textcontainerobj)",100);
}
function OpacidadOff(){
	cleartimer();
	instantset(baseopacity);
}
function instantset(degree){
	if (browserdetect=="mozilla")
		textcontainerobj.style.MozOpacity=degree/100;
		else if (browserdetect=="ie")
			textcontainerobj.filters.alpha.opacity=degree;
		
}
function cleartimer(){
	if (window.highlighting) clearInterval(highlighting);
}
function gradualfade(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
		cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99);
		else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
			cur2.filters.alpha.opacity+=20;
			else if (window.highlighting)
				clearInterval(highlighting);
}