function fnTextSize(textSize) {											
	document.body.className = textSize;			
	var menuLinks = document.getElementById("menu").getElementsByTagName("A");
	for(i=0;i<menuLinks.length;i++) {
		menuLinks[i].href = menuLinks[i].href.split("?")[0]+"?tSize="+textSize;
	}			
} 

function fnPrint() {	
	window.print();			
}

function fnBodyId(newID) {	
	document.body.id = newID;		
}

// Popup
function fnPopUp(filePath,height,width,attributes){
	var sScreenX = screen.width
	var sScreenY = screen.height
	var x = sScreenX - width
	var y = sScreenY - height
	var winLeft = x/2
	var winTop =  y/2 
	window.open(filePath,"","width=" + width + ",height=" + height + "," + attributes + ",left=" + winLeft + ",top=" + winTop)
}


/** Generic popup **/

function RightContent(id)
{
	$(id).blur();
	
	if($(id).style.display != 'block' && $(id).style.display != '')
	{

		new Effect.BlindDown($(id), {duration: 0.55, queue: 'end'});	
	}
	else
	{

		new Effect.BlindUp($(id), {duration: 0.55, queue: 'front'});
	}
}



// Change tab function for TV page //

var activeLink = 'tab_news';
var activeDIV = 'ScrollNews';

function homeTabs(LinkId,AreaId) {
	
	if(AreaId != activeDIV)
	{
		new Effect.Fade($(activeDIV), { beforeStart: function() {
			
			$(LinkId).className = 'active';
			$(activeLink).className = '';
			activeLink = LinkId;
			activeDIV = AreaId;
		}, duration: 0.7, queue: 'front', afterFinish: function() {
			new Effect.Appear($(AreaId), { duration: 0.7, queue: 'front'});
		}
		});
	}
	$(LinkId).blur();
}
