var orig_width;
var orig_height;
var fullscreen = false;

function lrLinearFullscreenPrepare(id)
{
	var obj = document.getElementById(id);
	orig_width = obj.clientWidth;
	orig_height = obj.clientHeight;

	obj.style.position = "fixed";
	obj.style.width = orig_width + "px";
	obj.style.height = orig_height + "px";
}

function lrLinearFullscreen(id)
{
	if(fullscreen) return false;
	var obj = document.getElementById(id);

	obj.style.top = "0px";
	obj.style.left = "0px";
	obj.style.width = (window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth) + "px";
	obj.style.height = (window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight) + "px";
	
	fullscreen = true;
	return true;
}

function lrLinearFullscreenReset(id)
{
	var obj = document.getElementById(id);

	obj.style.position = "relative";
	obj.style.width = orig_width + "px";
	obj.style.height = orig_height + "px";
	
	fullscreen = false;
	return true;
}
