// JavaScript Document
var _sPageLoadingElement = "PageLoadingAnim";

if (navigator.appName!="Microsoft Internet Explorer") 
	document.write("<div style='height:10px'></div>");
document.write("<img src='/img/icons/anim/working - greenbar.gif' id='"+_sPageLoadingElement+"' style='display:none; position:absolute; z-index:1; left:20px; top:70px;'>");

// Manipulate the Page's "Loading" icon so that on a slower connection (eg dialup) it will appear/vanish to show that something is happening.
var _PageLoadingTimer = 0;
function RevealPageLoading() {
	if ( $(_sPageLoadingElement) )
		_PageLoadingTimer = setTimeout("new Effect.Grow('"+_sPageLoadingElement+"', {duration:1, queue:{position:'end', scope: 'PageLoadingScope'}})", 5000);
}

function HidePageLoading() {
	if (_PageLoadingTimer)
		clearTimeout(_PageLoadingTimer);
		
	if ( $(_sPageLoadingElement) )
		//if (Element.visible(_sPageLoadingElement))
			setTimeout("new Effect.Shrink('"+_sPageLoadingElement+"', {queue:{position:'end', scope: 'PageLoadingScope'}});", 1000);

	_PageLoadingTimer = 0;
}

RevealPageLoading();