function showPaperWindow (oParams) {
	if ( !oParams ) oParams = new Object();
	if ( oParams.visible == undefined ) oParams.visible = true;
	
	var wPaper;
	if ( wPaper = document.getElementById("w-paper") ) {
		if ( !wPaper.initialized ) {
			wPaper.initialized = true;
			wPaper.visible = false;
			
			var wBackground = document.getElementById("w-paper-background");
			wBackground.style.opacity = ".8";
			wBackground.style.filter = "alpha(opacity=80)";
			
			if ( window.addEventListener ) {
				window.addEventListener("resize", resizepaperWindow, false);
				window.addEventListener("scroll", resizepaperWindow, false);
			} else if ( window.attachEvent ) {
				window.attachEvent("onresize", resizepaperWindow );
				window.attachEvent("onscroll", resizepaperWindow );
			}
		}
		
		wPaper.visible = oParams.visible;
		wPaper.style.display = oParams.visible ? "block" : "none";
			
		resizepaperWindow();
	}
}


function resizepaperWindow(e) {
	var wPaper;
	
	if ( wPaper = document.getElementById("w-paper") ) {
		if ( wPaper.visible ) {
			wPaper.style.width  = String(document.documentElement.clientWidth) + "px";
			wPaper.style.height = String(document.documentElement.clientHeight) + "px";
			wPaper.style.top    = window.pageYOffset != undefined ? String(window.pageYOffset) + "px" : document.documentElement.scrollTop + "px";
			wPaper.style.left   = window.pageXOffset != undefined ? String(window.pageXOffset) + "px" : document.documentElement.scrollLeft + "px";
			
			var wBackground = document.getElementById("w-paper-background");
			wBackground.style.width  = wPaper.style.width;
			wBackground.style.height = wPaper.style.height;
			
			var wWindow = document.getElementById("w-paper-window");
			wWindow.style.left = String((document.documentElement.clientWidth / 2) - (wWindow.offsetWidth / 2)) + "px";
			wWindow.style.top  = String((document.documentElement.clientHeight / 2) - (wWindow.offsetHeight / 2)) + "px";
		}
	}
}