
   var last_shown;
  var last_highlight;
  var last_highlight_name=Array();

 function ClassChanger(step,iden,addnum) {
       old_li=$('li_'+iden).className;
       if (old_li=="out") {
        $('li_'+iden).className="in";
        Changer(step,iden,addnum);
       }
       else {
         $('li_'+iden).className="out";
         $('div_'+iden).innerHTML="";
       }
      }
 function Changer(step,iden,addnum) {
     var request=new Ajax.Request("chevrolet/ajax/update.php",
       {
         parameters: "step="+step+"&iden="+iden+"&clientid="+ClientId,
         onComplete: function(response) {
         //alert(response.responseText);
         $('div_'+iden).innerHTML=response.responseText; }
       }
    );
 }

  function ShowDetails(iden) {
     Loading(1);
     var request=new Ajax.Request("chevrolet/ajax/update.php",
       {
         parameters: "step=pict&iden="+iden+"&clientid="+ClientId,
         onComplete: function(response) {
           document.location = "#mainimage";
          $('main_picture').innerHTML=response.responseText;
          Loading(0);
         }
       }
    );
 }

   function Hover(el,flag) {
     if (flag==1) {
      ClassSaved=el.className;
      el.className='hover';
     }
     else {
      el.className=ClassSaved;
     }
 }


 function ShowMap(id) {
   numb=1;
   old_highlight=$('listrow_'+id+'_'+numb).className;
   if ((old_highlight=="parts_white") || (old_highlight=="parts_even")) {
     for(numb=1;numb<=30;numb++) {
      if ($('listrow_'+last_highlight+'_'+numb)) {
       $('listrow_'+last_highlight+'_'+numb).className=last_highlight_name[numb];
     }
    }
     for(numb=1;numb<=30;numb++) {
      if ($('listrow_'+id+'_'+numb)) {
       last_highlight_name[numb]=$('listrow_'+id+'_'+numb).className;
       $('listrow_'+id+'_'+numb).className="light";
      }
     }

   }
   last_highlight=id;
   document.location.href = "#anchor"+id;
 }

           function CatalogUpdate(step,id,id2,id3) {
               Loading(1);
                var request=new Ajax.Request("chevrolet/ajax/tecdoc_update.php",
                   {
                     parameters: "step="+step+"&id="+id+"&id2="+id2+"&id3="+id3+"&clientid="+ClientId,
                     onComplete: function(response) {
                             if ($('main_catalog_div')) {
                               $('main_catalog_div').innerHTML=response.responseText;
                               document.location.href = "#mainimage";
                               Loading(0);
                              // alert(xmlobj.responseText);
                             }
                     }
                   }
                );
              }
