﻿function SetPageSize()
{
    var _panelHeight;

    if (document.getElementById("tabContent") != null && document.getElementById("divDynamicPanel_1") != null && document.getElementById("divDynamicPanel_2") != null)
    {
        if (parseInt(document.documentElement.clientHeight) > parseInt(document.getElementById("tabContent").offsetHeight) &&
            parseInt(document.documentElement.clientHeight) - parseInt(document.getElementById("tabContent").offsetHeight) > 1)
        {
            _panelHeight = parseInt((parseInt(document.documentElement.clientHeight) - parseInt(document.getElementById("tabContent").offsetHeight)) / 2);
            document.getElementById("divDynamicPanel_1").style.height = _panelHeight + "px";
            document.getElementById("divDynamicPanel_2").style.height = _panelHeight + "px";
        }
    }
}

function LoadIntro(header)
{
    var flashvars = {};
    // TODO: links
    //flashvars.bsEnglish = "bs/en/index.html";
    //flashvars.bsRussian = "bs/ru/index.html";
    //flashvars.bsHebrew = "bs/he/index.html";
    flashvars.webEnglish = "web/en/index.html";
    flashvars.webRussian = "web/ru/index.html";
    //flashvars.webHebrew = "web/he/index.html";
    flashvars.ipEnglish = "iphone_apps/index.html";
    var params = {};
    params.menu = "false";
    params.quality = "best";
    params.wmode = "transparent";
    params.bgcolor = "#ffffff";
    params.allowscriptaccess = "sameDomain";
    var attributes = {};
    attributes.align = "middle";
    swfobject.embedSWF(header, "divIntro", "900", "400", "9.0.0", false, flashvars, params, attributes);
}
