var browserName=navigator.appName; 
/*
function getScrollHeight(){
	if (browserName!="Microsoft Internet Explorer"){
		if (document.documentElement && document.documentElement.scrollHeight)
					theHeight = document.documentElement.scrollHeight;
		else if (document.body)
					theHeight = document.body.scrollHeight;
	}else theHeight = screen.height;
		return theHeight;
}
*/

function body_top(){
	if (document.documentElement && document.documentElement.scrollTop)
		return document.documentElement.scrollTop;
	else if (document.body)
		return document.body.scrollTop	
}

function trans_bg(show){
	if(show){
	/*	
		if(getScrollHeight() > 0){
			h = getScrollHeight()	
		}else h = window.innerHeight; 
	*/
	var h = screen.height;
		document.getElementById('trans_bg').style.height = h + body_top() + "px";
		document.getElementById('trans_bg').style.display = 'block';
	}else document.getElementById('trans_bg').style.display = 'none';
}

function ShowFloatingDiv(objId, w, show){
		document.getElementById(objId).style.left = (screen.width-w)/2 + "px";
		document.getElementById(objId).style.top =  50 + body_top() + "px";
		if(show)	document.getElementById(objId).style.display = 'block';
			else document.getElementById(objId).style.display = 'none';
		trans_bg(show);
		
	
}
