function loading(elem,fl) {


	var x,y;
	if (self.innerHeight) { 
// all except Explorer
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) {
// Explorer 6 Strict Mode
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) {
		x = document.body.clientWidth;
		y = document.body.clientHeight;	
	}
	
	var emb=document.getElementById(elem);
	if (null!=emb) {
		var top = (y/2) - 50;
		var left = (x/2) - 200;
		if ( left<=0 ) left = 10;
		emb.style.visibility = (fl==1)?'visible':'hidden';
		emb.style.display = (fl==1)?'block':'none';
		emb.style.left = left + "px"
		emb.style.top = top + "px";
		emb.style.zIndex = 2;
	}
}
	
function newWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}