// JavaScript Document


// The following function places the page passed to it into the center of the window
function placePage(page) {
		placeElement(page, W, 0);
} // close function 

W = (windowWidth() - 720)/2;


function placeElement(id, x, y) {
	object = document.getElementById(id);
	object.style.left = x + "px";
	object.style.top = y + "px";
} // close function


function windowWidth() {
	
	if (window.innerWidth) return window.innerWidth;
	else if (document.documentElement) return document.documentElement.offsetWidth;
	else if (document.body.clientWidth) return document.body.clientWidth;
} // close function

function windowHeight() {
	if (window.innerHeight) return window.innerHeight;
	else if (document.documentElement) return document.documentElement.offsetHeight;
	else if (document.body.clientHeight) return document.body.clientHeight;
} // close function


function showLayer(layerId)	{
    var layer = document.getElementById(layerId);
    layer.style.visibility = "visible";

}	

function hideLayer(layerId)	{
    var layer = document.getElementById(layerId);
    layer.style.visibility = "hidden";

}	