/*  

 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,"home", 

                 "/sb/faculty_pages/Sagi/images/btn_home1.gif",  //default image file

	             "/sb/faculty_pages/Sagi/images/btn_home2.gif",  //image for mouseOn

                 "/sb/faculty_pages/Sagi/images/btn_home3.gif",  //image for selected category 

                 "/sb/faculty_pages/Sagi/home.html",    //the link for bar#1

                 "Home");   //alt tag    

							  

barArray[2]= new BarClass(2,"members",  

              "/sb/faculty_pages/Sagi/images/btn_gr1.gif",

		      "/sb/faculty_pages/Sagi/images/btn_gr2.gif",

		      "/sb/faculty_pages/Sagi/images/btn_gr3.gif", 

		      "/sb/faculty_pages/Sagi/members.html",

              "Group Members");



barArray[3] = new BarClass(3,"publications",  

              "/sb/faculty_pages/Sagi/images/btn_pub1.gif",   

		      "/sb/faculty_pages/Sagi/images/btn_pub2.gif",

              "/sb/faculty_pages/Sagi/images/btn_pub3.gif",

		      "/sb/faculty_pages/Sagi/publications.html", 

              "Publications");



barArray[4]= new BarClass(4,"Research highlights",  

              "/sb/faculty_pages/Sagi/images/btn_res1.gif",

		      "/sb/faculty_pages/Sagi/images/btn_res2.gif",

		      "/sb/faculty_pages/Sagi/images/btn_res3.gif", 

		      "/sb/faculty_pages/Sagi/highlights.html",

              "Research Highlights");





barArray[5]= new BarClass(5,"groupseminars",  

              "/sb/faculty_pages/Sagi/images/btn_memb1.gif",

		      "/sb/faculty_pages/Sagi/images/btn_memb2.gif",

		      "/sb/faculty_pages/Sagi/images/btn_memb1.gif", 

		      "/sb/faculty_pages/Sagi/groupseminars.html",

              "Group Seminars")



	

	

	

}	





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

// function initNav(): Set the parameter numOfBars to total number of the Vertical bars (icon-images)

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

function initNav() { 

  var numOfBars= 5 ;

  var  topHtml='';

  var  botHtml=' ';



topHtml += '<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">' ;

topHtml += '<tr><td width="160" height="100%" align="left" valign="top">' ;  

topHtml += '<img src="/sb/faculty_pages/Sagi/images/nav_top.gif" width="160 height="36"></td><tr><td align="left" valign="top">' ;  

topHtml += '<table width="160" 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 navigation bar 

  setBarArray();             //fill barAray with images          //fill barAray with images

}

 



function writeHeader() {

document.write('<table width="100%"  border="0" cellspacing="0" cellpadding="0">');

document.write('<tr background="/sb/faculty_pages/Sagi/images/bc_tb.gif">');

document.write('<td width="221" height="90" align="left" valign="top"><img src="/sb/faculty_pages/Sagi/images/lg_t.jpg" width="221" height="90"></td>');

document.write('<td width="335" height="90" align="left" valign="top" background="/sb/faculty_pages/Sagi/images/bc_tb.gif">');

document.write('<a href="/sb/faculty_pages/Sagi/"><img src="/sb/faculty_pages/Sagi/images/title.gif" alt="Irit Sagi\'s Lab" width="335" height="90" border="0"></a></td>');

document.write('<td width="100%" background="/sb/faculty_pages/Sagi/images/bc_tb.gif">&nbsp;</td>');

document.write('<td align="right" valign="top"><a href="/"><img src="/sb/faculty_pages/Sagi/images/wis.jpg" width="288" height="90" border="0"></a></td>');

document.write('</tr><tr>');

document.write('<td width="246" height="18" align="left" valign="top" colspan="4"><a href="/Biological_Regulation/"><img src="/sb/faculty_pages/Sagi/images/dpt.gif" alt="Dept. of Structural Biology" width="246" height="18" border="0"></a></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">Department of Biological Regulation, Weizmann Institute of Science<br>');

document.write('Rehovot 76100, Israel, Tel: (972)-8934-2130, Fax: (972)-8934-4116, E-mail: <a href="mailto:irit.sagi@weizmann.ac.il">irit.sagi@weizmann.ac.il</a><br>');

document.write('Comments and suggestions to ');

document.write('<a href="mailto:moran.grossman@weizmann.ac.il">moran.grossman@weizmann.ac.il</a>');

document.write('</font>');

document.write('</td>');

document.write('<td align="right" width="25%"><font size="-1" color="184812">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>'); 


  }	

  var imageNumber=Math.round(Math.random()*7); //changes the number according to how many pictures

	function changepic(){

	//document.write("<a href='pages/" + imageNumber + ".shtml'>");

	document.write("<img src='/MCB/images/pics/" + imageNumber + ".jpg' border='0' width='147' height='154'>");

	//document.write("</a>");

	}	
