function ready_index() {
    showpic(1);
    showTop(1);
}

var autoStart = "";
function showpic(num) {
    if (num == null || num == "") { num = 1 };
    if (num > 3) { num = 1 };
    for (var x = 1; x <= 3; x++) {
        if (x == num) {
            $("#sel_p" + x).attr("class", "sel_p1");
            $("#show_p" + x).hide();
            $("#show_p" + x).fadeIn('slow');
        } else {
            $("#sel_p" + x).attr("class", "sel_p2");
            $("#show_p" + x).show();
            $("#show_p" + x).fadeOut('slow');
            $("#show_p" + x).hide();
        }
    }
    clearInterval(autoStart);
    var i = num + 1;
    autoStart = setInterval("showpic(" + i + ")", 4000);
}
function showTop(num) {
    if (num == null || num == "") { num = 1 };
    if (num > 2) { num = 1 };
    for (var x = 1; x <= 3; x++) {
        if (x == num) {
            $("#sel_t" + x).attr("class", "selhp" + x);
            $("#ph_con" + x).show();
        } else {
            $("#sel_t" + x).attr("class", "");
            $("#ph_con" + x).hide();
        }
    }
}
