/*  
 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,"rationale", 
                 "/FESP/images/btn_rationale1.jpg",  //default image file
	             "/FESP/images/btn_rationale2.jpg",  //image for mouseOn
                 "/FESP/images/btn_rationale3.jpg",  //image for selected category 
                 "/FESP/rationale.html",    //the link for bar#1
                 "Rationale");   //alt tag    
							  
 barArray[2] = new BarClass(2,"participants",  
              "/FESP/images/btn_particip1.jpg",   
		      "/FESP/images/btn_particip2.jpg",
              "/FESP/images/btn_particip3.jpg",
		      "/FESP/participants.html", 
              "Participants");

 barArray[3]= new BarClass(3,"quest",  
              "/FESP/images/btn_quest1.jpg",
		      "/FESP/images/btn_quest2.jpg",
		      "/FESP/images/btn_quest3.jpg", 
		      "/FESP/questionnaires.html",
              "Questionnaires");

	 barArray[4]= new BarClass(4,"meeting",  
              "/FESP/images/btn_meeting1.jpg",
		      "/FESP/images/btn_meeting2.jpg",
		      "/FESP/images/btn_meeting3.jpg", 
		      "/FESP/meeting.html",
              "Meetings");
	
	 barArray[5]= new BarClass(5,"reports",  
              "/FESP/images/btn_report1.jpg",
		      "/FESP/images/btn_report2.jpg",
		      "/FESP/images/btn_report3.jpg", 
		      "/FESP/report.html",
              "Reports");
	 
	 barArray[6]= new BarClass(6,"home",  
              "/FESP/images/btn_home1.jpg",
		      "/FESP/images/btn_home2.jpg",
		      "/FESP/images/btn_home3.jpg", 
		      "/FESP/",
              "Home");
}	


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

topHtml += '<table width="100%"  border="0" cellspacing="0" cellpadding="0" height="87%">' ;
topHtml += '<tr><td width="151" valign="top" align="left" bgcolor="#AEB79A"><table width="151"  border="0" cellpadding="0" cellspacing="0" bgcolor="#AEB79A">' ;  
topHtml += '<tr><td valign="top" align="left" height="46"><img src="/FESP/images/nav_top.jpg" width="151" height="46"></td></tr>' ;
 

  
  botHtml += '<tr><td width="151" height="38" valign="top"><img src="/FESP/images/nav_bot1.jpg" width="151" height="38"></td></tr>' ;
     botHtml += '<tr><td width="151" height="124" bgcolor="#AEB79A"><img src="/FESP/images/nav_bot2.jpg" width="151" height="124"></td></tr></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="98" border="0" cellpadding="0" cellspacing="0"><tr>'); 
document.write('<td width="151" height="98" align="left" valign="top" rowspan="2"><img src="/FESP/images/fesp_top.gif" alt="FESP" width="151" height="98"></td>');
document.write('<td width="270" height="32" align="left" valign="top" background="/FESP/images/bc_topgreen.gif"><img src="/FESP/images/top_2.jpg" width="105" height="32"><img src="/FESP/images/reinb_pas.jpg" width="165" height="24" align="top"></td>');
document.write('<td height="32" valign="top" background="/FESP/images/bc_topgreen.gif">&nbsp;</td>'); 
document.write('<td align="right" height="32" valign="top" background="/FESP/images/bc_topgreen.gif"><img src="images/r_top.gif" width="137" height="32"></td>');
document.write('</tr><tr>');
document.write('<td align="left" valign="top" colspan="2"><img src="/FESP/images/title_.gif" width="462" height="43"></td>');
document.write('<td width="171" height="66" align="right" valign="top"><img src="/FESP/images/r_2row.jpg" width="176" height="66"></td>');
document.write('</tr></table>');


}

function writeFooter() {


document.write('<font color="#F9FBF3" size="-2">Comments and Suggestions:</font> <a href="mailto:FESP@weizmann.ac.il"><font color="#F9FBF3" size="-2">FESP@weizmann.ac.il</font></a>');
document.write('<br>');
document.write('<font color="#F9FBF3" size="-2">Last Updated: </font>');
document.write('<font color="#F9FBF3" size="-2">');
document.write (document.lastModified);
document.write('</font>');

 
}

//Closes the table for teh navigation bar
function closeAll() {
	document.write('</td></tr>');      
      document.write('<tr><td bgcolor="#0D501A" colspan="2" height="1%" valign="bottom">');
	 writeFooter();	  
	 	document.write('</td></tr></table>');

  }
