//-----------------------------------------------------------------
//-----------------------------------------------------------------
// THIS FILE NavTextSets.js 
// reefers to Classes:	NavTextClass- the whole navigation menu ,  
//											TextBarClass - text-bar menu items 
//										  CollapsBarClass - global collapsing menu items
// global variables: mxd_bars array - which accumulates the whole bar array and others (e/g images, (application)css class name 
//										 and refered to by NavTextClass class
//          method: collapsMenu()- switches collpas-menu-id value of instance of CollapsBarClass
// does:
// 1. Sets the global parameters for the specific applications navigation menu
// 2. initTextNav()- create theNav instances of the NavTextClass class which referees to global array mxd_bars[] 
// 								- Set the class parameter values (numOfBars, the top & bot  html. etc) of the instance theNav
// 								- Set setMxdBarArray - to create this applications - instance items of the navigation menu
// 3. setMxdBarArray
//    create this applications - instance items of the classes: TextBarClass and CollapsBarClass  for the navigation menu
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// Global parameters for specific application settings
//-----------------------------------------------------------------
var is_heb = 1 ;
var plus_image = '<img src="/images/plusEng.gif" border=0 class="navImage"> ';  // '&nbsp;+ ';   // ;
var minus_image = '<img src="/images/minusEng.gif" border=0 class="navImage"> ' ;  // '&nbsp;-- '; //
var item_ptr_image = '<img src="/images/itemsEng.gif" border=0 class="navImage"> ' ; //'&nbsp;|- ';
var vertline_image = '<img src="/images/vertline.gif" border=0 class="navImage">' ; //'&nbsp;| ';
var menu_css = "menuLink";  
var menu_cur_css = "menuLinkCurrent";
var colap_css = "menuCollapse";
var colap_cur_css = "menuCollapseCurrent";
var colap_thecur_css = "menuTheCollapseCurrent";
var current_collapse_barname = ""; 
// optional: in future add ref_css as part of the class bars (text and col laps) for individual bar css setting
// var txt_bar_css = "put here css predefined class name";
// var colap_bar_css = "put here css predefined class name";
// if highlighting of current bar-menu (the page in) is not by href-css then use on_flag or 1.define global var inPageBar, 2.set to nicname here, 3.compare at displaTextBar method

//-----------------------------------------------------------------
// global-method: initTextNav - 
// - create theNav instances of the NavTextClass c;lass 
// - Set the class parameter values :
// numOfBars to total number of the bars when all pluses are closed 
// the top & bot  html/table/settings of the application pages 
// - call setMxdBarArray - to create this applications - instance items of the navagation menu
//-----------------------------------------------------------------
function initTextNav() { 
  var numOfBars= 9 ;
  var  topHtml='';
  topHtml += '<td background="/images/vertNavBg.gif" width="238" valign="top">';
topHtml += '&nbsp;<img src="images/DentsimLogo.jpg"><p>';
topHtml += '<table width="238" cellpadding="0" cellspacing="0" border="0" class="navTable">';
//topHtml += '<tr><td><font color="#fffef9" size="4">DentSim</font><p></td></tr>';
  
  
  var  botHtml=' ';
	if (is_heb == 1){
			//topHtml += '<div align="right" dir="rtl">' ;
	}
	//topHtml += '<table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">' ;
	//topHtml += '<tr>  <td width="250" valign="top" >' ;  
	//topHtml += '<div class="nav">';
	//topHtml += '<table width="250" border="0" cellpadding="0" cellspacing="0">' ;
	//topHtml += '<div class="leftnav">'
	  
	//botHtml += '</div>'
	//botHtml += '</table>';
	//botHtml += '</div>';
	//botHtml += '</td><td width="100%" valign="top">';	 
	if (is_heb == 1){			botHtml += '</div>' ; 	}
	 
	theNav= new NavTextClass(numOfBars, topHtml, botHtml);  //the parameter - number of the bars in the navagation bar 
	setMxdBarArray();             //fill barAray with images          //fill barAray with images
}
 
//-----------------------------------------------------------------
// Global Method - function setMxdBarArray()
//    create this applications - instance items of the navagation menu
//    creates bar instances with correc settings for each bar
//-----------------------------------------------------------------
function setMxdBarArray()	
{	
	// Menu Bar: 	1											(  bar_num, name, bar_type,   the_name,            ref_file )
  mxd_bars[1] = new TextBarClass( 1, "overview", "text", "Overview", "overview.html" ) ;

  // Menu Bar:  2	Collapse Bar class type set values for:( bar_num, name, bar_type, the_name, num_incolp_bars, open_flag )
  //mxd_bars[2] = new TextBarClass( 2, "ULS", "text", "Israel Union List of Serials -ULS", "http://libnet1.ac.il/~libnet/uls/uls.html");
mxd_bars[2] = new CollapsBarClass( 2, "product","collapse" ,"Product Information", 5, "menu5");
mxd_bars[2].incolp_bars = new Array(5);  // number of text-bars (0 to 5) in this collapse bar
 // set vals of text-bar-ary which is array of text bars: (  bar_num, name, bar_type,  the_name,   ref_file )
 mxd_bars[2].incolp_bars[0] =  new TextBarClass(0,"specs", "text","Specifications",  "/DentSim/specs.html"); 
 mxd_bars[2].incolp_bars[1] =  new TextBarClass(1,"technology", "text","Technology","/DentSim/technology.html"); 
 mxd_bars[2].incolp_bars[2] =  new TextBarClass(2,"workflow", "text","Workflow",   "/DentSim/workflow.html"); 
 mxd_bars[2].incolp_bars[3] =  new TextBarClass(3,"applications", "text","Applications","/DentSim/applications.html"); 
 mxd_bars[2].incolp_bars[4] =  new TextBarClass(4,"pbenefits", "text","Benefits","/DentSim/benefits.html"); 
 //mxd_bars[2].incolp_bars[5] =  new TextBarClass(5,"devohim", "text","דיווח נוכחות באינטרנט","https://meyda.hilan.co.il//weizmann.asp");// "דיווח נוכחות באינטרנט"
  mxd_bars[2].setIncolapVal();  
  
  // Menu Bar:  3
  mxd_bars[3] = new TextBarClass(3,"achievements","text", "Achievements",  "achievements.html");     		

  // Menu Bar:  4
  mxd_bars[4] = new TextBarClass(4,"customers","text", "Schools with Dentsim",  "schools.html");     		

  // Menu Bar: 5
  mxd_bars[5] = new TextBarClass(5,"publications","text", "Publications",  "publications.html");  

  // Menu Bar: 6    						( bar_num, name, bar_type, the_name,  num_incolp_bars )
  mxd_bars[6] = new TextBarClass(6, "media", "text", "Media", "media.html");

// 
// // Menu Bar: 8
mxd_bars[7] = new TextBarClass(7,"support","text", "Support",  "/support/customer.html");    
mxd_bars[8] = new TextBarClass(8,"brochure","text", "Brochure",  "DentsimBrochure.pdf");  
mxd_bars[9] = new TextBarClass(9,"downloads","text", "Downloads",  "downloads.html");     			


}	
/* shlomit added for the refreshing 14.05.08
  if (self.name.indexOf('_refreshed_') == -1) {
  self.name += '_refreshed_';
  self.location.reload(true)
  }
else {
  self.name = self.name.substring(0, self.name.indexOf('_refreshed_'));
  }
*/
function writeDentsimRotate(){
document.write('</table><div id="navRotate">');
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 238, 193, 0, 10000, 1, "R")
document.write('</div></td>');	
}



