function toggle(theID) {
foo = document.getElementById(theID);
if (foo.style.display == 'none') foo.style.display = 'inline';
else foo.style.display = 'none';
return;
}
// this function puts the dark screen over the entire page
function dark()
{
   var myHeight = document.body.scrollHeight;
   if( typeof( window.innerHeight ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
   var page_screen = document.getElementById('page_screen');
   page_screen.style.height = myHeight + 'px';
   page_screen.style.display = 'block';
}

// this function removes the dark screen and the page is light again
function light()
{
   var page_screen = document.getElementById('page_screen');
   page_screen.style.display = 'none';
}

function project(id,state) {
	var foo = document.getElementById(id);
	if (state == 1) {
	    w = 640;
	    h = 480;
	    xc = Math.round((document.body.clientWidth/2)-(w/2))
	    yc = Math.round((document.body.clientHeight/2)-(h/2))
	    
	    foo.style.left = xc + "px";
	    foo.style.top  = yc + "px";
	    foo.style.display = 'block';
	
		dark();
	}
	else {
		foo.style.display='none';
		light();
	}
}