

	var fadeSpeed=10;

	var procsfo=false;
	var procsin=false;
	var arr=Array();
	var currentID=0;
	var currentInUse=0;
	var intfadeOut=100;
	var intfadeIn=0;
	var arrFadeout=Array();
	var arrFadein=Array();
	var prevID=0;
	
	
	function dofade(obj){
	fadeOut(obj);
	fadeIn(obj);
	}
	
	
	function DofadeOut(obj){
		intfadeOut=intfadeOut-fadeSpeed;
		setAlpha(obj,intfadeOut);
		if(intfadeOut<=0){
			clearTimeout(arrFadeout[obj]);
			intfadeOut=100;
			procsfo=false;
		}else{
			arrFadeout[obj]=setTimeout("DofadeOut('"+obj+"')",1);
		}
	}
	function fadeOut(obj){
		if(procsfo){return;}
		procsfo=true;
		zobj = getObj(obj);
		intfadeOut=100;
		zobj.style.display="inline";
		arrFadeout[obj]=setTimeout("DofadeOut('"+obj+"')",1);
	}




	function DofadeIn(obj){
		intfadeIn=intfadeIn+fadeSpeed;
		setAlpha(obj,intfadeIn);

		if(intfadeIn>100){
			clearTimeout(arrFadein[obj]);
			intfadeIn=0;
			procsin=false;
		}else{
			arrFadein[obj]=setTimeout("DofadeIn('"+obj+"')",1);
		}
	}

	function fadeIn(obj){
		if(procsin){return;}
		procsin=true;
		zobj = getObj(obj);
		zobj.style.display="inline";
		setAlpha(obj,0);
		intfadeIn=0;
		arrFadein[obj]=setTimeout("DofadeIn('"+obj+"')",1);
	}





	function setAlpha(zobj,opacity){obj = getObj(zobj);if(obj)	{var objStyle=obj.style;objStyle.opacity = (opacity/100);objStyle.MozOpacity = (opacity/100);objStyle.KhtmlOpacity = (opacity/100);objStyle.filter = "alpha(opacity=" + opacity + ")";}
	}

	function getObj(obj){var row = parent.document.all ?parent.document.all[obj] :parent.document.getElementById ?parent.document.getElementById(obj) : null;if(row){return row;}else{return false;}}

