/*
Copyright © 2006-2007 InvestScripts.com
All Rights Reserved.
Do not copy without permission!
*/

var wd_loadingbox_id = 'wd_loadingbox';

function hide_loadingbox() {
	var NNtype='hidden';
	var IEtype='hidden';
	var WC3type='hidden';
	toggle_loadingbox(NNtype, IEtype, WC3type);
}

function show_loadingbox() {
	var NNtype='show';
	var IEtype='visible';
	var WC3type='visible';
	toggle_loadingbox(NNtype, IEtype, WC3type);
}

function toggle_loadingbox(NNtype, IEtype, WC3type) {
	var id = wd_loadingbox_id;
	if (document.getElementById) {
		document.getElementById(id).style['visibility']=WC3type;
	} else {
		if (document.layers) {
			document.layers[id].visibility=NNtype;
		} else {
			if(document.all) {
				eval("document.all."+id+".style.visibility=\""+IEtype+"\"");
			}
		}
	}
}

function init_loadingbox() {
	if (typeof document.compatMode!='undefined' && document.compatMode!='BackCompat') {
		wd_loadingbox_css2 = "_top:expression(document.documentElement.scrollTop-this.clientHeight+this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);";
	} else {
		wd_loadingbox_css2 = "_top:expression(document.body.scrollTop-this.clientHeight+this.clientHeight);_left:expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);";
	}

	var	wd_loadingbox_css  = '#'+wd_loadingbox_id+' {';
		wd_loadingbox_css += 'position:fixed;';
		wd_loadingbox_css += '_position:absolute;';
		wd_loadingbox_css += 'z-index:1000;';
		wd_loadingbox_css += 'top:0px;';
		wd_loadingbox_css += 'right:0px;';
		wd_loadingbox_css += 'padding:5px;';
		wd_loadingbox_css += wd_loadingbox_css2;
		wd_loadingbox_css += 'background:#FF9900;color:#FFFFFF;font-size:12px;font-family:Arial,Verdana;';
		wd_loadingbox_css += 'visibility:hidden;';
		wd_loadingbox_css += '}';

	document.write('<style type="text/css">'+wd_loadingbox_css+'</style>');
	document.write('<div id="'+wd_loadingbox_id+'">');
	document.write('Loading...');
	document.write('</div>');
}

init_loadingbox();