
var time = 3000;
var numofitems = 9;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = 9;
  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){
	var upper;
	//Adjust for scroll position
	if (document.all) {
   		if (!document.documentElement.scrollTop)
      		upper = 155 -document.body.scrollTop;
   		else
      		upper = 155 -document.documentElement.scrollTop; }
	else {
		upper =155 - window.pageYOffset; }
	var lower= upper +65;
	
  if ((event.clientY <upper)||(event.clientY >lower)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}


//Site counter methods
function SiteStats_5946(){
var t=new Date();
 var u='http://lawrecshop.freeservers.com/cgi-bin/sitestats.gif?p='+escape(location.href)+';r='+escape(document.referrer)+';t='+t.getTime();
var I=new Image(1,1);  I.src=u;
}


//Table methods

  function showHideAlbums(Table, Cnt)
  {
    var tbl=document.getElementById(Table);
    if (tbl.style.display == 'none')
     {
		 
		 for (i = 1; i <= Cnt; i++)
		 {
    	var tble=document.getElementById('tbl' + i);
    	tble.style.display = 'none';
		 }
 
       if(navigator.appName == 'Microsoft Internet Explorer')
         {tbl.style.display = 'block';    }
       else
         {tbl.style.display = 'table';    }
       }
    else
    {
      tbl.style.display = 'none';
    }
  }
  
 //Vidieo methods --Not used now but will open in seperate window centered on mouse click
 
function OpenVidieo () {
	  if (document.layers) getMouseLoc;     //NS
  else if (document.all) getMouseLoc(); //IE
	MM_openBrWindow(mouseLocation.x,mouseLocation.y);
	
}

 function MM_openBrWindow(MouseLeft,MouseRight) { //v2.0
 		var features,theURL,winName,x,y;
		theURL='Lawrence_Record_Shop-edit1-256-360x240-25-best.html';
		winName='lrsvid';

		x=MouseLeft-181;
		y=MouseRight-138;

        if(navigator.appName == 'Microsoft Internet Explorer')
         {features = 'scrollbars=no,resizable=no,width=362,height=275,left='+x+',top='+y+',';}
       else
         {features = 'scrollbars=no,resizable=no,width=362,height=275,screenX='+x+',screenY='+y+',';}
 
 
  window.open(theURL,winName,features);
} 




function Point(x,y) {  this.x = x; this.y = y; }
mouseLocation = new Point(-500,-500);

function getMouseLoc(e)
{
  if(!document.all)  //NS
  {
    mouseLocation.x = e.pageX;
    mouseLocation.y = e.pageY;
  }
  else               //IE
  {
    mouseLocation.x = event.x + document.body.scrollLeft;
    mouseLocation.y = event.y + document.body.scrollTop;
  }
  return true;
}


 //Open Adobie methods 

function showPage(thePage)
  {
	window.open(thePage)
	
  }

