function jsPrint()
{
	window.print();
}

function alleIdretterOpen()
{
	$j("#alleidretter_wrap").show();
	$j("#alleidretter_bg").show();
	$j("#alleidretter_content_bg").show();
	$j("#alleidretter_content").show();
	$j("#page").hide();
	$j("#page-bottom").hide();
}

function alleIdretterClose()
{
	$j("#alleidretter_wrap").hide();
	$j("#alleidretter_bg").hide();
	$j("#alleidretter_content_bg").hide();
	$j("#alleidretter_content").hide();
	$j("#page").show();
	$j("#page-bottom").show();
}

function ai_over(obj)
{
	obj.className=obj.className+'-over';
}

function ai_out(obj)
{
	obj.className=obj.className.replace(/-over/gi, "");
}

function image_swap(obj, img_src)
{
	obj.src=img_src;
}

jQuery(document).ready(function() {
	applyCSSViewSize();
});

/* This function setts the users current viewheight to 'alle idretter'-popup CSS height property. */
function applyCSSViewSize()
{
	var viewPortHeight;
	var viewPortWidth;

	if(typeof window.innerHeight != 'undefined')
	{
		viewPortHeight = window.innerHeight;
		viewPortWidth = window.innerWidth;
	}
	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientHeight != 'undefined' && document.documentElement.clientHeight != 0)
	{
		viewPortHeight = document.documentElement.clientHeight;
		viewPortWidth = document.documentElement.clientWidth;
	}
	else
	{
		viewPortHeight = document.getElementsByTagName('body')[0].clientHeight;
		viewPortWidth = document.getElementsByTagName('body')[0].clientWidth;
	}
	$j("#alleidretter_bg").height(viewPortHeight);
	$j("#alleidretter_bg").width(viewPortWidth);
}

