var xx;
var isNav = (navigator.appName.indexOf("Netscape") !=-1);
var isIE = (navigator.appName.indexOf("Microsoft") !=-1);
md="off"
menu="off"

speed=1;

//##################

function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("1997-2009 Copyright by Wheel Machine.");


return false;
}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;


//##################################













function openIt(x) {

        link1a="<a href='../cgi-local/wm_wheels.php4?wheel=no&rh=0&wm=1&mid=0&language=d' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadWBanner()'><IMG BORDER=0 ALIGN=TOP VSPACE=1 SRC='../img/pdmfelgennachmarke.gif'></a>"
        link1b="<a href='../cgi-local/wm_showroom.php4?wm=1&rh=0&color=new&language=d' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><NOBR><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmfelgennachfahrzeug.gif'></NOBR></a>"
        link1c="<a href='../cgi-local/wmf_rk.php4?wmrk=5-Speichen&page=1&language=d' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><NOBR><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmfelgennachkategorie.gif'></NOBR></a>"
        link1d="<a href='../cgi-local/wmf_rk.php4?wmrk=size&page=1&size=7J_x_15H2&language=d' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmfelgennachgroesse.gif'></a>"
        link1e="<a href='../wmcdorder_d.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmcdrom.gif'></a>"
        link1f="<a xhref='http://anysite.htm' onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmreifennachmarke.gif'></a>"
        link2a="<a href='../../hifi-welt/' TARGET=_blank onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadWBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmcarhifi.gif'></a>"
        link2b="<a href='../../scc/scheiben.php4?m=z&fh=audi&mod=a3' TARGET=_blank onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmspurverbreiterungen.gif'></a>"
        link2c="&nbsp; <a href='http://anysite.htm' onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'>site 3</a>"
        link3a="&nbsp; <a href='http://212.227.197.47/a2000.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmautosuche.gif'></a>"
        link3b="&nbsp; <a href='http://212.227.197.47/avad2000.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdminserieren.gif'></a>"
        link4a="&nbsp; <a href='../login.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmhaendlerbereich.gif'></a>"
        link4b="&nbsp; <a href='../plz.php4' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmhaendlerverzeichnis.gif'></a>"
        link4c="&nbsp; <a href='http://anysite.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'>midi 3</a>"

        link5a="<a href='../news/070201.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmnews.gif'></a>"
        link5b="<a href='../faq_d.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmfaq.gif'></a>"
        link5c="<a href='../werbung_d.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmwerbung.gif'></a>"
        link5d="<a href='../wmagb_d.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmagbs.gif'></a>"
        link5e="<a href='../wm_impressum_d.htm' TARGET=BOTTOM onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()' onclick='loadBanner()'><IMG BORDER=0 WIDTH=128 HEIGHT=11 ALIGN=TOP VSPACE=1 SRC='../img/pdmimpressum.gif'></a>"

        link6a="&nbsp; <a href='http://www.wheelmachine2000.de' TARGET=_top onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'>Home</a>"
        link6b="&nbsp; <a href='../f_menu_d.htm' TARGET=TOP onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'>Deutsch</a>"
        link6c="&nbsp; <a href='../f_menu_e.htm' TARGET=TOP onmouseover='parent.frames[0].ct()' onmouseout='parent.frames[0].st(); closeMenu()'>English</a>"




        a="<table xbgcolor=000000 CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><td>"
         +"<table border=0 xbgcolor=DAD3FF CELLSPACING=0 cellpadding=0 width=137>"
          +"<tr bgcolor=DAD3FF><TD WIDTH=2 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
          +"<td NOWRAP><FONT COLOR=BLACK FACE=ARIAL SIZE=-2>"

        b="</TD><TD WIDTH=2 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
     +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD WIDTH=3 BGCOLOR=000000><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD></tr>"
         +"<TR><TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD HEIGHT=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
     +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
     +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD WIDTH=1 BGCOLOR=000000><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD></TR>"
         +"<tr bgcolor=DAD3FF><TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<td NOWRAP><FONT COLOR=BLACK FACE=ARIAL SIZE=-2>"



        c="</TD><TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
     +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD WIDTH=1 BGCOLOR=000000><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD></TR>"
         +"<TR bgcolor=DAD3FF><TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD HEIGHT=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
         +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
     +"<TD WIDTH=1 BGCOLOR=BBBBFF><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD>"
          +"<TD WIDTH=1 BGCOLOR=000000><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD></TR>"
         +"<TR><TD></TD><TD HEIGHT=4 BGCOLOR=000000 COLSPAN=4><IMG WIDTH=1 HEIGHT=1 SRC=\"../img/space.gif\"></TD></TR>"
         +"</table></td></TR></table>"

        if (x==1){
                text=a+link1a+b+link1b+b+link1c+b+link1d+b+link1e+c  //links should match the above of course ****** see NOTE above
        }
        if (x==2){
                text=a+link2a+b+link2b+c  //links should match the htm of course
        }
        if (x==3){
                text=a+link3a+b+link3b+c  //links should match the htm of course
        }
        if (x==4){
                text=a+link4a+b+link4b+c  //links should match the htm of course
        }
        if (x==5){
                text=a+link5a+b+link5b+b+link5c+b+link5d+b+link5e+c  //links should match the htm of course
        }

        if (x==6){
                text=a+link6a+b+link6b+b+link6c+c  //links should match the htm of course
        }




        if(x==0)text="&nbsp;"
//topPos=(((x-1)*22)+37)

        topPos=-80
//        linePos=(((x-1)*22)+39)

        if(isNav) {
	  if(top.frames[1].document.theMenu){
                top.frames[1].document.theMenu.document.write(text)
                top.frames[1].document.theMenu.document.close()
                top.frames[1].document.theMenu.left=45
                if (x==1) top.frames[1].document.theMenu.left=45
                if (x==2) top.frames[1].document.theMenu.left=198
                if (x==3) top.frames[1].document.theMenu.left=352
                if (x==4) top.frames[1].document.theMenu.left=505
                if (x==5) top.frames[1].document.theMenu.left=660

                if (x==6) top.frames[1].document.theMenu.left=6


                //top.frames[1].document.theMenu.top=35 //(topPos)
                scrollItems()
          }
	}


        if(isIE) {
	     if(top.frames[1].theMenu != null){   
                if(x==0)linePos=-35, clearTXT()

                top.frames[1].theMenu.style.pixelLeft=100
                top.frames[1].theMenu.style.pixelTop=(topPos)




                scrollItems()

        //theLine.style.pixelTop=(linePos-7)

                top.frames[1].theMenu.innerHTML=text

                switch (x){
                        case 1:
                        top.frames[1].theMenu.style.pixelLeft=35+10;


                        break;
                        case 2:
                        top.frames[1].theMenu.style.pixelLeft=188+10;


                        break;
                        case 3:
                        top.frames[1].theMenu.style.pixelLeft=342+10;


                        break;
                        case 4:
                        top.frames[1].theMenu.style.pixelLeft=495+10;


                        break;
                        case 5:
                        top.frames[1].theMenu.style.pixelLeft=650+10;

                       break;
                        case 6:
                        top.frames[1].theMenu.style.pixelLeft=6;



                        break;
                }

		}
        }

}



function menuOn(){

        menu="on"
}


function handlerMD(){

        md="off"
        if (menu=="on"){
                menu="off"
                md="on"
                openIt(0)
        }
}

function checkIt(xx,yy){

        if (menu=="on"){
                openIt(xx)
        }

        xxx="<table xbgcolor=000000 width=150><td><b><center><font color=ffffff FACE=ARIAL SIZE=-1>"+yy+"</font></center><b></td></table>"

        if (isNav){
	  if(parent.frames[1].document.theMO){
                parent.frames[1].document.theMO.document.write(xxx)
                parent.frames[1].document.theMO.document.close()
        }
	}

        if (isIE){
	    if(top.frames[1].theMO != null){   
                top.frames[1].theMO.innerHTML=xxx
	    }
        }
}

function clearTXT(){

  xxx="<table xbgcolor=000000 width=150><td><b><center><font color=ffffff FACE=ARIAL SIZE=-1></font></center><b></td></table>"
  if (isNav){
  if(parent.frames[1].document.theMO){
        parent.frames[1].document.theMO.document.write(xxx)
        parent.frames[1].document.theMO.document.close()
  }
  }	
        if (isIE) top.frames[1].theMO.innerHTML=xxx
}






function closeMenu(){
  xx=setTimeout("handlerMD()",5000)
}

function doIt(xx){
  if (md=="on") md="off",menu="on"
  if (menu=="off")menu="on",openIt(xx)
  else menu="off",openIt(0)
}



function loadWBanner(menu) {
	top.frames[1].location.href="./warenkorb.php4?language=$language&willy=yes&param=status&menu="+menu
}


function loadBanner(menu) {          
        top.frames[1].location.href="./warenkorb.php4?language=$language&param=status&menu="+menu
}          

function loadWEBanner(menu) {

top.frames[1].location.href="./warenkorb.php4?language=e&willy=yes&param=status&menu="+menu
}
  
 
function loadEBanner(menu) {

top.frames[1].location.href="./warenkorb.php4?language=e&param=status&menu="+menu
}



function scrollItems() {

  if (topPos < 0){

        topPos=topPos+5

        if (isNav){
	  if(parent.frames[1].document.theMneu){
                top.frames[1].document.theMenu.top=(topPos)
	}
        }

        if (isIE){
	    if(top.frames[1].theMenu != null){   
                top.frames[1].theMenu.style.pixelTop=(topPos)
	}
        }

setTimeout("scrollItems()",speed);
  }
}


function ct()
{
clearTimeout(xx);
}

function st()
{
xx=setTimeout('handlerMD()',1000);
}




