IE = (document.getElementById)
NS = (navigator.appName=="Netscape" && navigator.appVersion >= "4")

// ÆùÆ®Å°±â¿Í »öÀ» Á¤ÇÑ´Ù.
YOffset=20;
NSYOffset=7;
XOffset="9";
NSXOffset=1;
staticMode="advanced";
staticYOffset=20;
linkAlign="center";
linkSize="-1";
linkFont="Arial";
linkColor="black";
linkBGColor="white";
linkHColor="black";
linkHBGColor="#FFFF99";
hdrAlign="center";
hdrSize="3";
hdrFont="Arial";
hdrColor="black";
hdrBGColor="#0099FF";
menuIsStatic="yes";
menuWidth=120;
menuBGColor="black";
subWidth=200;
subBGColor="black";
baseTarget="";

subMenus = new Array();
items = new Array();
sub = -1;
names = -1;
lastY = 0;

function showNav(obj, e, which){
if (window.hiding){clearTimeout(hiding)}
if (IE) {
obj.style.pixelLeft=document.body.scrollLeft+event.clientX-event.offsetX+menuWidth-6
obj.style.pixelTop=document.body.scrollTop+event.clientY-event.offsetY-3
if (obj.style.pixelTop+obj.offsetHeight>document.body.scrollTop+document.body.clientHeight) {
obj.style.pixelTop=document.body.scrollTop+document.body.clientHeight-obj.offsetHeight}
obj.style.visibility="visible"
for (xyz=0; xyz<which; xyz++) document.all(subMenus[xyz]).style.visibility="hidden"
for (xyz=which+1; xyz<subMenus.length; xyz++) document.all(subMenus[xyz]).style.visibility="hidden"}
if (NS) {
obj.left=e.pageX-e.layerX+menuWidth-4
obj.top=e.pageY-e.layerY-1
if (obj.top+obj.document.height>window.pageYOffset+window.innerHeight) {
obj.top=window.pageYOffset+window.innerHeight-obj.document.height}
obj.visibility="show";
for (xyz=0; xyz<which; xyz++) document.layers[subMenus[xyz]].visibility="hide"
for (xyz=which+1; xyz<subMenus.length; xyz++) document.layers[subMenus[xyz]].visibility="hide"}}
function showNav2(obj){
if (window.hiding){clearTimeout(hiding)}
if (IE) {obj.style.visibility="visible"}
if (NS) {obj.visibility="show"}}
function hideNav() {
hiding = setTimeout('hideNav2();')}
function hideNav2() {
if (IE) {for (xyz=0; xyz<subMenus.length; xyz++) document.all(subMenus[xyz]).style.visibility="hidden"}
if (NS) {for (xyz=0; xyz<subMenus.length; xyz++) document.layers[subMenus[xyz]].visibility="hide"}}

function navMenuClick(e) {
if (this.target&&this.target=="_blank"){
window.open(this.link)}
else if (this.target&&this.target=="_top"){
top.location=this.link}
else if (this.target){
top.frames[this.target].location=this.link}
else {location = this.link;}}

function makeMenuStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=document.all.navMenu.style}
if (NS) {winY = window.pageYOffset;var NM=document.navMenu}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;}
setTimeout('makeMenuStatic("smooth")', 1)}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset}
if (NS) {NM.top=winY+staticYOffset}}
else {
if (IE) {NM.pixelTop=YOffset}
if (NS) {NM.top=YOffset-NSYOffset}}
setTimeout('makeMenuStatic("advanced")', 1)}}

function startMenu(header){
if (IE){id='<DIV ID="navMenu" STYLE="position:absolute;z-index:199;width:1px;left:'+XOffset+';top:'+YOffset+';">'}
else {id=""}
if (header>''){head=header}
else {head='Menu'}
document.write('<LAYER NAME="navMenu" left="'+(XOffset-NSXOffset)+'" top="'+(YOffset-NSYOffset)+'" VISIBILITY="hidden">'+id+'<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR="'+menuBGColor+'"><TR><TD><TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH="'+menuWidth+'"><TR><TD BGCOLOR="'+hdrBGColor+'" ALIGN="'+hdrAlign+'"><FONT SIZE="'+hdrSize+'" FACE="'+hdrFont+'" COLOR="'+hdrColor+'"><B>'+head+'</TD></TR><TR><TD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH="100%">')
cursub="navMenu"}

function addHdr(text) {
if (!text&&IE){height="2";t000=hdrBGColor;hdrBGColor=menuBGColor;}
else {height="0"}
document.write('</TABLE></TD></TR><TR><TD BGCOLOR="'+hdrBGColor+'" ALIGN="'+hdrAlign+'" WIDTH="100%" HEIGHT="'+height+'"><FONT SIZE="'+hdrSize+'" FACE="'+hdrFont+'" COLOR="'+hdrColor+'"><B>'+text+'</TD></TR><TR><TD><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%">')
if (height=="2"){hdrBGColor=t000}}

function addItem(text, link, target, subName) {
names++;
if (subName&&cursub=="navMenu") {sub++; show="showNav(sub"+subName+", event, "+sub+")"; hide="hideNav()"; subMenus[sub]="sub"+subName}
else {show="";hide="";subName=names;}
if (!target){target=baseTarget}
if (cursub=="navMenu"){subName="main"+subName}
else {subName="s"+names}
if (IE){
document.write('<TR><TD id="'+subName+'c" BGCOLOR="'+linkBGColor+'" onmouseover="'+subName+'a.style.color=\''+linkHColor+'\';bgColor=\''+linkHBGColor+'\';'+show+'" onmouseout="'+subName+'a.style.color=\''+linkColor+'\';bgColor=\''+linkBGColor+'\';'+hide+'"><P ALIGN="'+linkAlign+'"><FONT SIZE="'+linkSize+'" FACE="'+linkFont+'" COLOR="'+linkColor+'"><DIV ID="'+subName+'a" STYLE="position:relative;width:100%;color:'+linkColor+';cursor:default" ALIGN="'+linkAlign+'">'+text+'</DIV></TD></TR>')}
if (NS){
temph=cursub+'.document.'+subName+'a.document.'+subName+'d'
document.write('<TR><TD BGCOLOR="'+linkBGColor+'"><ILAYER NAME="'+subName+'a"><LAYER NAME="'+subName+'c" WIDTH="100%" onmouseover="'+temph+'.zIndex=\'19\';'+show+'" onmouseout="'+temph+'.zIndex=\'17\';'+hide+'" Z-INDEX="20"></LAYER><LAYER NAME="'+subName+'d" WIDTH="100%" Z-INDEX="17" BGCOLOR="'+linkHBGColor+'"><P ALIGN="'+linkAlign+'"><FONT SIZE="'+linkSize+'" FACE="'+linkFont+'" COLOR="'+linkHColor+'">'+text+'</LAYER><LAYER NAME="'+subName+'b" WIDTH="100%" Z-INDEX="18" BGCOLOR="'+linkBGColor+'"><P ALIGN="'+linkAlign+'"><FONT SIZE="'+linkSize+'" FACE="'+linkFont+'" COLOR="'+linkColor+'">'+text+'</LAYER></ILAYER></TD></TR>')}
if (IE){temp=document.all(subName+"c")
if (target) {temp.target=target} temp.link=link;temp.onclick=navMenuClick}
if (NS){temp=document.layers[cursub].document.layers[subName+"a"].document.layers[subName+"c"]
if (target) {temp.target=target} temp.link=link;temp.captureEvents(Event.MOUSEUP);temp.onmouseup=navMenuClick
items[names]=subName;}}

function endMenu() {
document.write('</TABLE></TD></TR></TABLE></TD></TR></TABLE></LAYER>')
if (IE){document.write('</DIV>')}
if (menuIsStatic == "yes") {makeMenuStatic(staticMode);}
if (NS){
for (i=0; i<items.length; i++){
document.layers["navMenu"].document.layers[items[i]+"a"].document.layers[items[i]+"c"].clip.bottom=document.layers["navMenu"].document.layers[items[i]+"a"].document.layers[items[i]+"b"].document.height}
names=-1}}

function startSubMenu(subName, width) {
if (!width){width=subWidth}
if (IE){id='ID="sub'+subName+'" STYLE="Position:absolute;Z-Index:200;visibility:hidden;width:1px;" onmouseover="showNav2(sub'+subName+');main'+subName+'c.bgColor=\''+linkHBGColor+'\';main'+subName+'a.style.color=\''+linkHColor+'\';" onmouseout="hideNav(sub'+subName+');main'+subName+'c.bgColor=\''+linkBGColor+'\';main'+subName+'a.style.color=\''+linkColor+'\';"'}
document.write('<LAYER NAME="sub'+subName+'" visibility="hide" onmouseover="showNav2(sub'+subName+');window.top.document.navMenu.document.main'+subName+'a.document.main'+subName+'d.zIndex=\'19\';" onmouseout="hideNav(sub'+subName+');window.top.document.navMenu.document.main'+subName+'a.document.main'+subName+'d.zIndex=\'17\';"><DIV '+id+'><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR="'+subBGColor+'"><TR><TD><TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 BGCOLOR="'+subBGColor+'" WIDTH="'+width+'"><TR><TD><TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="'+width+'">')
cursub="sub"+subName}

function endSubMenu() {
document.write('</TABLE></TD></TR></TABLE></TD></TR></TABLE></DIV></LAYER>')
if (NS){
for (i=0; i<names+1; i++){
document.layers[cursub].document.layers[items[i]+"a"].document.layers[items[i]+"c"].clip.bottom=document.layers[cursub].document.layers[items[i]+"a"].document.layers[items[i]+"b"].document.height}
names=-1}}

function initNav() {
if (IE){document.all("navMenu").style.visibility="visible";}
if (NS){document.layers["navMenu"].visibility="show";}}

if (document.all||document.getElementById) {
newTitle=document.title
document.title="";
dt=-1;}
function decryptTitle() {
if (document.all||document.getElementById) {
if (dt<newTitle.length) {
dt++;
numbers="123456789"
temp1=newTitle.substring(0, dt+1)
for(theChar = dt; theChar < newTitle.length-1; theChar++){
temp1 += Math.floor(Math.random()*numbers.length);}
document.title=temp1;}
else {clearInterval(decryptIt)}}}
decryptIt = setInterval('decryptTitle()', 100);

YOffset=110;
NSYOffset=7;
XOffset="12";
NSXOffset=2;
staticMode="advanced";
staticYOffset=12;
linkAlign="center";
linkSize="-1";
linkFont="Arial";
linkColor="blue";
linkBGColor="white";
linkHColor="white";
linkHBGColor="#0099FF";
hdrAlign="center";
hdrSize="-1";
hdrFont="Arial";
hdrColor="white";
hdrBGColor="#0066FF";
menuIsStatic="yes";
menuWidth=120;
menuBGColor="black";
subWidth=200;
subBGColor="black";
baseTarget="";

startMenu('Products'); // Å¸ÀÌÆ² ÀÌ¸§À» ¾´´Ù.

//ÀÌ¹ø¿£ Å¸ÀÌÆ² ¸Þ´º ¾Æ·¡¸Þ´º ¹× submenu¸¦ Á¤ÇÑ´Ù. menu_x´Â submenuÀÇ ÀÌ¸§
addItem('Flexible metal hose', 'http://www.metalhose.co.kr/eng/u-type-01.html', '', 'menu_1');
addItem('Metallic expansion joints', 'http://www.metalhose.co.kr/eng/smej-1000.htm', '', 'menu_2');
addItem('Rubber expansion joints', 'http://www.metalhose.co.kr/eng/spool arch.htm', '', 'menu_3');
addItem('Metal flexible joints', 'http://www.metalhose.co.kr/eng/smfh-1000.htm', '', 'menu_4');
addItem('Pump connector', 'http://www.metalhose.co.kr/eng/smi-10.htm', '', 'menu_5');
addItem('Sprinkler flexible joint', 'http://www.metalhose.co.kr/eng/sprinkler joint.htm', '', 'menu_6')
addItem('Braiders', 'http://www.metalhose.co.kr/eng/rotary braider.htm', '', 'menu_7')
endMenu();

/* µÎ¹øÂ° ¸Þ´º ÇÏÀ§ ¸Þ´º¸¦ Á¤ÇÑ´Ù. menu_1','');¿¡¼­ menu_1 ´ÙÀ½ ''¾È¿¡ ¼ýÄ¡´Â ºÎ¸Þ´º ³ÐÀÌ¸¦ ¸»ÇÑ´Ù.
¸¸¾à ''¾È¿¡ °ªÀ» ÁöÁ¤ÇÏÁö ¾ÊÀ»°æ¿ì´Â ±âº»°ªÀ¸·Î ³ªÅ¸³½´Ù.*/
startSubMenu('menu_1', '110');  
addItem('U type-1', 'http://www.metalhose.co.kr/eng/u-type-01.html');
addItem('U type-2', 'http://www.metalhose.co.kr/eng/u-type-02.html');
addItem('Sprial type', 'http://www.metalhose.co.kr/eng/sprial.htm');
addItem('Vacuum type', 'http://www.metalhose.co.kr/eng/vacuum-tube.htm');
addItem('Expansion joint', 'http://www.metalhose.co.kr/eng/e-joint-01.htm');
addItem('Automotive car connector', 'http://www.metalhose.co.kr/eng/car-connector.htm');
endSubMenu();

startSubMenu('menu_2', '140');
addItem('General single type', 'http://www.metalhose.co.kr/eng/smej-1000.htm');
addItem('General dual type', 'http://www.metalhose.co.kr/eng/smej-2000.htm');
addItem('Externally pressurized type for cooper pipe', 'http://www.metalhose.co.kr/eng/smej-3000.htm');
addItem('Free type', 'http://www.metalhose.co.kr/eng/smej-5000.htm');
addItem('Control ring type', 'http://www.metalhose.co.kr/eng/smej-6000.htm');
addItem('Hinge type', 'http://www.metalhose.co.kr/eng/smej-8000.htm');
addItem('Gimbal type', 'http://www.metalhose.co.kr/eng/smej-10000.htm');
addItem('Universal type', 'http://www.metalhose.co.kr/eng/smej-12000.htm');
addItem('Pressure balanced type', 'http://www.metalhose.co.kr/eng/smej-14000.htm');
addItem('Rectangular type', 'http://www.metalhose.co.kr/eng/smej-16000.htm');
addItem('Bellows type', 'http://www.metalhose.co.kr/eng/smej-17000.htm');
addItem('Table of materials', 'http://www.metalhose.co.kr/eng/table of materials.htm');
endSubMenu();

startSubMenu('menu_3', '180');
addItem('Spool arch type', 'http://www.metalhose.co.kr/eng/spool arch.htm');
addItem('Wide arch type', 'http://www.metalhose.co.kr/eng/wide arch.htm');
addItem('Spherical arch type', 'http://www.metalhose.co.kr/eng/spherical.htm');
endSubMenu();

startSubMenu('menu_4', '120');
addItem('Flexible joint-1', 'http://www.metalhose.co.kr/eng/smfh-1000.htm');
addItem('Flexible joint-2', 'http://www.metalhose.co.kr/eng/smfh-2000.htm');
addItem('Flexible metal hose', 'http://www.metalhose.co.kr/eng/smfh-01-06.htm');
endSubMenu();

startSubMenu('menu_5', '120');
addItem('Tie rod type bellows', 'http://www.metalhose.co.kr/eng/smi-10.htm');
endSubMenu();

startSubMenu('menu_6', '140');
addItem('Sprinkler flexible joint', 'http://www.metalhose.co.kr/eng/sprinkler joint.htm');
endSubMenu();

startSubMenu('menu_7', '120');
addItem('Rotary barider', 'http://www.metalhose.co.kr/eng/rotary braider.htm');
addItem('SLM type barider', 'http://www.metalhose.co.kr/eng/slm braider.htm');
addItem('Bobbin winder', 'http://www.metalhose.co.kr/eng/ws-1 bobbin winder.htm');
addItem('CS-1 Haul-offs', 'http://www.metalhose.co.kr/eng/cs-1 haul offs.htm');
addItem('SP-1 spiral winder', 'http://www.metalhose.co.kr/eng/sp-1 spiral winder.htm');
endSubMenu();
