		


var msrc='';
var mstb='';
var mshm='';
var mslm='';
var ClayerBG = '';
window.addEvent('domready', function() {
        
	
		
		HistoryManager.initialize();
				
        if (_$("TickerID"))
        Ticker.start();
        
        if (MenuTop)
        MenuTop.activate();
   
        if (Content)
		{
		Content.activate();
		Content.updateNewsControls();
		}		
		
		msrc = new Fx.Slide('RightColumn', {duration:100});
		mstb = new Fx.Slide('TopBanner_img', {duration:fx_duration});	
		mslm = new Fx.Slide('LMenu_div', {duration:fx_duration, mode:'horizontal'});
		mshm = new Fx.Slide('HMenu_div', {duration:fx_duration, mode:'horizontal'});

		$("contentLayer").effect('opacity', {
				duration: 10,
				wait: false}).set(0);

		$("contentText").effect('opacity', {
				duration: 10,
				wait: false}).set(0);
				
		ClayerBG = new Fx.Styles($("contentLayer"), {duration:500, wait:false});
		ClayerTX = new Fx.Styles($("contentText"), {duration:200, wait:false});
		
		$("contentLayer").addEvent('click', function(){
			Content.showBClose(0);
			Content.showBPDF(0);
			Content.showBPrint(0);
			Content.closePDFDownload();
			ClayerBG.start({
				'opacity' : 0
			});
			ClayerTX.start({
				'opacity' : 0
			}).chain(function(){
		
			_$("contentText").innerHTML='';	
			_$("contentLayer").style.height=getWinHeight();//_$("mainTableS").offsetHeight + 20 + 'px';
			});			
		});
		
		$("close_pdfonly").addEvent('click', function(){
			Content.showBClose(0);
			Content.showBPDF(0);
			Content.showBPrint(0);
			Content.closePDFDownload();
			ClayerBG.start({
				'opacity' : 0
			});
			ClayerTX.start({
				'opacity' : 0
			}).chain(function(){
		
			_$("contentText").innerHTML='';	
			_$("contentLayer").style.height=getWinHeight();
			});			
		});
		
		$("button_close").addEvent('click', function(){
			Content.showBClose(0);
			Content.showBPDF(0);
			Content.showBPrint(0);
			Content.closePDFDownload();
			ClayerBG.start({
				'opacity' : 0
			});
			ClayerTX.start({
				'opacity' : 0
			}).chain(function(){
		
			_$("contentText").innerHTML='';	
			_$("contentLayer").style.height=getWinHeight();
			Content.updateNewsControls();
			});			
		});
	
				
			//_$("MainPageContent").style.height=parseInt(getWinHeight())-700 + "px";
			HistoryManager.start();
			

		try{
        _$("mainTable").style.display="table";
		}catch(e){
        _$("mainTable").style.display="block";
		}
		_$("Loading").style.display="none";
		
		document.body.style.background="#3B76AC";
		
		setTimeout("Content.docPreload()", 2000);

});

function fireClose(){
			Content.showBClose(0);
			Content.showBPDF(0);
			Content.showBPrint(0);
			Content.closePDFDownload();
			ClayerBG.start({
				'opacity' : 0
			});
			ClayerTX.start({
				'opacity' : 0
			}).chain(function(){
		
			_$("contentText").innerHTML='';	
			_$("contentLayer").style.height=getWinHeight();
			});			
}

window.addEvent('resize', function() {

        if (Content)
        Content.onresize();
		
		bounds = getBounds(_$("main_table_off"));
		_$("RightColumn").style.top=bounds['top']+220+"px";
        
});


document.addEvent('click', function() {

		
        if (MenuTop)
        MenuTop.killPopup();
        
        if (Content)
        Content.kill();
});
