var contentLayerCount = 16
var menuLayerCount = 6

function layerToggleOn(linkNumber) {
lockDown(null)
eval("document.getElementById('"+ linkNumber + "').style.visibility = 'visible'")
}

function menuLayerToggleOn(linkNumber, X, Y) {
//menuLayerCount = 6
menuCount = 1
while (menuCount <= menuLayerCount) {
	eval("layerToggleOff('menu"+ menuCount + "')")
	menuCount++
	}
eval("document.getElementById('"+ linkNumber + "').style.visibility = 'visible'")
layerPosition(linkNumber, X, Y)

}

function layerPosition(linkNumber,X, Y) { //Unused because of cross browser issues
eval("document.getElementById('" + linkNumber + "').style.left =" + X)
eval("document.getElementById('" + linkNumber + "').style.top =" + Y)
}

function layerToggleOff(linkNumber) {
eval("document.getElementById('" + linkNumber + "').style.visibility = 'hidden'") 
}

function lockDown(flag) {
	if (flag != "override") {
		//contentLayerCount = 15 //Total Number of layers that show content in the main page
		//menuLayerCount = 6 //Total number of pop up menus 
		boxCount = 1 //initialize variable for while loop
		while (boxCount <= contentLayerCount) {
			eval("layerToggleOff('contentBox" + boxCount + "')")
			boxCount++
		}
		menuCount = 1
		while (menuCount <= menuLayerCount) {
			eval("layerToggleOff('menu"+ menuCount + "')")
			menuCount++
		}
	} else {
		menuLayerCount = 6 //Total number of pop up menus 
		menuCount = 1
		while (menuCount <= menuLayerCount) {
			eval("layerToggleOff('menu"+ menuCount + "')")
			menuCount++
		}
	
}
}
//Older Functions for Photo Pages
	
function projectsWindow(projectURL, w, h) {
var w1 = w
var h1 = h
var xposition = (document.body.clientWidth - w1)/2
var yposition = (document.body.clientHeight - h1)
var winProps = "directory=no,toolbars=no,scrollbars=no,location=no,width="+w1+",height="+h1+",screenX="+xposition+",screenY="+yposition+",top="+yposition+",left="+xposition
var newWindow2 = window.open(projectURL,"",winProps)

	}
	

