var timer_c = false;
var timer_o = false;
function c_m(id){ clearTimeout(timer_c); $("#group_" + id).hide('slow'); }
function o_m(id){ clearTimeout(timer_o); $("#group_" + id).show('slow');  }
function show_inner_menu(id){
    $(".products_menu_inner").hide('slow');
    $obj = document.getElementById('group_' + id);
    $obj.style.marginLeft = parseInt($obj.parentNode.offsetWidth) + 10 + 'px';
    $obj.style.marginTop = '-30px';
    if(timer_c){ clearTimeout(timer_c); }
    if(timer_o){ clearTimeout(timer_o); }
    timer_o = setTimeout("o_m('"+id+"')", 300);
}
function close_inner_menu(id){
    timer_c = setTimeout("c_m('"+id+"')", 1000);
}

var timer_cg = false;
var timer_og = false;
var $a = Array('company_menu', 'support_menu', 'products_menu');
function cg_m(id){ clearTimeout(timer_cg); $("#" + id).hide('slow'); }
function og_m(id){
    for(i=0; i<$a.length; i++){ if(id != $a[i]){ $("#" + $a[i]).hide('slow'); } }
    clearTimeout(timer_og);
    $("#" + id).show('slow');
}
function show_menu(id){
    $obj = document.getElementById(id);
    if(timer_cg){ clearTimeout(timer_cg); }
    if(timer_og){ clearTimeout(timer_og); }
    timer_og = setTimeout("og_m('"+id+"')", 100);
}
function close_menu(id){
    timer_cg = setTimeout("cg_m('"+id+"')", 1000);
}
function show_product_block(id){
    if(id != 'features'){ document.getElementById('block_features').style.display = 'none'; $('#link_features').removeClass();}
    if(id != 'connection_modes'){ document.getElementById('block_connection_modes').style.display = 'none'; $('#link_connection_modes').removeClass();}
    if(id != 'tech_specs'){ document.getElementById('block_tech_specs').style.display = 'none'; $('#link_tech_specs').removeClass();}
    if(id != 'pictures'){ document.getElementById('block_pictures').style.display = 'none'; $('#link_pictures').removeClass();}
    $('#block_'+id).fadeIn('slow');
    $('#link_'+id).addClass("active");
}
$(document).ready(function(){
    $("#link_downloads_menu").click(function () {
      $("#downloads_menu").toggle('slow');
    });
});

