/* 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
//-----------------------------------------------------------------
function setBarArray()	
{
 
  barArray[1]= new BarClass(1,                                         
                 "/materials/Cahen/images/btn_res1.gif", 
   		         "/materials/Cahen/images/btn_res2.gif",
		         "/materials/Cahen/images/btn_res3.gif",  
				  "/materials/Cahen/research",
                 "Research Interests");
	
  barArray[2] = new BarClass(2,  
                 "/materials/Cahen/images/btn_group1.gif",  //default image file
	             "/materials/Cahen/images/btn_group2.gif",  //image for mouseOn
                 "/materials/Cahen/images/btn_group3.gif",  //image for selected category 
                 "/materials/Cahen/members",                //the link for bar#1
                 "Group Members");                                     //alt tag    
							  
 barArray[3] = new BarClass(3, 
                 "/materials/Cahen/images/btn_pub1.gif",   
		         "/materials/Cahen/images/btn_pub2.gif",
                 "/materials/Cahen/images/btn_pub3.gif",
				 "/materials/Cahen/publications",                //the link for bar#1
                 "Publications");                
			//"/perl/wispub.mperl?submit=Submit&formname=search&author=Cahen&orderby=yr%20desc&disptype=type2&dir=/materials/Cahen", 
               //  "Publications");
 
  barArray[4] = new BarClass(4, 
                 "/materials/Cahen/images/btn_labequip1.gif",   
		         "/materials/Cahen/images/btn_labequip2.gif",
                 "/materials/Cahen/images/btn_labequip3.gif",
		         "/materials/Cahen/equipment", 
                 "Lab Equipment");
 
 
 barArray[5]= new BarClass(5,  
                 "/materials/Cahen/images/btn_links1.gif", 
   		         "/materials/Cahen/images/btn_links2.gif",
		         "/materials/Cahen/images/btn_links3.gif",
		         "/materials/Cahen/links",  
                 "Links"); 

barArray[6]= new BarClass(6,  
                 "/materials/Cahen/images/btn_posters1.gif", 
   		         "/materials/Cahen/images/btn_posters2.gif",
		         "/materials/Cahen/images/btn_posters3.gif",
		         "/materials/Cahen/posters",  
                 "Posters"); 

barArray[7]= new BarClass(7,  
                 "/materials/Cahen/images/btn_rpos1.gif", 
   		         "/materials/Cahen/images/btn_rpos2.gif",
		         "/materials/Cahen/images/btn_rpos3.gif",
		         "/perl/display_poscientist.mperl?scientist=30&indir=/materials/Cahen/&outdir=DavidCahen",  
                 "Research Positions"); 


barArray[8]= new BarClass(8,  
                 "/materials/Cahen/images/btn_home1.gif", 
   		         "/materials/Cahen/images/btn_home2.gif",
		         "/materials/Cahen/images/btn_home3.gif",
		         "/materials/Cahen/home",  
                 "Home Page"); 
	
	
}	

//-----------------------------------------------------------------
// step 3.b: Set the parameter numOfBars to total number of the bars (images)
//-----------------------------------------------------------------
function initNav() { 
  var numOfBars= 8;
  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
}
 
 function writeHeader() { 
// NavClass Method - display navigator in a table
// activate display method for each bar
  document.write('<table width=100%" border="0" cellspacing="0" cellpadding="0">');
  document.write('<tr>');
  document.write('<td width="147" height="49" align="left" valign="top"><img src="/materials/Rubinstein/images/top_l.gif" width="147" height="49"></td>');
  document.write('<td width="100%">&nbsp;</td>');  
  document.write('<td width="195" height="76" align="right" valign="top" rowspan="3"><img src="/materials/Rubinstein/images/wis.gif" alt="Weizmann Institute of Science" width="195" height="76"></td>');
  document.write('</tr><tr>');
  document.write('<td width="148" height="97" align="left" valign="top" rowspan="2"><img src="/materials/Rubinstein/images/bt_l.jpg" width="82" height="97"><img src="/materials/Rubinstein/images/bt_r.gif" width="65" height="97"></td>');
  document.write('<td><a href="/materials/"><img src="/materials/images/titleold.gif" alt="Materials and Interfaces" width="403" height="73" border="0"></a></td>');
    document.write('</tr><tr>');
document.write('<td><img src="/materials/Cahen/images/prof_name.gif" alt="Prof. David Cahen" width="350" height="30"></td>');
  document.write('</tr><tr>');
    document.write('<td align="left" colspan="3"><img src="/materials/Rubinstein/images/spacer.gif" width="260" height="15"><img src="/materials/Cahen/images/gr_name.gif" alt="Optoelectronic Materials Group" width="350" height="30"></td>');
  document.write('</tr></table>'); 
 }
 

