﻿var navi_01 = "show-menu=company";
var navi_02 = "show-menu=products";
var navi_03 = "show-menu=production";
var navi_04 = "show-menu=services";
var navi_05 = "show-menu=worldwide";

if (select_navi == "01") { 
 navi_image01 = "<img src=\"/images/spacer.gif\" width=\"110\" height=\"36\" border=\"0\" name=\"menu_01_on\">";
 navi_01 = "#";
}
else
 navi_image01 = "<img src=\"/images/spacer.gif\" width=\"110\" height=\"36\" border=\"0\" name=\"menu_01\">";
if (select_navi == "02"){
 navi_image02 = "<img src=\"/images/spacer.gif\" width=\"104\" height=\"36\" border=\"0\" name=\"menu_02_on\">";
 navi_02 = "#";
} 
else
 navi_image02 = "<img src=\"/images/spacer.gif\" width=\"104\" height=\"36\" border=\"0\" name=\"menu_02\">"; 
if (select_navi == "03"){
 navi_image03 = "<img src=\"/images/spacer.gif\" width=\"124\" height=\"36\" border=\"0\" name=\"menu_03_on\">";
 navi_03 = "#";
} 
else
 navi_image03 = "<img src=\"/images/spacer.gif\" width=\"124\" height=\"36\" border=\"0\" name=\"menu_03\">"; 
if (select_navi == "04"){
 navi_image04 = "<img src=\"/images/spacer.gif\" width=\"102\" height=\"36\" border=\"0\" name=\"menu_04_on\">";
 navi_04 = "#";
}
else
 navi_image04 = "<img src=\"/images/spacer.gif\" width=\"102\" height=\"36\" border=\"0\" name=\"menu_04\">"; 
if (select_navi == "05"){
 navi_image05 = "<img src=\"/images/spacer.gif\" width=\"123\" height=\"36\" border=\"0\" name=\"menu_05_on\">";
 navi_05 = "#";
}
else
 navi_image05 = "<img src=\"/images/spacer.gif\" width=\"123\" height=\"36\" border=\"0\" name=\"menu_05\">"; 

function changeImage() { 
 if (select_navi == "01")
  document.menu_01_on.src = "/images/menu_01_on.gif";  
 else
  document.menu_01.src = "/images/menu_01.gif";
 if (select_navi == "02")
  document.menu_02_on.src = "/images/menu_02_on.gif";
 else
  document.menu_02.src = "/images/menu_02.gif";
 if (select_navi == "03")
  document.menu_03_on.src = "/images/menu_03_on.gif";
 else
  document.menu_03.src = "/images/menu_03.gif";
 if (select_navi == "04")
  document.menu_04_on.src = "/images/menu_04_on.gif";
 else
  document.menu_04.src = "/images/menu_04.gif";
 if (select_navi == "05")
  document.menu_05_on.src = "/images/menu_05_on.gif";
 else
  document.menu_05.src = "/images/menu_05.gif";    
}

function preloadImage(imgName,imgSrc) {
 eval(imgName+' = new Image()');
 eval(imgName+'.src = "'+imgSrc+'"');
 return imgName;
}

//Preloading images
preloadImage('pr_menu_01',      '/images/menu_01.gif');
preloadImage('pr_menu_01_on',   '/images/menu_01_on.gif');
preloadImage('pr_menu_02',      '/images/menu_02.gif');
preloadImage('pr_menu_02_on',   '/images/menu_02_on.gif');
preloadImage('pr_menu_03',      '/images/menu_03.gif');
preloadImage('pr_menu_03_on',   '/images/menu_03_on.gif');
preloadImage('pr_menu_04',      '/images/menu_04.gif');
preloadImage('pr_menu_04_on',   '/images/menu_04_on.gif');
preloadImage('pr_menu_05',      '/images/menu_05.gif');
preloadImage('pr_menu_05_on',   '/images/menu_05_on.gif');
preloadImage('spacer',          '/images/spacer.gif');
preloadImage('line_top',        '/images/line_top.gif');
preloadImage('line_bg',         '/images/line_bg.gif');
preloadImage('line_bg_on',      '/images/line_bg_on.gif');
preloadImage('line_bottom',     '/images/line_bottom.gif');

//The following line is critical for menu operation, and MUST APPEAR ONLY ONCE. If you have more than one menu_array.js file rem out this line in subsequent files
menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<scr"+"ipt language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/scr"+"ipt>";_d.write(mt);}
////////////////////////////////////
// Editable properties START here //
////////////////////////////////////
// Special effect string for IE5.5 or above
effect = "fade(overlap=1.00, duration=0.5)"
timegap=500   // The time delay for menus to remain visible
followspeed=5  // Follow Scrolling speed
followrate=40  // Follow Scrolling Rate
suboffset_top=4; // Sub menu offset Top position 
suboffset_left=6; // Sub menu offset Left position
closeOnClick = true
style1=[   // style1 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
"000000",   // Mouse Off Font Color
"",     // Mouse Off Background Color
"FFFFFF",   // Mouse On Font Color
"",     // Mouse On Background Color
"",     // Menu Border Color 
10,     // Font Size in pixels
"normal",   // Font Style (italic or normal)
"normal",   // Font Weight (bold or normal)
"Verdana, Arial", // Font Name
0,     // Menu Item Padding
,     // Sub Menu Image (Leave this blank if not needed)
,     // 3D Border & Separator bar
"",     // 3D High Color
"",     // 3D Low Color
"",     // Current Page Item Font Color (leave this blank to disable)
"",     // Current Page Item Background Color (leave this blank to disable)
"",     // Top Bar image (Leave this blank to disable)
"",   // Menu Header Font Color (Leave blank if headers are not needed)
"",   // Menu Header Background Color (Leave blank if headers are not needed)
"",     // Menu Item Separator Color
]
style2=[   // 
"",     // Mouse Off Font Color
"",     // Mouse Off Background Color
"",     // Mouse On Font Color
"",     // Mouse On Background Color
"",     // Menu Border Color 
16,     // Font Size in pixels
"normal",   // Font Style (italic or normal)
"normal",   // Font Weight (bold or normal)
"Arial, Verdana", // Font Name
0,     // Menu Item Padding
"",     // Sub Menu Image (Leave this blank if not needed)
"",     // 3D Border & Separator bar
"",     // 3D High Color
"",     // 3D Low Color
"",     // Current Page Item Font Color (leave this blank to disable)
"",     // Current Page Item Background Color (leave this blank to disable)
"",     // Top Bar image (Leave this blank to disable)
"ffffff",   // Menu Header Font Color (Leave blank if headers are not needed)
"ffffff",   // Menu Header Background Color (Leave blank if headers are not needed)
"",     // Menu Item Separator Color
]
addmenu(menu=[  // This is the array that contains your menu properties and details
"mainmenu",   // Menu Name - This is needed in order for the menu to be called
9,     // Menu Top - The Top position of the menu in pixels
252,     // Menu Left - The Left position of the menu in pixels
,     // Menu Width - Menus width in pixels
0,     // Menu Border Width 
,     // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
style2,    // Properties Array - this is set higher up, as above
1,     // Always Visible - allows the menu item to be visible at all time (1=on/0=off)
"left",    // Alignment - sets the menu elements text alignment, values valid here are: left, right or center
,     // Filter - Text variable for setting transitional effects on menu activation - see above for more info
,     // Follow Scrolling - Tells the menu item to follow the user down the screen (visible at all times) (1=on/0=off)
1,      // Horizontal Menu - Tells the menu to become horizontal instead of top to bottom style (1=on/0=off)
,     // Keep Alive - Keeps the menu visible until the user moves over another menu or clicks elsewhere on the page (1=on/0=off)
,     // Position of TOP sub image left:center:right
,     // Set the Overall Width of Horizontal Menu to 100% and height to the specified amount (Leave blank to disable)
,     // Right To Left - Used in Hebrew for example. (1=on/0=off)
,     // Open the Menus OnClick - leave blank for OnMouseover (1=on/0=off)
,     // ID of the div you want to hide on MouseOver (useful for hiding form elements)
,     // Background image for menu when BGColor set to transparent.
,     // Scrollable Menu
,     // Reserved for future use
,navi_image01,navi_01,,"",0 // "Description Text", "URL", "Alternate URL", "Status", "Separator Bar"
,navi_image02,navi_02,,"",0
,navi_image03,navi_03,,"",0
,navi_image04,navi_04,,"",0
,navi_image05,navi_05,,"",0
])

 addmenu(menu=["company",
 45,253,152,0,"",style1,,"left",effect,,,,,,,,,,,,
 ,"<img src=/images/line_top.gif width=152 height=7>","# type:header;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>History",          "/english/b_12.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Mission, Vision",    "/english/b_60.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Quality Management","/english/b_63.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>REACH","/english/b_355.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Map Guide Company",  "/english/b_66.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/line_bottom.gif width=152 height=5>","# type:header;",,,0
 ])
 
addmenu(menu=["products",
 45,363,152,0,"",style1,,"left",effect,,,,,,,,,,,,
 ,"<img src=/images/line_top.gif width=152 height=7>","# type:header;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Saw Steel",         "/english/b_69.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Precision Strip Steel","/english/b_72.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Paper &amp; Printing",    "/english/b_75.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/line_bottom.gif width=152 height=5>","# type:header;",,,0
 ])
 
 addmenu(menu=["production",
 45,467,152,0,"",style1,,"left",effect,,,,,,,,,,,,
 ,"<img src=/images/line_top.gif width=152 height=7>","# type:header;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Production/Technology","/english/b_78.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Research &amp; Development", "/english/b_81.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Quality Control", "/english/b_84.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0
 ,"<img src=/images/line_bottom.gif width=152 height=5>","# type:header;",,,0
 ])

 addmenu(menu=["services",
 45,591,152,0,"",style1,,"left",effect,,,,,,,,,,,,
 ,"<img src=/images/line_top.gif width=152 height=7>","# type:header;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Contact",  "/english/b_153.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>News",     "/english/b_46.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Downloads","/english/b_90.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Fairs",    "/english/b_53.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Links",    "/english/b_96.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/line_bottom.gif width=152 height=5>","# type:header;",,,0
 ])
 
 addmenu(menu=["worldwide",
 45,693,152,0,"",style1,,"left",effect,,,,,,,,,,,,
 ,"<img src=/images/line_top.gif width=152 height=7>","# type:header;",,,0
 ,"<img src=/images/spacer.gif width=6 height=16 border=0 align=absmiddle>Contacts &amp; Partners",   "/english/b_150.php backimage=/images/line_bg.gif;overbackimage=/images/line_bg_on.gif;",,,0 
 ,"<img src=/images/line_bottom.gif width=152 height=5>","# type:header;",,,0
 ])

dumpmenus()
function add2Lnavi(navElement,naviText,naviLink)
{
 this.page = navElement;
 this.disp = naviText;
 this.lnk = naviLink;
}

var navi2level = new Array();
var ii = 1;
var jj = 0;
// create new 2. level array
for (var i = 2; i < 7; i++) {
 navi2level[ii] = new Array();
 jj = 0; 
 
 for (var j = 27; menus[i][j+5]; j=j+5){  
  navi2level[ii][jj] = new add2Lnavi(menus[i][j].substring(menus[i][j].indexOf('>')+1,menus[i][j].length),menus[i][j].substring(menus[i][j].indexOf('>')+1,menus[i][j].length),menus[i][j+1].substring(0,menus[i][j+1].indexOf(" backimage=")));
  jj++;
 }
 ii++;
}