sniffBrowsers();

//menuItemBullet = new bulletPoint("../../../css/images/menu_off.gif","../../../css/images/menu_off.gif");
//labelBullet = new bulletPoint("../../../css/images/header_off.gif","../../../css/images/header_on.gif");
//subMenuBullet = new bulletPoint("../../../css/images/sub_header_off.gif","../../../css/images/sub_header_on.gif");

/* for calculators in tools - starts here */
function checkCookie(){
		      var windowReference;
		    	windowReference = window.open('/sfs/SFS/global/jsp/Tools/Static/BC_CalculatorDisclaimer.html','BCcalculatorDisclaimer','status=no,resize=yes,toolbar=no,scrollbars=no,width=460,height=420');
        }
        function openwintools(url, width, height) {
          windowName  = "buttons";
          params      = "toolbar=0,";
          params     += "location=0,";
          params     += "directories=0,";
          params     += "status=0,";
          params     += "menubar=0,";
          params     += "scrollbars=0,";
          params     += "resizable=1,";

          params += "width="+width+",";
          params += "height="+height;
    		  winRef = window.open('',windowName,params);
		      if (!winRef.closed)
		        winRef.close();
          win = window.open(url, windowName, params);
          win.opener.name = "opener";
        }
       function openwintoolsscroll(url, width, height) {
          windowName  = "buttons";
          params      = "toolbar=0,";
          params     += "location=0,";
          params     += "directories=0,";
          params     += "status=0,";
          params     += "menubar=0,";
          params     += "scrollbars=yes,";
          params     += "resizable=1,";
          params += "width="+width+",";
          params += "height="+height;
    		  winRef = window.open('',windowName,params);
	        if (!winRef.closed)
		        winRef.close();
          win = window.open(url, windowName, params);
          win.opener.name = "opener";
        }

/* calculators for tools ends here */

var labelOutBor = '#FFFFFF';
var labelInBor = '#666666';
var labelOff = '#FFFFFF';
var labelOn = '#E0E0E0';

var itemOutBor = '#E0E0E0';
var itemInBor = '#E0E0E0';
var itemOff = '#E0E0E0';
var itemOn = '#E0E0E0';

//new menuBar(barName, barWidth, orientation, i_Bor, o_Bor, targetType) {
myTest = new menuBar('myTest',750, 'horizontal', labelInBor, labelOutBor, 'self');
myTest.height = 15;
//myTest.addLabel(labelText, menuNo, offColour, onColour, labelURL, align) 
myTest.addLabel('Home',1, labelOff, labelOn, '/polyshapes/en/Home/Home/home.html', 'center');
myTest.addLabel('Products', 2, labelOff, labelOn, '/polyshapes/en/Products/ProductLanding/products.html', 'center');
myTest.addLabel('Industries', 3, labelOff, labelOn, '/polyshapes/en/Industry/IndLanding/industries.html', 'center');
myTest.addLabel('Capabilities', 4, labelOff, labelOn, '/polyshapes/en/Capabilities/CapLanding/caplanding.html', 'center');
myTest.addLabel('Suppliers ', 5, labelOff, labelOn, '/polyshapes/PShapes/suppliers/suppliers.jsp', 'center');
myTest.addLabel('Locate A Branch', 6, labelOff, labelOn, '/polyshapes/PShapes/branchlocator/branchlocator.jsp', 'center');
myTest.addLabel('Tools', 7, labelOff, labelOn, '/polyshapes/PShapes/tools/static/tools.jsp', 'center');


//Home
//menu(index, orientation, i_Bor, o_Bor)
menus[1] = new menu(1, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[1].height = 14;
menus[1].writeMenu();

//Products
menus[2] = new menu(2, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[2].height = 14;
for(var i=0;i<ProductGroupCollection.size();i++){
menus[2].addItem(ProductGroupCollection[i].getName(), null, itemOff, itemOn, ProductGroupCollection[i].getLink(), 'left');
}
menus[2].addItem('Insulgard Security', null, itemOff, itemOn, '/polyshapes/en/Products/SecProductGroup/security.html', 'left');
menus[2].addItem('Skylight', null, itemOff, itemOn, '/polyshapes/en/Products/SkyProductGroup/skylight.html', 'left');
menus[2].writeMenu();

//Industries
menus[3] = new menu(3, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[3].height = 14;
for(var i=0;i<IndustryDetailCollection.size();i++){
menus[3].addItem(IndustryDetailCollection[i].getName(), null, itemOff, itemOn, IndustryDetailCollection[i].getLink(), 'left');
}
menus[3].writeMenu();

//Capabilities
menus[4] = new menu(4, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[4].height = 14;
menus[4].writeMenu();

//Suppliers
menus[5] = new menu(5, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[5].height = 14;
menus[5].writeMenu();

//Locate A Branch
menus[6] = new menu(6, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[6].height = 14;
menus[6].writeMenu();

//Tools
menus[7] = new menu(7, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[7].height = 14;
menus[7].writeMenu();


menus[1].align='left';
menus[2].align='left';
menus[3].align='left';
menus[4].align='left';
menus[5].align='left';
menus[6].align='left';
menus[7].align='left';


