fadeInButtonsTimer = new Array();
fadeOutButtonsTimer = new Array();
fadeInButtonsHelperTimer = new Array();
fadeOutButtonsHelperTimer = new Array();
function fadeInEditButtons(obj){
	clearTimeout(fadeOutButtonsTimer[obj]);
	fadeInButtonsTimer[obj]=setTimeout("fadeInEditButtonsHelper('"+obj+"')", 500);
}
function stopFadeInEditButtons(obj) {
	clearTimeout(fadeInButtonsTimer[obj]);
	fadeOutButtonsTimer[obj]=setTimeout("fadeOutEditButtonsHelper('"+obj+"')", 400);
}
function fadeInEditButtonsHelper(obj){
	var val;
	if(document.getElementById(obj).style.opacity==""){
		val=0;
	}else{
		val=parseFloat(document.getElementById(obj).style.opacity)+0.1;
	}
	clearTimeout(fadeOutButtonsHelperTimer[obj]);
	if(val < 1){
		document.getElementById(obj).style.display="block";
		document.getElementById(obj).style.opacity=val;
		fadeInButtonsHelperTimer[obj]=setTimeout("fadeInEditButtonsHelper('"+obj+"')",1);
	}else{
		document.getElementById(obj).style.opacity=1;
		clearTimeout(fadeInButtonsHelperTimer[obj]);
	}
}
function fadeOutEditButtonsHelper(obj){
	var val;
	if(document.getElementById(obj).style.opacity==""){
		val=0;
	}else{
		val=parseFloat(document.getElementById(obj).style.opacity)-0.1;
	}
	clearTimeout(fadeInButtonsHelperTimer[obj]);
	if(val > 0){
		document.getElementById(obj).style.opacity=val;
		fadeOutButtonsHelperTimer[obj]=setTimeout("fadeOutEditButtonsHelper('"+obj+"')",1);
	}else{
		document.getElementById(obj).style.display="none";
		document.getElementById(obj).style.opacity=0;
		clearTimeout(fadeOutButtonsHelperTimer[obj]);
	}
}
