/*  
 This file is a template file for setting of Vertical Navigation Bars

  The Vertical bar setting is done by initializing values into the pre defined barArray  in NavGen: :    
        - bar Array  is used and  is initialized for VERTICAL  bar  images  from loaction 0 up-to  30
        - bar Array  is used and  is initialized for HORIZONTAL  bar images in from location 31 up-to  60

   the declaration in NavGen.js is  
            var horPtr = 30 ;       // the location and the allocation  of the Horizontal bars starts in barAry at location 31
                                               //    therefore we set the horPtr as 30     
          barArray = new Array(horPtr +30);  // create global barArray to store images for verical and horizontal bars
                                                                   //  this is equal to say BarArray = new Array(60 ); 

*/  
/*  Set the array of icons
     for each image in the Vertical navigator bar, replace the corresponding
     image source files and the corresponding link file/url
*/  
//-----------------------------------------------------------------
// NavClass Method - function setBarArray()
//         creates bar instances with correct settings for each bar in Vertical navagation bar
//-----------------------------------------------------------------
function setBarArray()	
{	
  barArray[1] = new BarClass(1,"proj", 
                 "/immunology/jung/images/btn_proj1.gif",  //default image file
	             "/immunology/jung/images/btn_proj2.gif",  //image for mouseOn
                 "/immunology/jung/images/btn_proj3.gif",  //image for selected category 
                 "/immunology/jung/projects.html",    //the link for bar#1
                 "Research Projects");   //alt tag    
							  
 barArray[2] = new BarClass(2,"group",  
              "/immunology/jung/images/btn_memb1.gif",   
		      "/immunology/jung/images/btn_memb2.gif",
              "/immunology/jung/images/btn_memb3.gif",
		      "/immunology/jung/group.html", 
              "Group Members");

 
	
	barArray[3]= new BarClass(3,"publications",  
              "/immunology/jung/images/btn_pub1.gif",
		      "/immunology/jung/images/btn_pub2.gif",
		      "/immunology/jung/images/btn_pub3.gif", 		      
"/perl/wispub.mperl?submit=Submit&formname=search&author=Jung%20S&orderby=yr%20desc&disptype=type2&dir=/immunology/jung&exclude=22794&c_u2l=n",
              "Publications");
	
barArray[4]= new BarClass(4,"positions",  
              "/immunology/jung/images/btn_pos1.gif",
		      "/immunology/jung/images/btn_pos2.gif",
		      "/immunology/jung/images/btn_pos3.gif", 
		      "/perl/display_poscientist.mperl?scientist=409&indir=immunology/jung&outdir=jung", 
              "Positions");


barArray[5]= new BarClass(5,"links",  
              "/immunology/jung/images/btn_links1.gif",
		      "/immunology/jung/images/btn_links2.gif",
		      "/immunology/jung/images/btn_links3.gif", 
		      "/immunology/jung/links.html",
              "Links");

barArray[6]= new BarClass(6,"gallery",  
              "/immunology/jung/images/btn_gallery1.gif",
		      "/immunology/jung/images/btn_gallery2.gif",
		      "/immunology/jung/images/btn_gallery3.gif", 
		      "/immunology/jung/photos/photos.html",
              "Gallery");

barArray[7]= new BarClass(7,"home",  
              "/immunology/jung/images/btn_home1.gif",
		      "/immunology/jung/images/btn_home2.gif",
		      "/immunology/jung/images/btn_home3.gif", 
		      "/immunology/jung/",
              "Home");



barArray[8]= new BarClass(8,"members",  
              "/immunology/jung/images/btn_mbonly1.gif",
		      "/immunology/jung/images/btn_mbonly2.gif",
		      "/immunology/jung/images/btn_mbonly3.gif", 
		      "/immunology/jung/members/members.html",
              "Members Only");

}	


//-----------------------------------------------------------------
// function initNav(): Set the parameter numOfBars to total number of the Vertical bars (icon-images)
//-----------------------------------------------------------------
function initNav() { 
  var numOfBars= 8 ;
  var  topHtml='';
  var  botHtml=' ';

topHtml += '<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">' ;
topHtml += '<tr><td width="173" align="left" valign="top" >' ;  
topHtml += '<table width="173"  border="0" align="left" cellpadding="0" cellspacing="0">' ;


  

  botHtml +='</table></td>';
  botHtml += '<td width="100%" valign="top">';	 
  
 theNav= new NavClass(numOfBars, topHtml, botHtml);  //the parameter - number of the bars in the navagation bar 
  setBarArray();             //fill barAray with images          //fill barAray with images
}
 

function writeHeader() {
document.write('<table width="100%" height="157" border="0" cellpadding="0" cellspacing="0" background="/immunology/jung/images/bc_green.gif">');
document.write('<tr>');
document.write('<td width="173" height="153" rowspan="2" align="left" valign="top" bgcolor="ffffff"><a href="/immunology/jung/"><img src="/immunology/jung/images/t_or.jpg" width="173" height="153" border="0"></a></td>');
document.write('<td width="186" height="153" align="left" valign="top" rowspan="2" bgcolor="ffffff"><a href="/immunology/jung/"><img src="/immunology/jung/images/mouse2.jpg" width="186" height="153" border="0"></a></td>');
document.write('<td height="128" align="left" valign="top" width="263">');
document.write('<table width="263" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr>');
document.write('<td><a href="/immunology/jung/"><img src="/immunology/jung/images/title.gif" width="263" height="74" border="0"></a></td>');
document.write('</tr><tr>');
document.write('<td><a href="/immunology/"><img src="/immunology/jung/images/dept.gif" alt="immunology" width="263" height="54" border="0"></a></td>');
document.write('</tr>');
document.write('</table></td>');
document.write('<td width="100%" height="129"  align="right" valign="top"><a href="/"><img src="/immunology/jung/images/wis.gif" width="198" height="98" border="0"></a></td>');
document.write('</tr><tr>');   
document.write('<td height="29" valign="top" colspan="2" align="left" bgcolor="ffffff"><img src="/immunology/jung/images/tsen.gif" width="621" height="29"></td>');
document.write('</tr></table>');


}

function writeFooter() {

document.write('<hr width="100%">');
document.write('<table width="90%">');
document.write('<tr>');
document.write('<td width="70%" align="left">');
document.write('<font size="-1" color="#186D29">Comments and suggestions to ');
document.write('<a href="mailto:s.jung@weizmann.ac.il">Steffen Jung</a>');
document.write('</font>');
document.write('</td>');
document.write('<td align="right" width="30%"><font size="-1" color="#186D29">Last Updated: ');
document.write (document.lastModified);
document.write('</font></td></tr>');
document.write('</table>');
}

//Closes the table for the navigation bar
function closeAll() {
	document.write('</td></tr></table>'); 

  }	
