/*  
 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", 
                 "/condmat/superc/images/btn_home1.gif",  //default image file
	             "/condmat/superc/images/btn_home2.gif",  //image for mouseOn
                 "/condmat/superc/images/btn_home3.gif",  //image for selected category 
                 "/condmat/superc/",    //the link for bar#1
                 "Home");   //alt tag    
	
	
	barArray[2] = new BarClass(2,"research", 
                 "/condmat/superc/images/btn_res1.gif",  
	             "/condmat/superc/images/btn_res2.gif", 
                 "/condmat/superc/images/btn_res3.gif",  
                 "/condmat/superc/research.html",   
                 "Research projects");  
	
	
  barArray[3] = new BarClass(3,"people", 
                 "/condmat/superc/images/btn_people1.gif",  
	             "/condmat/superc/images/btn_people2.gif", 
                 "/condmat/superc/images/btn_people3.gif",  
                 "/condmat/superc/people.html",   
                 "People");   							  

barArray[4] = new BarClass(4,"facilities",  
              "/condmat/superc/images/btn_facl1.gif",   
		      "/condmat/superc/images/btn_facl2.gif",
              "/condmat/superc/images/btn_facl3.gif",
		      "/condmat/superc/facilities.html", 
              "Lab Facilities");

barArray[5]= new BarClass(5,"publications",  
              "/condmat/superc/images/btn_pub1.gif",
		      "/condmat/superc/images/btn_pub2.gif",
		      "/condmat/superc/images/btn_pub3.gif", 
		      "/condmat/superc/publications.html",
              "Publications");

	

barArray[6]= new BarClass(6,"talks",  
              "/condmat/superc/images/btn_talks1.gif",
		      "/condmat/superc/images/btn_talks2.gif",
		      "/condmat/superc/images/btn_talks3.gif", 
		      "/condmat/superc/talks.html",
              "Talks");

barArray[7]= new BarClass(7,"theses",  
              "/condmat/superc/images/btn_these1.gif",
		      "/condmat/superc/images/btn_these2.gif",
		      "/condmat/superc/images/btn_these3.gif", 
		      "/condmat/superc/theses.html",
              "Theses");

barArray[8]= new BarClass(8,"courses",  
              "/condmat/superc/images/btn_courses1.gif",
		      "/condmat/superc/images/btn_courses2.gif",
		      "/condmat/superc/images/btn_courses3.gif", 
		      "/condmat/superc/courses.html",
              "Courses");
	
	barArray[9]= new BarClass(9,"links",  
              "/condmat/superc/images/btn_links1.gif",
		      "/condmat/superc/images/btn_links2.gif",
		      "/condmat/superc/images/btn_links3.gif", 
		      "/condmat/superc/links.html",
              "Links");
	
	barArray[10]= new BarClass(10,"credits",  
              "/condmat/superc/images/btn_credits1.gif",
		      "/condmat/superc/images/btn_credits2.gif",
		      "/condmat/superc/images/btn_credits3.gif", 
		      "/condmat/superc/credits.html",
              "Credits");
	
	barArray[11]= new BarClass(11,"contact",  
              "/condmat/superc/images/btn_contact1.gif",
		      "/condmat/superc/images/btn_contact2.gif",
		      "/condmat/superc/images/btn_contact3.gif", 
		      "/condmat/superc/contact.html",
              "Contact Us");

								  
}	


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

topHtml += '<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">' ;
topHtml += '<tr><td width="202" align="left" valign="top"><table width="202" border="0" cellspacing="0" cellpadding="0">' ;
topHtml += '<tr><td width="202" align="left" valign="top"><img src="/condmat/superc/images/nav_top.jpg" width="202" height="118"></td>' ;
topHtml += '  </tr><tr><td><img src="/condmat/superc/images/spacer.gif" width="187" height="29"></td></tr>' ; 

 

  
 botHtml += '<tr><td align="left" valign="top"><img src="/condmat/superc/images/nav_bot.gif" width="187" height="19"></td></tr>' ;
  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%" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr background="/condmat/superc/images/bc_blue.jpg">');
document.write('<td width="187" height="136" align="left" valign="top" ><img src="/condmat/superc/images/top.jpg" width="187" height="136"></td>');
document.write('<td width="209" height="136" align="left" valign="top"><img src="/condmat/superc/images/t1.jpg" width="209" height="136"></td>');
document.write('<td width="409" height="136" align="left" valign="top" background="/condmat/superc/images/bc_blue.jpg"><a href="/condmat/"><img src="/condmat/superc/images/title.gif" width="409" height="136" border="0"></a></td>');
document.write(' <td width="100%" height="136" align="right" valign="top"  background="/condmat/superc/images/bc_blue.jpg"><a href="/"><img src="/condmat/superc/images/wis.gif" width="207" height="136" border="0"></a></td>');
document.write(' </tr><tr>');
document.write('  <td  width="100%" height="23" align="left" valign="top" colspan="4" ><img src="/condmat/superc/images/row2.jpg" width="225" height="23"></td>');

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

}

function writeFooter() {

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

//document.write('<tr><td >&nbsp;</td>');
//document.write('<td  valign = "bottom" align="center" ></td>');

document.write('<tr><td height="5">&nbsp;</td><td valign="bottom" height="5"><hr></td></tr>');
document.write('<tr><td>&nbsp;</td><td valign="top"><font size="-1">Comments and suggestions to <a href="mailto:Amit.Finkler@weizmann.ac.il" class="noline">Amit.Finkler@weizmann.ac.il</a><br>');
document.write(' Last Updated: ');
document.write(document.lastModified);
document.write('</font></td>');

}

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

  }	
   var imageNumber=Math.round(Math.random()*11);//change the number according to how many pictures
	function changepic(){
	//document.write("<a href='pages/" + imageNumber + ".shtml'>");
	document.write("<img src='pics/" + imageNumber + ".jpg' border='0' width='294' height='210'>");
	//document.write("</a>");
	}	
