/**
 * Scriptloader...
 *
 */

// loading external scripts.
document.writeln('<script type="text/javascript" src="/addon/x/x_core.js"></script>');
document.writeln('<script type="text/javascript" src="/addon/x/x_event.js"></script>');

function ajustLayout()
{
    cHeight = (xHeight('content_top'));
    dHeight = xClientHeight() - cHeight;
    maxHeight = Math.max(xHeight('content_left'), Math.max(xHeight('content_right'), dHeight));
    xHeight('wrapper', maxHeight  + cHeight);
    xHeight('content_left', maxHeight);
    xHeight('content_right', maxHeight);
}

window.onload = function ()
{
    xAddEventListener(window, "resize", ajustLayout, false);
    ajustLayout();
}

function popImage(img)
{
    wo = window.open('/pop.php?img='+img, 'popimg','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150');
}

function sendAction(key,act)
{
    if (act == 'delete') {
        s = confirm('Er du sikker på at du vil slette ??');
        if (s == false) return;
    }
    frm = xGetElementById('aa__form');
    frm.f_module.value = key;
    frm.f_action.value = act;
    frm.f_ref.value = window.location.pathname;
    frm.submit();
}
