

 // Переключатель видимости ( )

    function toggle(targetId)
     {
      if ( document.getElementById )
        {
         target = document.getElementById(targetId);
         if ( target.style.display == "none")
           {
            target.style.display = "";
           }
         else
             {
              target.style.display ="none";
             }
        }
     }


  function delete_element()
   { 
    // Поддеживает ли браузер DOM ?
    if (!document.getElementById) { return }

    // Получение заполнителя таблицы ( <div id="tableholder">)
    var table_div = document.getElementById("tableholder")

    // Проверка наличия в элементе div таблицы
     if (table_div.hasChildNodes() )
      { 
       // Удалить 1-й дочерний узел
        var tbody_node = table_div.firstChild
        var removed_node = table_div.removeChild(tbody_node)
      } 
     history.go(0)
  }

// Новое ( временное ) окно
 function show_image(img)
  { 
  var image_array = new Array()
  var image_alt = new Array() 
          /* Добавление файлов в массив */
  image_array[0] = "img/zerkalo_safet_b.jpg"
  image_alt[0] = "Модель Safetpark Y2650 - зеркало с антибликовым покрытием"
  image_array[1] = "img/nisal_dragon_b.jpg"
  image_alt[1] = "Блокиратор Dragon"
  image_array[2] = "img/mitpjr_dragon_b.jpg"
  image_alt[2] = "Блокиратор Dragon"
  image_array[3] = "img/mercg_dragon_b.jpg"
  image_alt[3] = "Блокиратор Dragon"
  image_array[4] = "img/bmwx5_dragon_b.jpg"
  image_alt[4] = "Блокиратор Dragon"
  image_array[5] = "img/bmw3_dragon_b.jpg"
  image_alt[5] = "Блокиратор Dragon"
  image_array[6] = "img/toyota_camry_dragon_b.jpg"
  image_alt[6] = "Блокиратор Dragon"
  image_array[7] = "img/skodfab_def_b.jpg"
  image_alt[7] = "Блокиратор Defend-Lock"
  image_array[8] = "img/alfaromeo_bearlock_kpp_b.jpg"
  image_alt[8] = "Блокиратор Bear Lock"
  image_array[9] = "img/fordfocus_bearlock_kpp_b.jpg"
  image_alt[9] = "Блокиратор Bear Lock"
  image_array[10] = "img/mercg_akpp_sentry_b.jpg"
  image_alt[10] = "Блокиратор SENTRY"
  image_array[11] = "img/cr300c_akpp_sentry_b.jpg"
  image_alt[11] = "Блокиратор SENTRY"
  image_array[12] = "img/bmw7_akpp_sentry_b.jpg"
  image_alt[12] = "Блокиратор SENTRY"
  image_array[13] = "img/audi_a6_kpp_sentry_b.jpg"
  image_alt[13] = "Блокиратор SENTRY"
  image_array[14] = "img/audi_a4_akpp_sentry_b.jpg"
  image_alt[14] = "Блокиратор SENTRY"

  image_array[15] = "img/vw_golf_4_drag_b.jpg"
  image_alt[15] = "Блокиратор МКПП DRAGON"

  var image_index = "" 
   switch (img)
     {
      case "win_zerk":
                      image_index=0; break; 
      case "nisal_drag":
                      image_index=1; break;
      case "mitpjr_drag":
                      image_index=2; break;
      case "mercg_drag":
                      image_index=3; break;
      case "bmwx5_drag":
                      image_index=4; break;
      case "bmw3_drag":
                      image_index=5; break;
      case "tocamry_drag":
                      image_index=6; break;
      case "skfab_def":
                      image_index=7; break;
      case "alfaromeo_bl_kpp":
                      image_index=8; break;
      case "fordfocus_bl_kpp":
                      image_index=9; break;
      case "mercg_akpp_sen":
                      image_index=10; break;
      case "cr300c_akpp_sen":
                      image_index=11; break;
      case "bmw7_akpp_sen":
                      image_index=12; break;
      case "audi6_kpp_sen":
                      image_index=13; break;
      case "audi4_akpp_sen":
                      image_index=14; break;

      case "vwgolf4_drag":
                      image_index=15; break;

      default:
           window.alert("В фукции не указано имя временного окна .");
     }
       /* Отображение нового рисунка */
 document.images["image_holder"].src = image_array[image_index]
 document.images["image_holder"].alt = image_alt[image_index]
   }


// Функция  show_tooltip(...,...) скоректирована  12_01_2006
function show_tooltip(current_event, tip_text) {

if (!dhtml_ok) { 

    // "Define" event for older browsers
    event = null
}

// function show_tooltip(current_event, tip_text) {                                                                    
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    // Get the mouse coordinates 
    var mouse_x = get_mouse_x(current_event)
    var mouse_y = get_mouse_y(current_event)
   
    // Wrap the tooltip text inside a <div>
      var html_text = "<div style='font-size:10pt; width:250px;" +

   // var html_text = "<div style='font-size:10pt; width: 650px;" +
                                "font-family:Arial, Helvetica; " +
                                "border: thin outset'>" + 
                                 tip_text + "</div>"

    // Apply the cross-browser functions
    dhtml_objects["tooltip"].set_html(html_text)
    dhtml_objects["tooltip"].set_left(mouse_x)
    dhtml_objects["tooltip"].set_top(mouse_y + 15)
               dhtml_objects["tooltip"].set_backgroundColor("#FFFF99")
             //dhtml_objects["tooltip"].set_backgroundColor("#008000")
    dhtml_objects["tooltip"].set_visibility("visible") 

               // dhtml_objects["tooltip"].move_to(200, 400)
               // dhtml_objects["tooltip"].move_by(-150, 1300)
               //  dhtml_objects["tooltip"].move_above(2)
               // dhtml_objects["tooltip"].move_below(3)
}
function hide_tooltip() {
 
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    
    // Set the <div> tag's visibility to "hidden"
    dhtml_objects["tooltip"].set_visibility("hidden")
}

// Функция  show_elem(...,...) скоректирована  21_01_2006
function show_elem(current_event, tip_text) {
if (!dhtml_ok) { 
    // "Define" event for older browsers
    event = null
}

// function show_elem(current_event, tip_text) {                                                     
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    // Get the mouse coordinates 
    var mouse_x = get_mouse_x(current_event)
    var mouse_y = get_mouse_y(current_event)
   
    // Wrap the tooltip text inside a <div>
    var html_text = "<div style='font-size:10pt; width: 250px;" +
                                "font-family:Arial, Helvetica; " +
                                "border: thin outset'>" + 
                                 tip_text + "</div>"
    // Apply the cross-browser functions
    dhtml_objects["tooltip"].set_html(html_text)
    dhtml_objects["tooltip"].set_left(mouse_x)
    dhtml_objects["tooltip"].set_top(mouse_y + 15)
               // dhtml_objects["tooltip"].set_backgroundColor("#FFFF99")
               //dhtml_objects["tooltip"].set_backgroundColor("#008000")
    dhtml_objects["tooltip"].set_backgroundColor("#ffff00")
    dhtml_objects["tooltip"].set_visibility("visible") 
               // dhtml_objects["tooltip"].move_to(200, 400)
    dhtml_objects["tooltip"].move_by(-150,450)
               // dhtml_objects["tooltip"].move_above(2)
               // dhtml_objects["tooltip"].move_below(3)
}
function hide_elem() {
 
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    
    // Set the <div> tag's visibility to "hidden"
    dhtml_objects["tooltip"].set_visibility("hidden")
}

// Функция  show_pct(...,...) скоректирована  04_04_2006 под Tomahawk TW-9030 net-ugona
function show_pct(current_event, tip_text) {
if (!dhtml_ok) { 
    // "Define" event for older browsers
    event = null
}

// function show_pct(current_event, tip_text) {                                                     
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    // Get the mouse coordinates 
    var mouse_x = get_mouse_x(current_event)
    var mouse_y = get_mouse_y(current_event)
   
    // Wrap the tooltip text inside a <div>
    var html_text = "<div style='font-size:10pt; width: 250px;" +
                                "font-family:Arial, Helvetica; " +
                                "border: thin outset'>" + 
                                 tip_text + "</div>"
    // Apply the cross-browser functions
    dhtml_objects["tooltip"].set_html(html_text)
    dhtml_objects["tooltip"].set_left(mouse_x)
    dhtml_objects["tooltip"].set_top(mouse_y + 15)
               // dhtml_objects["tooltip"].set_backgroundColor("#FFFF99")
               //dhtml_objects["tooltip"].set_backgroundColor("#008000")
    dhtml_objects["tooltip"].set_backgroundColor("#ffff00")
    dhtml_objects["tooltip"].set_visibility("visible") 
               // dhtml_objects["tooltip"].move_to(200, 400)
    dhtml_objects["tooltip"].move_by(-100,650)
               // dhtml_objects["tooltip"].move_above(2)
               // dhtml_objects["tooltip"].move_below(3)
}
function hide_pct() {
 
    // If this is a non-DHTML browser, bail out
    if (!dhtml_ok) { return }
    
    // Set the <div> tag's visibility to "hidden"
    dhtml_objects["tooltip"].set_visibility("hidden")
}

//Всплывающее окно - auto-magistral.ru/tech-obsluga/ 13_10_2009
        var newWindow;

        function createFoto(imageurl,defect)
         {

          newWindow=window.open('','','toolbar=no,scrollbars=no,left=180,top=250'
                                                 +',width=560,height=470')
          newWindow.document.open("text/html","replace");
          newWindow.document.write('<TABLE width="543" border="0"  height="407" align="CENTER">');
          newWindow.document.write('   <TR><TD align="CENTER">');
          newWindow.document.write('                <IMG src="' + imageurl + '" width="543" height="407">');
          newWindow.document.write('        </TD>');
          newWindow.document.write('    </TR>');

          newWindow.document.write('   <TR><TD  align="CENTER">');
          newWindow.document.write(                  defect);
          newWindow.document.write('   </Td></Tr>');
          newWindow.document.write('</TABLE>');
          newWindow.document.close();
       }

        function window_close()
         {
           newWindow.close()
         }
