

/**************GENERAL JAVASCRIPT THAT WRITES THE NAVIGATION BAR*******/
var horPtr = 0 ;      					    
 barHorArray = new Array(horPtr +30); // create global barHorArray to store images for verical and horizontal bars
function BarClass(num,nicName,refFile,theName) {
  // Attributes:
  this.barNum=num; 
  this.barNicName= nicName;
  this.ref= refFile; 
  this.barTheName= theName;		//this.imgBarName="bar"+ num; 	//e.g. "bar2"	  
  //this.idcalss ="" ;  				
  this.display= display;  
}
function display() {   							
	  document.write('<li><a href="'); 
	  document.write(this.ref); 	
	  document.write('"  ');
	  document.write(this.idcalss); 
	  document.write(' >');
    document.write(this.barTheName); 
	  document.write('</a></li>');
}


function NavClass(len, visualtop, visualbot, classhomeid) { // NavClass Class declaration
	 this.navLen=len;
   this.topHtml = visualtop;
   this.botHtml = visualbot;
   this.classHome = classhomeid
	 //methods:
	 this.displayNavHor=displayNavHor;   //puts the navagation table frame  //and loops over all bar display each
}
//-----------------------------------------------------------------
// displayNavHor Method
//-----------------------------------------------------------------
function displayNavHor(barname) {  
   document.write(this.topHtml);
    var k;
	  for (k=horPtr +1 ; k <= this.navLen  ; k++)
	  {

       if  ( barHorArray[k].barNicName == barname ){
      				barHorArray[k].idcalss = ' id="current" ';                    
       }    
   	   barHorArray[k].display();
	 }
   document.write(this.botHtml);	
}




