function auth_check() {
    auth.check(indexMain, function () { window.location = "login.html"} );
}

function indexMain() {
    
    if (auth.indexCss && document.getElementById("stylesheet")) {
        document.getElementById("stylesheet").href = auth.indexCss;
    }
    
    loadComponents();
    renderComponent("authInfoComp", auth);

    document.search.query.focus();    
}

function formSubmit() {
    if (document.search.query.value)
      document.location = "search.html?" + 
        "query=" + encodeURIComponent(document.search.query.value) +
        "&sort=" + "&perpage=" + "&torusquery=";
}

