


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");

//code changed by Sheetal to display the geam menu in news archive and press archive pages
if ((location.pathname=="/gepapp/Plastics/global/jsp/search/news_archive.jsp")|(location.pathname=="/gepapp/Plastics/global/jsp/search/press_archive.jsp"))
{
document.writeln('<SCRIPT language=JavaScript src="/gep/es/global/script/menu_GEAM_Home.js"> </SCRIPT>');
}
else
{
var m=300;
var m1=300;
var n=400;
var n1=400;
var resinscount=0;
var lnpcount=0;
var l=350;
var labelOutBor = '#FFFFFF';
var labelInBor = '#adafaf';


var labelOff = '#FFFFFF';
var labelOn = '#FFFFFF';



var itemOutBor = '#adafaf';
var itemInBor = '#FFFFFF';
var itemOff = '#FFFFFF';
var itemOn = '#FFFFFF';

 
function glossary()
 {
  window.open("/gepapp/controller?letterSelected=A",'Glossary',"resizable=1,width=600,height=550"); 
 }

//new menuBar(barName, barWidth, orientation, i_Bor, o_Bor, targetType) {
myTest = new menuBar('myTest',950, 'horizontal', labelInBor, labelOutBor, 'self');
myTest.height = 15;
//myTest.addLabel(labelText, menuNo, offColour, onColour, labelURL, align) 
myTest.addLabel('P&#225;gina de inicio',1, labelOff, labelOn, '/gep/Plastics/'+lang+'/Home/Home/home.html', 'center');
myTest.addLabel('Hojas de datos', 2, labelOff, labelOn, '/gepapp/eng/datasheetinter/dswinter', 'center');
myTest.addLabel('Procesamiento', 3, labelOff, labelOn, '/gep/Plastics/'+lang+'/ProductsAndServices/ProcessLanding/processlanding.html', 'center');
myTest.addLabel('Aplicaciones en la Industria', 4, labelOff, labelOn, '/gep/Plastics/'+lang+'/IndustryApplications/IndustryApplications/industry_applications.html', 'center');
myTest.addLabel('Ingenier&#237;a de datos y herramientas', 5, labelOff, labelOn, '/gep/Plastics/'+lang+'/Tools/Tools/tools.html','center');
myTest.addLabel('Literatura', 6, labelOff, labelOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp', 'center');
myTest.addLabel('Productos y servicios', 7, labelOff, labelOn, '/gep/Plastics/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'center');
myTest.addLabel('Construir mi aplicacai&#243;n', 8, labelOff, labelOn, '/gepapp/Plastics/global/jsp/IdesTools/buildmyapp.jsp', 'center');

//Home
//menu(index, menuWidth, orientation, i_Bor, o_Bor)
menus[1] = new menu(1, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[1].height = 14;
menus[1].writeMenu();

//Datasheets
menus[2] = new menu(2, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[2].height = 14;
menus[2].addItem('', null, itemOff, itemOn, '', 'self');
var patt1=/&#70;&#111;&#97;&#109;/g;
for(k=0;k<resinProducts.length;k++){
if(resinProducts[k].match(patt1)==null)
{

menus[2].addItem('Resinas '+resinProducts[k]+'*', m, itemOff, itemOn, resinProductsLink[k], 'left');

}
else //it is a foam

{

temp= resinProducts[k];
    	
       templength=resinProducts[k].length;
      	len=temp.indexOf("&#32");
        firstpart=temp.substr(0,len);
     
        secondpart="* Foam";
        temp=firstpart.concat(secondpart);
     
        menus[2].addItem(temp,m, itemOff, itemOn, resinProductsLink[k], 'left');

}
m++;
}
resinscount=m;
foamcount=l;

for(j=0;j<lnpProducts.length;j++){
lnpProducts[j]=lnpProducts[j].replace(/LNP/,"LNP*");	
//alert(lnpProducts[j]);
menus[2].addItem('Compuestos '+lnpProducts[j]+'*', n, itemOff, itemOn, lnpProductsLink[j], 'left');
n++;
}
lnpcount=n;
//alert(lnpcount);
menus[2].addItem('', null, itemOff, itemOn, '', 'self');
menus[2].writeMenu();

//Processing
menus[3] = new menu(3, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[3].height = 14;
menus[3].addItem('', null, itemOff, itemOn, '', 'self');
for(k=0;k<ProcessCollection.size();k++){
menus[3].addItem(ProcessCollection[k].getTitle(), null, itemOff, itemOn, ProcessCollection[k].getLink(), 'left');
}
menus[3].addItem('Decoraci&#243;n en molduras [IMD]', null, itemOff, itemOn, '/gep/Plastics/'+lang+'/ProductsAndServices/IMDHome/in_mold_decoration.html', 'left');
menus[3].addItem('', null, itemOff, itemOn, '', 'self');
menus[3].writeMenu();

//Industry Applications
menus[4] = new menu(4, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[4].height = 14;
menus[4].addItem('', null, itemOff, itemOn, '', 'self');
for(var z=0; z<FeaturedIndustryCollection.size(); z++){
menus[4].addItem(FeaturedIndustryCollection[z].getName(), null, itemOff, itemOn, FeaturedIndustryCollection[z].getLink(), 'left');
}
menus[4].addItem('', null, itemOff, itemOn, '', 'self');
menus[4].writeMenu();

//Engineering Data & Tools
menus[5] = new menu(5, null, 'vertical', itemInBor, itemOutBor, 'new');
menus[5].height = 14;
menus[5].addItem('', null, itemOff, itemOn, '', 'self');
menus[5].addItem('Datos', null, itemOff, itemOn, null, 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resistencia Qu&#237;mica', null, itemOff, itemOn, '/gepapp/eng/ccwinter/ccwinter', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ingenier&#237;a multifas&#233;tica', null, itemOff, itemOn, '/gepapp/eng/eddinter/edd', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hojas t&#233;cnicas de SABIC Innovative Plastics', null, itemOff, itemOn, '/gepapp/eng/datasheetinter/dswinter', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hojas t&#233;cnicas de proveedores externos', null, itemOff, itemOn, 'http://catalog.ides.com/MfrIndex.aspx?I=60955', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selector de materiales de proveedores externos', null, itemOff, itemOn, 'http://catalog.ides.com/PropertySearch.aspx?I=60955&PROPSET=Quick%2', 'left');

menus[5].addItem('', null, itemOff, itemOn, null, 'left');
menus[5].addItem('Herramientas', null, itemOff, itemOn, null, 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Automotriz - Dise&#241;o', null, itemOff, itemOn, '/gepapp/eng/automotive_tools.jsp', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Automotriz - Buscador de especificaciones', null, itemOff, itemOn, '/gepapp/eng/autospecinter/autospec', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Automotriz - Aprobaci&#243;n de colores de OEM\s', null, itemOff, itemOn, '/gepapp/eng/acsinter/acs', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Herramientas de ingenier&#237;a', 9, itemOff, itemOn, '/webtools/', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selecci&#243;n de Material', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/IdesTools/ideslanding.jsp', 'left');
menus[5].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construir mi aplicacai&#243;n', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/IdesTools/buildmyapp.jsp', 'left');

menus[5].height = 18;
menus[5].addItem('Seminarios', null, itemOff, itemOn, '/gep/'+lang+'/NewsRoom/Seminars/seminars.html', 'left');
menus[5].addItem('Glosario', null, itemOff, itemOn, '/gepapp/controller?letterSelected=A', 'left');
//menus[5].addItem('Web Seminars', null, itemOff, itemOn, '/gepapp/placeware/servlet/CalBuilder', 'left');
menus[5].addItem('', null, itemOff, itemOn, '', 'self');
menus[5].writeMenu();

//Literature
menus[6] = new menu(6, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[6].height = 14;
menus[6].addItem('', null, itemOff, itemOn, '', 'self');
menus[6].addItem('Casos de Estudio', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Case%20Study', 'left');
menus[6].addItem('Gu&#237;a de Dise&#241;o', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Design%20Guide', 'left');
menus[6].addItem('Cat&#225;logo de la Industria', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Industry%20Brochure', 'left');
menus[6].addItem('Cat&#225;logos de Marketing', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=%20Marketing%20Brochure', 'left');
menus[6].addItem('Gu&#237;a de Propiedades del Material', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=%20Material%20Properties%20Guide', 'left');
menus[6].addItem('Bolet&#237;n de noticias', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Newsletter', 'left');
menus[6].addItem('Gu&#237;a de Procesamiento', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Processing%20Guide', 'left');
menus[6].addItem('Cat&#225;logo de Producto', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Product%20Brochure', 'left');
menus[6].addItem('Hoja de caracter&#237;sticas del producto', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Product%20Feature%20Sheet', 'left');
menus[6].addItem('Gu&#237;a de Producto', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Product%20Guide', 'left');
menus[6].addItem('Gu&#237;a de selecci&#243;n de productos', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=%20Product%20Selection%20Guide', 'left');
menus[6].addItem('Gu&#237;a de Operaciones Secundarias', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=%20Secondary%20Operations%20Guide', 'left');
menus[6].addItem('Hoja T&#233;cnica', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/Literature/LiteratureAndTools.jsp?product=All&industryApplication=All&solutionArea=Resins&literatureType=Technical%20Paper', 'left');
menus[6].addItem('', null, itemOff, itemOn, '', 'self');
menus[6].writeMenu();

//Products & Services
menus[7] = new menu(7, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[7].height = 14;
menus[7].addItem('', null, itemOff, itemOn, '', 'self');
menus[7].addItem('Resinas y Compuestos LNP',210, itemOff, itemOn, '/gep/Plastics/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'left');
menus[7].addItem('Pel&#237;culas y laminados especiales', null, itemOff, itemOn, '/sfs/SFS/'+lang+'/ProductsAndServices/ProductsAndServices/products_and_services.html', 'left');
menus[7].addItem('Color y est&#233;tica', null, itemOff, itemOn, '/cxp/', 'left');
menus[7].addItem('Polymershapes', null, itemOff, itemOn, 'http://www.sabicpolymershapes.com/polyshapes/en/Home/Home/home.html', 'left','_new');
menus[7].addItem('', null, itemOff, itemOn, '', 'self');
menus[7].writeMenu();

//Build My Application
menus[8] = new menu(8, 175, 'vertical', itemInBor, itemOutBor, 'self');
menus[8].height = 14;
menus[8].addItem('', null, itemOff, itemOn, '', 'self');
menus[8].addItem('Develop an Application', null, itemOff, itemOn, '/gepapp/Plastics/global/jsp/IdesTools/buildmyapp.jsp', 'left');
menus[8].addItem('', null, itemOff, itemOn, '', 'self');
menus[8].writeMenu();


//Engineering Tools Submenu

menus[9] = new menu(9, null, 'vertical', itemInBor, itemOutBor, 'new');
menus[9].height = 12;
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensamble - postes', null, itemOff, itemOn, '/webtools/redirect?tool=bosscalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensamble - dise&#241;o de snap fit', null, itemOff, itemOn, '/webtools/redirect?tool=snapfit', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensamble - dise&#241;o limite de enrosacamiento', null, itemOff, itemOn, '/webtools/redirect?tool=threadfailure', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Predicci&#243;n de fatiga', null, itemOff, itemOn, '/webtools/redirect?tool=fatigueCalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transferencia de calor - partes largas', null, itemOff, itemOn, '/webtools/redirect?tool=therm', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transferencia de calor - mini partes', null, itemOff, itemOn, '/webtools/redirect?tool=minitherm', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rigidez - Viga', null, itemOff, itemOn, '/webtools/redirect?tool=beamcalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rigidez - Flujo cruzado', null, itemOff, itemOn, '/webtools/redirect?tool=crossflow', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rigidez - placa', null, itemOff, itemOn, '/webtools/redirect?tool=stiffnesscalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Expansi&#243;n T&#233;rmica', null, itemOff, itemOn, '/webtools/redirect?tool=thremalstress', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Predicci&#243;n de raz&#243;n de cizallamiento', null, itemOff, itemOn, '/webtools/redirect?tool=shearrate', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Predicci&#243;n de la longitud del flujo', null, itemOff, itemOn, '/webtools/redirect?tool=flowcalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculadora de peso de la pieza', null, itemOff, itemOn, '/webtools/redirect?tool=weightcalc', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculadora de herramientas', null, itemOff, itemOn, '/webtools/redirect?tool=toolingvolume', 'left');
menus[9].addItem('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sistema de Estimaci&#243;n de Costos', null, itemOff, itemOn, '/webtools/redirect?tool=costEstimator', 'left');
menus[9].writeMenu();

//Prod Serv Resins
menus[210] = new menu(210, null, 'vertical', itemInBor, itemOutBor, 'self');
menus[210].height = 12;
for(k=0;k<resinProducts.length;k++){

if(resinProducts[k].match(patt1)==null)
{

menus[210].addItem('Resinas '+resinProducts[k]+'*', null, itemOff, itemOn, resinProductsLink[k], 'left');
}
else //it is a foam

{
//alert("inside if not a foam");
temp= resinProducts[k];
    	//alert("resinsproducts[k] is "+resinProducts[k]);
       templength=resinProducts[k].length;
      	len=temp.indexOf("&#32");
        firstpart=temp.substr(0,len);
         //alert("firstpart is "+firstpart);
        secondpart="* Foam";
        temp=firstpart.concat(secondpart);
        //alert("temp is "+temp);
     
        menus[210].addItem(temp, null, itemOff, itemOn, resinProductsLink[k], 'left');



}
}
for(k=0;k<lnpProducts.length;k++){

menus[210].addItem('Compuestos '+lnpProducts[k]+'*', null, itemOff, itemOn, lnpProductsLink[k], 'left');
}
menus[210].height = 20;
menus[210].addItem('Tipos de pol&#237;meros', null, itemOff, itemOn, '/gep/Plastics/'+lang+'/ProductsAndServices/PolymerTypes/polymer_types.html', 'left');
menus[210].writeMenu();


//products series and family and line for datasheets

for(i=0;i<resinProducts.length;i++){
    var productname=resinProducts[i];
    //alert(productname);
    var productIndex=parseInt(product_lines[productname],10);
	  menus[m1] = new menu(m1, null, 'vertical', itemInBor, itemOutBor, 'self');
    menus[m1].height = 12;
    for(j=0;j<product_lines[productIndex]["family_n"].length;j++){	    	     
	       familyname = product_lines[productIndex]["family_n"][j];
	       familylink = product_lines[productIndex]["family_l"][j];
	       menus[m1].addItem(familyname, null, itemOff, itemOn,familylink, 'left');
    }
    for(k=0;k<product_lines[productIndex]["series_n"].length;k++){
          seriesname = product_lines[productIndex]["series_n"][k];
	        serieslink = product_lines[productIndex]["series_l"][k];
	        // alert(name);	        
          menus[m1].addItem(seriesname, null, itemOff, itemOn,serieslink, 'left');
    }
    var allproductlink="/gepapp/Plastics/servlet/ProductsAndServices/Product/series?sltPrdline="+productname+"&search=Search";
     if(productname.match(patt1)==null)
    {
    var allproductname="Todos los datos para Resinas "+productname+"*";
    }
    else
     {
     allproductname="Todos los datos para Ultem* Foam"
     }
    
    menus[m1].addItem(allproductname, null, itemOff, itemOn,allproductlink, 'left');
    menus[m1].writeMenu();
   m1++;
}

for(i=0;i<lnpProducts.length;i++){
    
    var productname=lnpProducts[i].replace('*','');	
    var productIndex=parseInt(product_lines[productname],10);
//    alert(productIndex);
	  menus[n1] = new menu(n1, null, 'vertical', itemInBor, itemOutBor, 'self');
    menus[n1].height = 12;

    for(j=0;j<product_lines[productIndex]["family_n"].length;j++){	    	     
	       familyname = product_lines[productIndex]["family_n"][j];
	       familylink = product_lines[productIndex]["family_l"][j];
         menus[n1].addItem(familyname, null, itemOff, itemOn,familylink, 'left');
    }
    for(k=0;k<product_lines[productIndex]["series_n"].length;k++){
          seriesname = product_lines[productIndex]["series_n"][k];
	        serieslink = product_lines[productIndex]["series_l"][k];
	        // alert(name);	        
          menus[n1].addItem(seriesname, null, itemOff, itemOn,serieslink, 'left');
    }
   
   
    var allproductlink="/gepapp/Plastics/servlet/ProductsAndServices/Product/series?sltPrdline="+productname+"&search=Search";
    var allproductname="Todos los datos para Compuestos "+productname+"*";
    menus[n1].addItem(allproductname, null, itemOff, itemOn,allproductlink, 'left');
    menus[n1].writeMenu();
    n1++;
}

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='right';

menus[210].align='left';

for(count=300;count<resinscount;count++){
  menus[count].align='right';
}

for(count=350;count<foamcount;count++){
//alert(" inside aligning foam menu");
  menus[count].align='right';

}

for(count=400;count<lnpcount;count++){
  menus[count].align='right';
}


}



