function setToForeground()
{
	document.styleSheets[0].disabled=false;
	document.styleSheets[1].disabled=true;
}

function setToBackground()
{
	document.styleSheets[0].disabled=true;
	document.styleSheets[1].disabled=false;
}

function setClassFontSize(classN,size)
{
	var objs = getElementsByStyleClass(classN);
	
	for(var i = 0; i < objs.length; i ++){
		objs[i].style.fontSize = size+"px";
	}
}

function getElementsByStyleClass (className)
{
	var all = document.all ? document.all:document.getElementsByTagName('*');
	var elements = new Array();

	for (var e = 0; e < all.length; e++)
		if (all[e].className == className)
			elements[elements.length] = all[e];
	return elements;
}

function goTo(page)
{
	top.document.location.href = page;

 	return false;
}

function getPageWidth()
{
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		return window.innerWidth;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		return document.documentElement.clientWidth;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		return document.body.clientWidth;
	}
}

function getPageHeight()
{
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		return window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		return document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		return document.body.clientHeight;
	}
}