/* step 3.a: Set the array of icons
     for each image in the navigator bar, replace the corresponding
     image source files and the corresponding link file/url
*/  
//-----------------------------------------------------------------
// NavClass Method - function setBarArray()
//         creates bar instances with correc settings for each bar
//-----------------------------------------------------------------

var numOfBars;

function setBarArray()	
{	
barArray[1] = new BarClass(1, 
                 "/homepage/images/academics.gif",  //default image file
	         "/homepage/images/academics2.gif",  //image for mouseOn
                 "javascript:;",    //the link for bar#1
                 "");   //alt tag    
							  
barArray[2] = new BarClass(2,  
                 "/homepage/images/administration.gif",   
		 "/homepage/images/administration2.gif",
                 "javascript:;", 
                 "");

barArray[3] = new BarClass(3, 
                 "/homepage/images/about.gif",
		 "/homepage/images/about2.gif",		 
		 "javascript:;",
                 "");

barArray[4] = new BarClass(4, 
                 "/homepage/images/calendar.gif", 
   		 "/homepage/images/calendar2.gif",  		
		 "javascript:;",
                 "");

barArray[5] = new BarClass(5, 
                 "/homepage/images/directories.gif", 
   		 "/homepage/images/directories2.gif",
                 "/ph/dir_search.html",
                 "");
					 
 barArray[6] = new BarClass(6, 
         	 "/homepage/images/education.gif", 
   		 "/homepage/images/education2.gif",
  		 "javascript:;",
                 "");
					 
 barArray[7] = new BarClass(7, 
         	 "/homepage/images/gstudies.gif", 
   		 "/homepage/images/gstudies2.gif",
  		 "javascript:;",
                 "");
var last_ind = 7;
if(numOfBars==13)
{
	last_ind++;
	barArray[last_ind]= new BarClass(last_ind,  
                 "/homepage/images/campus.gif", 
  		 "/homepage/images/campus2.gif",		 
		 "javascript:;",  
                 "");                 
}				 

last_ind++;

				 
barArray[last_ind]= new BarClass(last_ind,  
         	"/homepage/images/search.gif", 
  		"/homepage/images/search2.gif",
		"javascript:;",  
            	"");
last_ind++;
barArray[last_ind]= new BarClass(last_ind,  
         	"/homepage/images/support.gif", 
  		"/homepage/images/support2.gif",
		"javascript:;",  
            	"");
last_ind++;			
barArray[last_ind]= new BarClass(last_ind,  
         	"/homepage/images/technology.gif", 
  		"/homepage/images/technology2.gif",
		"javascript:;",  
            	"");
last_ind++;
barArray[last_ind]= new BarClass(last_ind,  
         	"/homepage/images/wonder.gif", 
  		"/homepage/images/wonder2.gif",
		"http://wis-wander.weizmann.ac.il/site/EN/homepage.asp",  
            	"");
last_ind++;
barArray[last_ind]= new BarClass(last_ind,  
         	"/homepage/images/wonderHeb.gif", 
  		"/homepage/images/wonderHeb2.gif",
		"http://wis-wander.weizmann.ac.il/site/HE/homepage.asp",  
            	"");
}	


//-----------------------------------------------------------------
// step 3.b: Set the parameter numOfBars to total number of the bars (images)
//-----------------------------------------------------------------
function initNav(from_ip) { 
  
  if((from_ip.substr(0,6)== "132.77") || (from_ip.substr(0,6)== "132.76") )
  {
	SubMenusList = new Array("","academics","admin","about","calender", "direct", "education", "gstudies","campus", "search", "supp","tech","wonder","hebwonder");
  	numOfBars = 13;  	
  } 
  else
  {
  	SubMenusList = new Array("","academics","admin","about","calender", "direct", "education", "gstudies","search", "supp","tech","wonder","hebwonder");	
   	numOfBars = 12;
  }

  barArray = new Array(numOfBars);  // create global barArray to store images
  theNav= new NavClass(numOfBars);  //the parameter - number of the bars in the navagation bar 
  theNav.setBarArray();             //fill barAray with images
  
  
}
 
 
 
 
