var old_layer_index = 0;
var category_length = 0;
function show_mlayer(index,top_start,left_start,layer_interval) {
    var now_winwidth = document.body.clientWidth;
    var left_margin = 0;
    if (now_winwidth > 1024) {
        left_margin = (now_winwidth-1024)/2;
    }
    var layer_name = "div"+index;
    if (old_layer_index != 0 && old_layer_index != index) {
        var old_layer_name = "div"+old_layer_index;
        document.all[old_layer_name].style.visibility = "hidden";
    }
    old_layer_index = index;
    hide_mlayer_exclusive(index);
    document.all[layer_name].style.top = top_start + (index-1)*layer_interval;
    document.all[layer_name].style.left = left_margin + left_start;
    document.all[layer_name].style.visibility = "visible";
}
function hide_mlayer_exclusive(index) {
    for (var i = 1; i <= category_length; i++) {
        if (i != index) document.all["div"+i].style.visibility = "hidden";
    }
}
function hide_mlayer(index) {
    var layer_name = "div"+index;
    document.all[layer_name].style.visibility = "hidden";
}