﻿function switchTab(id,max){
    for (i = 0; i <= max; i++)
    {
        if(i!=id)
        {
            document.getElementById('tab'+i).style.display='none';
        }
        else
        {
            document.getElementById('tab'+i).style.display='block';
        }
    }
}

function waitPreloadPage() {
    if (document.getElementById) {
        document.getElementById('prepage').style.visibility = 'hidden';
    } else {
        if (document.layers) {
            document.prepage.visibility = 'hidden';
        }
        else {
            document.all.prepage.style.visibility = 'hidden';
        }
    }
}

function site() {
    params = 'width=' + screen.width;
    params += ', height=' + screen.height;
    params += ', top=0, left=0'
    params += ', fullscreen=yes';
    newwin = window.open('main.aspx', 'site', params);
    if (window.focus) { newwin.focus() }
    return false;
}

function pop(url) {
    w = 1000;
    h = 740;
    winl = (screen.width - w) / 2;
    wint = (screen.height - h) / 2;
    params = 'height=' + h + ',width=' + w + ',top=' + wint + ',left=' + winl + 'resizable=0'
    window.open(url, '', params)
    return false;
}

function addBookmark(title, url) {
    if (window.sidebar) { // Firefox
        window.sidebar.addPanel(title, url, '');
    } else if (window.opera) { //Opera
        var a = document.createElement("A");
        a.rel = "sidebar";
        a.target = "_search";
        a.title = title;
        a.href = url;
        a.click();
    } else if (document.all) { //IE
        window.external.AddFavorite(url, title);
    }
}

function renderlogo() {
    var so = new SWFObject("images/logo.swf", "logo", "333", "34", "8", "#000000");
    so.addParam("scale", "noscale");
    so.addParam("menu", "false");
    so.addParam("wmode", "transparent");
    so.write("logo");
}

function rendermenu() {
    var so = new SWFObject("images/menu.swf", "menu", "780", "115", "8", "#000000");
    so.addParam("scale", "noscale");
    so.addParam("menu", "false");
    so.addParam("wmode", "transparent");
    so.write("menu");
}

function renderintro() {
    var so = new SWFObject("images/intro.swf", "intro", "700", "350", "8", "#000000");
    so.addParam("scale", "noscale");
    so.addParam("menu", "false");
    so.addParam("wmode", "transparent");
    so.write("intro");
}
