
function initCalque(target)
{
	if ($("fullCalque") == undefined)
	{
		var fullCalque = document.createElement("div");
		fullCalque.id = "fullCalque";
		
		var fullContener = document.createElement("div");
		fullContener.id = "fullContener";
		
		var Top = deltaY();

		fullCalque.style.top				= Top+"px";
		fullCalque.style.left				= "0px";
		fullCalque.style.height				= navHeight()+"px";
		fullCalque.style.width				= navWidth()+"px";
		fullCalque.style.backgroundColor	= "black";
		fullCalque.style.position			= "absolute";
		fullCalque.setAttribute("onclick", "cleanCalque();");
		
		fullContener.style.top				= fullCalque.style.top;
		fullContener.style.left				= fullCalque.style.left;
		fullContener.style.height			= fullCalque.style.height;
		fullContener.style.width			= fullCalque.style.width;
		fullContener.style.position			= fullCalque.style.position;
		fullContener.setAttribute("onclick", "cleanCalque();");
		
		$("body").appendChild(fullCalque);
		$("body").appendChild(fullContener);
		fullCalque.watchMove = setInterval("scrollWinTo("+Top+")", 5);
		getUrl("/system/"+target);
	}
}

function cleanCalque()
{
	try { clearInterval($("fullCalque").watchMove); } catch (e) {}
	try { $("body").removeChild($("fullCalque")) } catch (e) {}
	try { $("body").removeChild($("fullContener")) } catch (e) {}
}

function deltaY() {
	return window.pageYOffset
	|| document.documentElement.scrollTop
	|| document.body.scrollTop
	|| 0;
}

function deltaX() {
	return window.pageXOffset
	|| document.documentElement.scrollLeft
	|| document.body.scrollLeft
	|| 0;
}

function scrollWinTo(val)
{
	try { window.pageYOffset = val; } catch (e) {} 
  	try { document.documentElement.scrollTop = val; } catch (e) {} 
    try { document.body.scrollTop = val; } catch (e) {} 
}

if (!document.all)
{
	var navWidth = function() { return (document.documentElement.clientWidth); }
	var navHeight = function() { return (document.documentElement.clientHeight); }
}
else
{
	var navWidth = function() { return (document.body.clientWidth); }
	var navHeight = function() { return (document.body.clientHeight); }
}

