<!--
    function chgClass(what,towhat) {
       document.getElementById(what).className=towhat ;
    }

    function chgDivs (toHide,toShow) {
       document.getElementById(toShow).className='' ;
       document.getElementById(toHide).className='myhidden' ;
    }

  function putBanner (wdt) {
    document.write('<td width='+wdt+' height=110 class="bottomimage">');
    /*
    A fenti ehelyett van! 2010.02.02. 
    document.write('<td width=90 height=110 class="leftimage"><a href="http://www.mol.hu/dynamic"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="159" height="102" id="moto_banner" align="middle">') ;
    document.write('<param name="allowFullScreen" value="false" />') ;
    document.write('<param name="movie" value="moto_banner.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="moto_banner.swf" quality="high" bgcolor="#ffffff" width="159" height="102" name="moto_banner" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />') ;
    document.write('<param name="allowScriptAccess" value="sameDomain" />') ;    
    document.write('</object></a><br></td><td width='410' class='bottomimage'>') ;
    */
  }

  function putHeader (lang) {
    document.write("<table width=770 border='0' cellspacing='0' cellpadding='0'>") ;
    document.write('<tr>') ;
    putBanner(500) ;
    document.write("<a class='curpointer' href='mainpage.htm'><img src='images/logo.jpg' border='0'></a>") ;    
    document.write("<td class='fnt10 fntbold rightimage' width=270>") ;        
    document.write("<table width='270' border='0' cellspacing='0' cellpadding='0'>") ;
    //document.write("<tr><td colspan='2' class='rightimage'><br><a href='http://www.maynart.hu/'><span class='ownlogo1'>design by </span><span class='ownlogo2'>maynart</span></a></td></tr>") ;
    document.write("<tr><td colspan='2' class='rightimage'><a href='http://www.bgnet.hu/'><span class='ownlogo1'>powered by </span><span class='ownlogo2'>bgnet</span></a><br><br></td></tr>") ;
    if (lang==1) document.write("<tr><td width='240' class='rightimage vertcenter'><span class='lang vertcenter'><b><a class='clwhitetext' href='http://www.bimota.hu/'>magyar változat</a></b></span><td class='rightimage' width='30'><a href='http://www.bimota.hu/'><img src='images/hu.gif' border='0' width='18' height='14'></a></td></tr>") ;
            else document.write("<tr><td width='240' class='rightimage vertcenter'><span class='lang vertcenter'><b><a class='clwhitetext' href='http://www.bimota.hu/en/'>english version</a></b></span><td class='rightimage' width='30'><a href='http://www.bimota.hu/en/'><img src='images/us.gif' border='0' width='18' height='14'></a></td></tr>") ;
    document.write("</table></table>") ;
  }

    function doRotate(dir) {
       nr=document.getElementById("imgnr").value ;
       nr=parseInt(nr)+parseInt(dir) ;
       if (nr>document.getElementById("imgcount").value) {
         nr=1 ;
       }         
       if (nr<1) {
         nr=document.getElementById("imgcount").value ;
       } 
       document.getElementById("imgnr").value=nr ;
       imgnev='rotate/' ;
       imgnev=imgnev+document.getElementById("mototyp").value+nr ;
       document.getElementById("motorimg").src=imgnev+".jpg" ;        
    }

    function chgClass(what,towhat) {
       document.getElementById(what).className=towhat ;
    }

    function chgMenuClass(what,towhat) {
       if (document.getElementById(what).className!='myhidden') {
         document.getElementById(what).className=towhat ;
       } 
    }

    function chgParams(towhat) {
       hideParams(document.getElementById("paramtyp").value) ;
       document.getElementById("paramtyp").value=towhat ;  
       mtyp=document.getElementById("mototyp").value ;
       document.getElementById(mtyp+towhat).className='fnt10 myvisible' ;
    }

    function hideParams() {
       uto=document.getElementById("paramtyp").value ;
       document.getElementById("db"+uto).className='fnt10 myhidden' ;
       document.getElementById("db8"+uto).className='fnt10 myhidden' ;
       document.getElementById("santa"+uto).className='fnt10 myhidden' ;
       document.getElementById("del"+uto).className='fnt10 myhidden' ;
       document.getElementById("gob"+uto).className='fnt10 myhidden' ;
       document.getElementById("tesi"+uto).className='fnt10 myhidden' ;
       document.getElementById("db7"+uto).className='fnt10 myhidden' ;
       document.getElementById("db5r"+uto).className='fnt10 myhidden' ;
       document.getElementById("db5s"+uto).className='fnt10 myhidden' ;
       document.getElementById("tesi3d"+uto).className='fnt10 myhidden' ;
    }

    function chgMoto(towhat,imgcount,galcount,imgnr) {
       document.getElementById("mototyp").value=towhat ;
       document.getElementById("imgnr").value=imgnr ;
       document.getElementById("imgcount").value=imgcount ;
       document.getElementById("gallerycount").value=galcount ;
       hideParams();
       ptyp=document.getElementById("paramtyp").value ;
       document.getElementById("motologo").src='images/'+towhat+'_logo.gif' ;
       document.getElementById("motormenu").className='menubutoff' ;
       //document.getElementById("valtomenu").className='menubutoff' ;
       document.getElementById("vazmenu").className='menubutoff' ;
       document.getElementById("choosecell").className='myhidden' ;
       for (i=1; i<5; i++ ) {
         document.getElementById("p"+i).className='fnt10' ;
       }
       doRotate(0) ;
       document.getElementById("backarrow").className='myhidden';
       document.getElementById(towhat+ptyp).className='fnt10 myvisible' ;
       document.getElementById("rotatecell").className='fnt1' ;
       showHideGallery('rotatetable','gallerytable') ; 
    }

    function chgGalleryPic (towhat) {
       document.getElementById("gallpic").src='gallery/'+document.getElementById("mototyp").value+towhat+'.jpg' ;
    }

    function loadGalleryThumbs () {
      document.getElementById("motormenu").className='myhidden' ;
      //document.getElementById("valtomenu").className='myhidden' ;
      document.getElementById("vazmenu").className='myhidden' ;
       for (i=1; i<5; i++ ) {
         document.getElementById("p"+i).className='myhidden' ;
       }
      mtyp=document.getElementById("mototyp").value ;
      for (i=1; i<=document.getElementById("gallerycount").value; i++ ) {
       document.getElementById("thumb"+i).src='gallery/thumbs/'+mtyp+i+'.gif' ;
      }
      for (i=parseInt(document.getElementById("gallerycount").value)+1; i<=20; i++ ) {
              document.getElementById("thumb"+i).src='images/spacer.gif' ;
      }
      chgGalleryPic(1) ; 
      document.getElementById("backarrow").className='curpointer';
      //document.getElementById("scrdiv").scrollTo(0,50) ;
      showHideGallery('gallerytable','rotatetable') ;
    } 

    function closeGallery() {
         document.getElementById("backarrow").className='myhidden';
         chgMoto(document.getElementById("mototyp").value, document.getElementById("imgcount").value, document.getElementById("gallerycount").value, document.getElementById("imgnr").value) ;
    }

    function allocateGalleryThumbs () {
      for (i=1; i<=20; i++ ) {
        document.write("<img id='thumb"+i+"' onMouseDown=\"chgGalleryPic("+i+");\" src=''><br>") ;
      }
    } 

    function showHideGallery (toShow,toHide) {
       document.getElementById(toShow).className='' ;
       document.getElementById(toHide).className='myhidden' ;
    }

-->