var Tour = {
    pages: {},
    loading: false,
    register: function () {
        var i = 1;
        $$(".tour-page a").each(function (elm) {
            elm.href = "#" + i;
            i += 1;
        });

        //var button = $$(".abutton")[0];
        //if (button) {
        //    button.href = "#" + (Tour.current_page + 1);
        //}
    },
    load: function (page_num, event) {
        page_num = page_num <= Tour.page_count && page_num > 0 ? page_num : 1;
        Tour.select_tab(page_num);
	document.getElementById('tour-text'+Tour.current_page).style.visibility = 'hidden';
	document.getElementById('tour-text'+page_num).style.visibility = 'visible';
        Tour.current_page = page_num;
	return

    },
    select_tab: function (page_num) {
        var img;
        $$("a.selected").each(function (elm) {
            elm.removeClassName("selected");
            img = elm.down("img.tour-tab-rounded").remove();
        });

        var button = $$("#tour-tabs ul li a")[page_num - 1];
        button.blur();

        button.addClassName("selected");
        button.insert(img);
    },
    show_page: function (page_num) {
    },
    check_url: function () {
    }
};

window.LoadedJsSuccessfully = true;


