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");



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, '/gep/'+lang+'/Home/Home/home.html', 'center');
myTest.addLabel(OurCompany, 2, labelOff, labelOn, '/gep/'+lang+'/AboutUs/AboutUs/about_us.html', 'center');
myTest.addLabel(News, 3, labelOff, labelOn, '/gep/'+lang+'/NewsRoom/NewsRoom/news_room.html', 'center');
myTest.addLabel(Suppliers, 4, labelOff, labelOn, '/gep/'+lang+'/Suppliers/Suppliers/suppliers.html', 'center');
myTest.addLabel(Careers, 5, labelOff, labelOn, '/gep/'+lang+'/UtilityAndLegal/Careers/careers.html', 'center');
myTest.addLabel(Datasheets, 6, labelOff, labelOn, '#', 'center');
myTest.addLabel(ProductsServices, 7, labelOff, labelOn, '/gep/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'center');
myTest.addLabel(IndustryApplications, 8, labelOff, labelOn, '/gep/'+lang+'/IndustryApplications/IndustryApplicationsLanding/industryapplications_landing.html', '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();

//Our Company
menus[2] = new menu(2, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[2].height = 14;
menus[2].writeMenu();

//News & Media Relations
menus[3] = new menu(3, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[3].height = 14;
menus[3].writeMenu();

//Suppliers
menus[4] = new menu(4, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[4].height = 14;
menus[4].writeMenu();

//Careers
menus[5] = new menu(5, null, 'horizontal', itemInBor, itemOutBor, 'self');
menus[5].height = 14;
menus[5].writeMenu();

//Datasheets
menus[6] = new menu(6, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[6].height = 14;
//addItem(itemText, menuNo, offColour, onColour, itemURL, align) 
menus[6].addItem(ResinsLNPCompounds, null, itemOff, itemOn, '/gepapp/eng/datasheetinter/dswinter', 'left');
menus[6].addItem(SpecialtyFilmandSheet, null, itemOff, itemOn, '/sfsapp/eng/datasheetinter/dswinter#searchresults', 'left');
menus[6].writeMenu();

//Products & Services
menus[7] = new menu(7, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[7].height = 14;
menus[7].addItem(ResinsLNPCompounds, null, itemOff, itemOn, '/gep/Plastics/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'left');
menus[7].addItem(SpecialtyFilmandSheet, null, itemOff, itemOn, '/sfs/SFS/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'left');
menus[7].addItem(ColorandAesthetics, null, itemOff, itemOn, '/cxp/', 'left');
menus[7].addItem(Polymershapes, null, itemOff, itemOn, 'http://www.sabicpolymershapes.com/polyshapes/'+lang+'/Products/ProductLanding/products.html', 'left');
menus[7].writeMenu();

//Industry Applications
menus[8] = new menu(8, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[8].height = 14;
for(var z=0; z<FeaturedIndustryCollection.size(); z++){
  var industryName = FeaturedIndustryCollection[z].getName();
  var substr = industryName.substr(industryName.lastIndexOf(' '))
  if(industryName.length > 20 ){
    industryName = industryName.replace(substr, '<br>'+substr);
  }
menus[8].addItem(FeaturedIndustryCollection[z].getName(), null, itemOff, itemOn, FeaturedIndustryCollection[z].getLink(), 'left');
}
menus[8].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';
menus[8].align='left';




