

function openItemWin(id) {

	var newWin;

	newWin = window.open('../pages/popup.php?id='+id,'Image','height=600,width=500,top=100,left=100,menubar=no,toolbar=no,scrollbars=yes');

}

function openWin (fileName, windowName) { 

	var newWin;

	newWin = window.open(fileName,windowName,'height=600,width=738,top=100,left=100,menubar=no,toolbar=no,scrollbars=yes'); 

} 


//menu constructor

function menu(allitems,thisitem,startstate){ 

  callname= "gl"+thisitem;

  divname="subglobal"+thisitem;  

	this.numberofmenuitems = 7;

	this.caller = document.getElementById(callname);

	this.thediv = document.getElementById(divname);

	this.thediv.style.visibility = startstate;

}

				 

//menu methods

function ehandler(event,theobj){

  for (var i=1; i<= theobj.numberofmenuitems; i++){

	  var shutdiv =eval( "menuitem"+i+".thediv");

    shutdiv.style.visibility="hidden";

	}

	theobj.thediv.style.visibility="visible";

}

				

function closesubnav(event){

  if ((event.clientY <48)||(event.clientY > 107)){

    for (var i=1; i<= numofitems; i++){

      var shutdiv =eval('menuitem'+i+'.thediv');

			shutdiv.style.visibility='hidden';

		}  

	}

}



function openCalendar(fieldToPopulate) {

	var cal = new calendar2(fieldToPopulate);

	cal.year_scroll = true;

	cal.time_comp = false;	

	cal.popup();

}





function openCalendar3(fieldToPopulate) {

	var cal = new calendar3(fieldToPopulate);

	cal.year_scroll = true;

	cal.time_comp = false;

	cal.popup();

}



function openCalendar4(fieldToPopulate) {

	var cal = new calendar3(fieldToPopulate);

	cal.year_scroll = true;

	cal.time_comp = true;

	cal.popup();

}



