// JavaScript Document

var time = 3000;
var numofitems = 7;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = allitems;
  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 <1)||(event.clientY > 120)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}




function Sub_win(why){
  win = window.open(why, 'Show', "copyhistory=no,directories=no,menubar=yes,location=no,resizable=no,scrollbars=yes,width=500,height=650");
  win.focus();
  }



var p;
function showimg(u,wd,hg)
{
s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=no,menubar=no,resizable=yes,top=20, left=20,width='+(wd+16)+',height='+(hg+16));
s.document.open();
s.document.writeln('<html><head><title>photo</title></head><body bgcolor=ffffff onload="window.self.focus();return true;" leftMargin="0" topMargin="0" marginheight="0" marginwidth="0"><table cellcpacing=0 cellpadding=5 border=0 width=100% height=100%><tr><td align=center><a href=javascript:window.close()><img src="' + u + '" border="0" width="' + wd + '" height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
s.document.close();
s.focus();
}
