

/**************GENERAL JAVASCRIPT THAT WRITES THE NAVIGATION BAR*******/
var horPtr = 0 ; 
var topPtr = 0 ;

 barHorArray = new Array(horPtr +30); // create global barHorArray to store images for verical and horizontal bars
 barHorArrayTop = new Array(topPtr +30);

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.newTopHtml = visualtop;

   this.newBotHtml = visualbot;

   this.classHome = classhomeid

	 //methods:

	 this.displayNavHor=displayNavHor;   //puts the navagation table frame  //and loops over all bar display each

	 this.displayNavTop=displayNavTop;

}

//-----------------------------------------------------------------

// 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);	
   
}

//-----------------------------------------------------------------

// displayNavHorTop Method
// Added By Avi Edelson, On 10/18/2009

//-----------------------------------------------------------------

function displayNavTop(barname) {  

   document.write(this.newTopHtml);

    var k;

	  for (k=horPtr +1 ; k <= this.navLen  ; k++)

	  {



       if  ( barHorArrayTop[k].barNicName == barname ){
					
      				barHorArrayTop[k].idcalss = ' id="current" ';                    
					
       }    

   	   barHorArrayTop[k].display();
		
	 }

   document.write(this.newBotHtml);
    



}








