function ShowNews(id)
{
	news = document.getElementById(id);
	var viewPortWidth = windowState.getWidth();
	var viewPortHeight = windowState.getHeight();
	var horizontalScroll = windowState.getScrollX();
	var verticalScroll = windowState.getScrollY();
	var hPos = Math.round(horizontalScroll+((viewPortWidth-774)/2));
	//var vPos = Math.round(verticalScroll+((viewPortHeight-news.style.height)/2));
	var vPos = verticalScroll+10;
	hPos = (hPos < 0)?0:hPos;
	vPos = (vPos < 0)?0:vPos;
	
	document.getElementById(id).style.left = hPos+"px";
	document.getElementById(id).style.top = vPos+"px";
	document.getElementById(id).style.visibility = "visible";
}

function HideNews(id)
{
	document.getElementById(id).style.visibility = "hidden";
}

var windowState = (
	function(){
		var readScroll  = {scrollLeft:0,scrollTop:0};
		var readSize    = {clientWidth:0,clientHeight:0};
		var readScrollX = 'scrollLeft';
		var readScrollY = 'scrollTop';
		var readWidth   = 'clientWidth';
		var readHeight  = 'clientHeight';

		function otherWindowTest(obj){
			if((document.compatMode)&&
				(document.compatMode == 'CSS1Compat')&&
				(document.documentElement)){
			return document.documentElement;
			} else if(document.body){
				return document.body;
			}else{
				return obj;
		}
		};

		if((typeof this.innerHeight == 'number')&&
			(typeof this.innerWidth == 'number')){
			readSize = this;
			readWidth = 'innerWidth';
			readHeight = 'innerHeight';
		}else{
			readSize = otherWindowTest(readSize);
		}
		
		if((typeof this.pageYOffset == 'number')&&
			(typeof this.pageXOffset == 'number')){
			readScroll = this;
			readScrollY = 'pageYOffset';
			readScrollX = 'pageXOffset';
		}else{
			readScroll = otherWindowTest(readScroll);
		}
		
		return {
			getScrollX:function(){
			return (readScroll[readScrollX]||0);
		},
		getScrollY:function(){
		return (readScroll[readScrollY]||0);
		},
		getWidth:function(){
		return (readSize[readWidth]||0);
		},
		getHeight:function(){
		return (readSize[readHeight]||0);
		}
		};
})();