/* Syntaxes:
 *
 * menu[menuNumber][0] = new Menu('menu ID', left, top, width, 'mouseover colour',
 *'background colour', 'border colour');
 * Left and Top are measured on-the-fly relative to the top-left corner of its trigger.
 *
 * menu[menuNumber][itemNumber] = new Item('Text', 'URL', vertical spacing to next item, 
 *target menu number);
 * If no target menu (popout) is desired, set it to 0. All menus must trace back their
 * targets to the root menu! That is, every menu must be targeted by one item somewhere.
 * Even if you're not writing the root menu, you must still specify its settings here.
 */
var scr_w = screen.availWidth;
var browseWidth;
var s;
if (document.layers){
   browseWidth=window.outerWidth;
}
if (document.all){
   browseWidth=document.body.clientWidth;
}
s = (browseWidth - 770) / 4;
var menu = new Array();
var url_base = ""
// Default colours passed to most menu constructors (just passed to functions, not
// a global variable - makes things easier to change later).
var defOver = '#9AABC6', defBack = '#FFFFFF', defBorder = '#000000';
// Default height of menu items - the spacing to the next item, actually.
var defHeight = 18;
var subHeight = 16;
// Menu 0 is the special, 'root' menu from which everything else arises.
menu[0] = new Array();
// Pass a few different colours, as an example.
menu[0][0] = new Menu('rootMenu', 0, 90, 0, '', '', defBorder);
// Notice how the targets are all set to nonzero values...
menu[0][1] = new Item('menu_products', 'labspecs.html', defHeight, 1);
//menu[0][2] = new Item('menu_safety', 'labspecs3.html', defHeight, 2);
menu[0][2] = new Item('menu_msds', '', defHeight, 3);
menu[0][3] = new Item('menu_faqs', 'faq.html', defHeight, 4);
menu[0][4] = new Item('menu_contact', 'contact.asp', defHeight, 5);




menu[1] = new Array();
// The File menu is positioned 0px across and 22 down from its trigger, and is 80 wide.
menu[1][0] = new Menu('menu_products', 10, 23, 220, defOver, defBack, defBorder);
menu[1][1] = new Item('Warum CBG Biotech?', 'whycbg.html', defHeight, 0);
menu[1][2] = new Item('Laborgeräte', 'labequip.html', defHeight, 0);
menu[1][3] = new Item('Laborspezifikationen', 'labspecs.html', defHeight, 0);
menu[1][4] = new Item('Formular 83', 'f83.html', defHeight, 0);
menu[1][5] = new Item('Sicherheit &amp; Zertifikate', 'safety.html', defHeight, 0);
menu[1][6] = new Item('30 Tage-Test', '30day.asp', defHeight, 0);
menu[1][7] = new Item('Kosteneinsparbericht', 'savings.asp', defHeight, 0);
menu[1][8] = new Item('günstige Zahlungsbedingungen', 'payment.html', defHeight, 0);
menu[1][9] = new Item('Service &amp; Garantie', 'service.html', defHeight, 0);
menu[1][10] = new Item('Abfallminimierung', 'waste.html', defHeight, 0);
menu[1][11] = new Item('Vorteile des Recycling', 'benefits.html', defHeight, 0);
menu[1][12] = new Item('Geschichte von CBG', 'cbg.html', defHeight, 0);
// Non-zero target means this will trigger a popup.

menu[2] = new Array();
menu[2][0] = new Menu('menu_safety', 10, 23, 148, defOver, defBack, defBorder);
menu[2][1] = new Item('Why CBG Biotech?', 'whycbg3.html', defHeight, 0);
menu[2][2] = new Item('Laboratory Equipment', 'labequip3.html', defHeight, 0);
menu[2][3] = new Item('Lab Equipment Specs', 'labspecs3.html', defHeight, 0);
menu[2][4] = new Item('Safety &amp; Certification', 'safety3.html',defHeight, 0);
menu[2][5] = new Item('Frequent Questions', 'faq3.html', defHeight, 0);

menu[3] = new Array();
menu[3][0] = new Menu('menu_msds', 10, 23, 200, defOver, defBack, defBorder);
menu[3][1] = new Item('Antifoam 29', 'msds/MSDS-Antifoam29071007.pdf', defHeight, 0);
menu[3][2] = new Item('Assay-pH-Indikator', 'msds/MSDS-Assay-pH-Indicator071007.pdf', defHeight, 0);
menu[3][3] = new Item('Gepuffertes Zinkkonzentrat', 'msds/MSDS-BufferedZincConcentrate071007.pdf', defHeight, 0);
menu[3][4] = new Item('E-Z Clean', 'msds/MSDS-E-ZClean082207.pdf', defHeight, 0);
menu[3][5] = new Item('Forma-Clean', 'msds/MSDS-Forma-Clean071007.pdf', defHeight, 0);
menu[3][6] = new Item('Forma-Neut 1A', 'msds/MSDS-Forma-Neut1A071007.pdf', defHeight, 0);
menu[3][7] = new Item('Formula 83', 'msds/MSDS-Formula83071007.pdf', defHeight, 0);
menu[3][8] = new Item('Formula 83 - Französisch', 'msds/MSDS-Formula83-French071007.pdf', defHeight, 0);
menu[3][9] = new Item('Formula 83 - Deutsch', 'msds/MSDS-Formula83-German071007.pdf', defHeight, 0);
//menu[3][10] = new Item('Formula 83 - International', 'msds/MSDS-Formula83(International)100804.pdf', defHeight, 0);
menu[3][10] = new Item('Phosphat Pufferkonzentrat', 'msds/MSDS-PhosphateBufferConcentrate071007.pdf', defHeight, 0);
menu[3][11] = new Item('Phosphat Puffersalze  ', 'msds/MSDS-PhosphateBufferSalts071007.pdf', defHeight, 0);
menu[3][12] = new Item('Reagenz #1 - Verdünnungsbasis', 'msds/MSDS-Reagent1DiluteBase071007.pdf', defHeight, 0);
menu[3][13] = new Item('Reagenz #2 - Adductor Lösung ', 'msds/MSDS-Reagent2AdductorSolution071007.pdf', defHeight, 0);
menu[3][14] = new Item('Reagenz #3 - Verdünnungssäure', 'msds/MSDS-Reagent3DiluteAcid071007.pdf', defHeight, 0);
 
//menu[3][1] = new Item('Customization', 'safety.asp#customization', defHeight, 0);
//menu[3][2] = new Item('Safety Plus', 'safety.asp#safety_plus', defHeight, 0);
//menu[3][3] = new Item('Construction', 'safety.asp#construction', defHeight, 0);


menu[4] = new Array();
menu[4][0] = new Menu('menu_faqs', 10, 23, 180, defOver, defBack, defBorder);
//menu[4][1] = new Item('General faq', 'faq.html', defHeight, 0);
//menu[4][2] = new Item('International faq', 'faq3.html', defHeight, 0);

menu[5] = new Array();
menu[5][0] = new Menu('menu_contact', 10, 23, 230, defOver, defBack, defBorder);
menu[5][1] = new Item('Rufen Sie uns an, faxen Sie oder mailen Sie uns', 'contact.asp', defHeight, 0);
menu[5][2] = new Item('Kosteneinsparbericht gratis', 'savings.asp', defHeight, 0);
menu[5][3] = new Item('30 Tage-Test ohne Kosten!', '30day.asp', defHeight, 0);
menu[5][4] = new Item('Gratis Formular 83 Muster!', 'f83trial.asp', defHeight, 0);


menu[7] = new Array();
menu[7][0] = new Menu('menu_none', 10, 23, 140, defOver, defBack, defBorder);
menu[7][1] = new Item('Contact Us', 'contact.asp', defHeight, 0);

menu[6] = new Array();
// This is across but not down... a horizontal popout (with crazy colours :)...
menu[6][0] = new Menu('sub_products', 10,23, 170, defOver, '#EEEEEE', defBorder);
menu[6][1] = new Item('Why Recycle, or Concentrate?','products_recyclers.asp#why_recycle',subHeight,0);
menu[6][2] = new Item('Principles of Operation','products_recyclers.asp#principles_of_operation',subHeight,0);
menu[6][3] = new Item('General Features','products_equipment.asp#general_features',subHeight,0);
menu[6][4] = new Item('Purities & Recoveries','products_recyclers.asp#purities_and_recoveries',subHeight,0);
menu[6][5] = new Item('Solvents That Can Be Recycled','products_recyclers.asp#solvents',subHeight,0);
menu[6][6] = new Item('Contaminants That Are Removed','products_recyclers.asp#Example_of_Contaminants',subHeight,0);
menu[6][7] = new Item('<b>Equipment</b>','products_equipment.asp',subHeight,6);
menu[6][8] = new Item('Bench Top Models','products_benchtop.asp',subHeight,0);
menu[6][9] = new Item('Portable (Cart-Mounted) Models','products_portable.asp',subHeight,0);
menu[6][10] = new Item('Stationary Models','products_stationary.asp',subHeight,0);

menu[8] = new Array();
// This is across but not down... a horizontal popout (with crazy colours :)...
menu[8][0] = new Menu('sub_solvent', 190, 0, 140, defOver, '#EEEEEE', defBorder);
menu[8][1] = new Item('Advantages/Samples','products_solvents.asp',subHeight,0);
menu[8][2] = new Item('MSDS Sheets','products_solvents.asp',subHeight,0);


menu[9] = new Array();
// This is across but not down... a horizontal popout (with crazy colours :)...
menu[9][0] = new Menu('sub_equipment', 170, 0, 140, defOver, '#EEEEEE', defBorder);
menu[9][1] = new Item('Equipment Overview','products_equipment.asp#equipment_overview',subHeight,0);
menu[9][2] = new Item('General Features','products_equipment.asp#general_features',subHeight,0);
menu[9][3] = new Item('Applications & Equipment','products_equipment.asp#types',subHeight,0);
menu[9][4] = new Item('Standard Model Specifications','products_equipment.asp#specifications',subHeight,0);
menu[9][5] = new Item('Examples of Standard Models','products_equipment.asp#specifications',subHeight,0);
menu[9][6] = new Item('Bench Top Models','products_benchtop.asp',subHeight,0);
menu[9][7] = new Item('Portable (Cart-Mounted)','products_portable.asp',subHeight,0);
menu[9][8] = new Item('Stationary Models','products_stationary.asp',subHeight,0);



// Now, this next bit of script will write our own custom root menu -- a horizontal
// one, as the defaults are all vertical with borders. Even if you are writing your
// own root menu, you must still specify the names, colours and targets above -- the
// positions are calculated on the fly and hence are ignored.
// Basically, you must duplicate the output of the writeMenus() function. Just work
// from this example.
// Syntax: startDL('id', x, y, width, height, 'visibility', '#background colour or null
//for transparent', '#border colour or null for no border', 'additional properties');
// It returns a string of HTML text comprising the opening tag of a div or layer.
// mouseProps(menu, item) returns the 'onMouseEvent' properties for a specific menu item,
// passed as 'additional properties' to startDL. Just cut and paste below, or allow the
// script to write its own root menu.
// endDL is a variable containing either '</div>' or '</layer>', so add it afterwards.

//newRoot = startDL('rootMenu', 0, 54, '100%', 36, 'hidden', '', null, 100, '');
//newRoot += startDL('rootMenu1', 0, 54, 98, 17, 'inherit', '', null, 100, mouseProps(0, 1));
//newRoot += '<span class="Item"><a href="'+url_base+'services_main.asp" onmouseover="chg_button(\'services\',\'on\');" onmouseout="chg_button(\'services\',\'off\');"><img name="services" border="0" src="images/button_services_off.gif" width="98" height="23"></a></span>' + endDL;
//newRoot += startDL('rootMenu2', 98, 54, 146, 36, 'inherit', '', null, 100, mouseProps(0, 2));
//newRoot += '<span class="Item"><a href="'+url_base+'company_ourcompany.asp" onmouseover="chg_button(\'company\',\'on\');" onmouseout="chg_button(\'company\',\'off\');"><img name="company" border="0" src="images/button_company_off.gif" width="146" height="23"></a></span>' + endDL;
//newRoot += startDL('rootMenu3', 244, 54, 164, 36, 'inherit', '', null, 100, mouseProps(0, 3));
//newRoot += '<span class="Item"><a href="'+url_base+'schedule_depo.asp" onmouseover="chg_button(\'schedule\',\'on\');" onmouseout="chg_button(\'schedule\',\'off\');"><img name="schedule" border="0" src="images/button_schedule_off.gif" width="164" height="23"></a></span>' + endDL;
//newRoot += startDL('rootMenu4', 408, 54, 120, 36, 'inherit', '', null, 100, mouseProps(0, 4));
//newRoot += '<span class="Item"><a href="'+url_base+'contact.asp" onmouseover="chg_button(\'contact\',\'on\');" onmouseout="chg_button(\'contact\',\'off\');"><img name="contact" border="0" src="images/button_contact_off.jpg" width="120" height="23"></a></span>' + endDL;
//newRoot += startDL('rootMenu5', 528, 54, 102, 36, 'inherit', '', null, 100, mouseProps(0, 5));
//newRoot += '<span class="Item"><a href="'+url_base+'whatis_main.asp" onmouseover="chg_button(\'whatis\',\'on\');" onmouseout="chg_button(\'whatis\',\'off\');"><img name="whatis" border="0" src="images/button_whatis_off.gif" width="102" height="23"></a></span>' + endDL;
//newRoot += startDL('rootMenu6', 630, 54, 120, 36, 'inherit', '', null, 100, mouseProps(0, 6));
//newRoot += '<span class="Item"><a href="'+url_base+'howdoi_tips.asp" onmouseover="chg_button(\'howdoi\',\'on\');" onmouseout="chg_button(\'howdoi\',\'off\');"><img name="howdoi" border="0" src="images/button_howdoi_off.gif" width="120" height="23"></a></span>' + endDL;
//newRoot += endDL;



newRoot = '<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%"><tr><td width="66">';
newRoot += startDL('rootMenu',0, 0, '100%', 36, 'hidden', '', null, 100, '');
newRoot += startDL('rootMenu1', 0, 98, 175, 17, 'inherit', '', null, 100, mouseProps(0, 1));
newRoot += '<span class="Item"><a href="labspecs.html" onmouseover="chg_button(\'products\',\'on\');" onmouseout="chg_button(\'products\',\'off\');"><img name="products" border="0" src="images/button_products_off.gif" width="160" height="32"></a></span>' + endDL + '</td><td width=' + s + '>&nbsp;</td><td width="160">';
//newRoot += startDL('rootMenu2', 142+s, 98, 175, 17, 'inherit', '', null, 100, mouseProps(0, 2));
//newRoot += '<span class="Item"><a href="labspecs3.html" onmouseover="chg_button(\'international\',\'on\');" onmouseout="chg_button(\'international\',\'off\');"><img name="international" border="0" src="images/button_international_off.gif" width="175" height="32"></a></span>' + endDL + '</td><td width=' + s + '>&nbsp;</td><td width="80">';
newRoot += startDL('rootMenu2', 105+s, 98, 80, 17, 'inherit', '', null, 100, mouseProps(0, 2));
newRoot += '<span class="Item"><a href="" onmouseover="chg_button(\'msds\',\'on\');" onmouseout="chg_button(\'msds\',\'off\');"><img name="msds" border="0" src="images/button_msds_off.gif" width="160" height="32"></a></span>' + endDL + '</td><td width=' + s + '>&nbsp;</td><td width="160">';
newRoot += startDL('rootMenu3', 200+2*s, 98, 44, 17, 'inherit', '', null, 100, mouseProps(0, 3));
newRoot += '<span class="Item"><a href="faq.html" onmouseover="chg_button(\'faqs\',\'on\');" onmouseout="chg_button(\'faqs\',\'off\');"><img name="faqs" border="0" src="images/button_faqs_off.gif" width="160" height="32"></a></span>' + endDL + '</td><td width=' + s + '>&nbsp;</td><td width="160">';
newRoot += startDL('rootMenu4', 275+3*s, 98, 59, 17, 'inherit', '', null, 100, mouseProps(0, 4));
newRoot += '<span class="Item"><a href="contact.asp" onmouseover="chg_button(\'contact\',\'on\');" onmouseout="chg_button(\'contact\',\'off\');"><img name="contact" border="0" src="images/button_contact_off.gif" width="160" height="32"></a></span>' + endDL + '</td></tr></table>';





// Pass this two strings - the first is HTML to write a custom root menu, or null to
// generate one normally. The second is the popout indicator HTML - try an image...?
// Try writeMenus(null, '<img src="...">'); in your own script.
writeMenus(newRoot, '<font color="#000000">&gt;&gt;</font>');
// This is a quick snippet that captures all clicks on the document and hides the menus
// every time you click. Use if you want.
if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = clickHandle;
function clickHandle(evt) {
if (isNS4) document.routeEvent(evt);
hideAllBut(0);
}
// Show root menu command - place in an onLoad="..." type function if you want.
eval(docObj + menu[0][0].id + styObj + '.visibility = "visible"');
// This is just the moving command for the example.
function moveRoot() {
rM = eval(docObj + menu[0][0].id + styObj);
if (parseInt(rM.top) < 40) rM.top = 40;
else rM.top = 0;
}
