 var dx=0;
 var stop=1;
 var inc_dx=0;
 var buts_show=new Array();

 function moveRight() {
    hideButts();
    dx=-10;
    stop=0;
    inc_dx=-2;
 }

 function moveLeft() {
    hideButts();
    dx=10;
    stop=0;
    inc_dx=2;
 }


 function chgDX() {
   if(!stop)
      dx=dx+inc_dx;
 }

 function moveStop() {
    dx=0;
    stop=1;
 }

 function showButt(id) {
   node=document.getElementById('but'+id);
   node.style.display='inline';
   buts_show[buts_show.length]=id;
 }

 function hideButts() {
   for(i=0;i<buts_show.length;i++) {
    document.getElementById('but'+buts_show[i]).style.display='none';
   }
   buts_show=new Array();
 }


 function moveTo() {
   model_id=document.getElementById('model_select').selectedIndex;
   x=0;
   if(model_id==1) {x=0;} // Linea
   if(model_id==2) {x=-250;} //FIAT 500
   if(model_id==3) {x=-500;} //Panda
   if(model_id==4) {x=-738;} //Panda 4x4
   if(model_id==5) {x=-990;} //Punto 3d
   if(model_id==6) {x=-1244;} //Punto 5d
   if(model_id==7) {x=-1496;} //BRAVO
   if(model_id==8) {x=-1736;} //Albea
   if(model_id==9) {x=-1980;} //SEDICI
   if(model_id==10) {x=-2240;} //Croma
   if(model_id==11) {x=-2480;} //Doblo panorama
   if(model_id==12) {x=-2740;} //Doblo Cargo
   if(model_id==13) {x=-3000;} //Ducato
   
   document.getElementById('tbl_model').style.marginLeft=x;
 }

 function move() {
   node=document.getElementById('tbl_model');
   x = parseInt(node.style.marginLeft);
   new_x=x+dx;
   if(new_x<=0 && new_x>=-3000) {
	   node.style.marginLeft=new_x;
   } else {
       stop=1;
   }
 }
 
