
var baseopacity=0

function showtext() {
	if (!document.getElementById)
	return
	textcontainerobj=document.getElementById("loading")
	elemItem = document.getElementById("loading")
	elemItem.style.display = 'block';
	browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(textcontainerobj)",70)
}

function hidetext() {
	cleartimer()
	instantset(baseopacity)
	elemItem = document.getElementById("loading")
	elemItem.style.display = 'none';
}

function instantset(degree) {
	if (browserdetect=="mozilla")
		textcontainerobj.style.MozOpacity=degree/70
	else if (browserdetect=="ie")
		textcontainerobj.filters.alpha.opacity=degree
	else if (document.getElementById && baseopacity==0)
		document.getElementById("loading").innerHTML=""
}

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.7)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<70)
		cur2.filters.alpha.opacity+=20
	else if (window.highlighting)
		clearInterval(highlighting)
}

