onload = init;
onresize = init;
var LM,LB,MB,RB;
var tm_height = null;
var sized = 5;
var debugstr = '';
var assembly = false;

function init() {
    if (objects()) {
        sized = 1;
        height();
    }
    if (assembly) assemblyInit();
}


function objects() {
    LB = gEBI('id_content')
    RB = gEBI('id_akt')

    return (((LB != null) || (RB != null)));
}

function height() {
    var leftH = (LB != null) ? LB.offsetHeight : 0;
    var rightH = (RB != null) ? RB.offsetHeight : 0;

    if ((leftH > leftH) && (sized == 0)) {
        clearTimeout(tm_height);
    } else {
        var minHeight_left = 521;
        var minHeight_right = 446;
        if(leftH > minHeight_left) {
               RB.style.height = (minHeight_right + (leftH - minHeight_left) - 11) + 'px';
            }
        else if(rightH > minHeight_right) {
               LB.style.height = (minHeight_left + (rightH - minHeight_right)) +  'px';
            }

        RB.style.backgroundImage = 'url("img/akt_bottom.gif")';
        RB.style.backgroundRepeat ='no-repeat';
        RB.style.backgroundPosition = 'left bottom';
        if (tm_height != null) {
            clearTimeout(tm_height)
        } else {
            tm_height = setTimeout("height()", 1500);
        }
        sized--;
    }
}


function gEBI(id) {
    if (Boolean(document.getElementById)) {
        return document.getElementById(id);
    } else if (Boolean(document.all)) {
        return eval('document.all.' + id);
    }
}

function flash(secure) {
    var shockmode = false;
    var mimetype = 'application/x-shockwave-flash';

    if (navigator.mimeTypes) {
        if (navigator.mimeTypes[mimetype] != null) {
            if (navigator.mimeTypes[mimetype].enabledPlugin != null) {
                shockmode = true;
            }
        }
    }

    if (!shockmode && navigator.appVersion.indexOf('MSIE') != -1) {
        shockmode = true;
    }
    if (shockmode) {
        document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
        document.write(' codebase="http' + secure + '://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');
        document.write(' ID=banner WIDTH=190 HEIGHT=115 >');
        document.write(' <PARAM NAME=movie VALUE="img/logo.swf"> ');
        document.write(' <PARAM NAME=quality VALUE=autohigh> ');
        document.write('<EMBED SRC="img/logo.swf"');
        document.write(' swLiveConnect=FALSE WIDTH=190 HEIGHT=115');
        document.write(' QUALITY=autohigh');
        document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
        document.write('</EMBED>');
        document.write('</OBJECT>');
    }
    else {
        document.write('<A HREF="/index.jsp"><IMG SRC="img/logo3.gif" WIDTH=190 HEIGHT=115 BORDER=0></A>');
    }
}

function wrComb(name, compopt, dflt) {
    document.write('<select class=input name=' + name + '>')
    pole = compopt.split('@')
    for (var i = 0; i < pole.length - 1; i = i + 2) {
        document.write('<option value="' + pole[i] + '"');
        if (pole[i] == dflt) document.write(' selected');
        document.write('>' + pole[i + 1])
    }
    document.write('</select>');
}

function popup(url, x, y) {
    window.open(url, 'popup', 'toolbar=no,status=no,width=' + x + ',height=' + y);
}



