
 function openWindow(file, uri, btn, w, h, alt, id){

    var width    = w + 10;

    var height   = h + 30;



    if(navigator.appName=="Netscape") {

        if(!document.layers) {          //  Netscape 6

            height+=30;

        }

    }

    file = file + '?w=' + width + '&h=' + height;

    if (uri != "")  file+= '&uri=' + escape(uri);

    if (alt != "")  file+= '&alt=' + escape(alt);

    if (btn != "")  file+= '&btn=' + escape(btn);

    var features = 'width=' + width + ',height=' + height + ',innerWidth=' + width + ',innerHeight=' + height + ',location=no,menubar=no,status=no,resizable=yes';

    window.open(file, id, features);

 }



 function chStatus(str) {

    window.status = str;

    return true;

 }





obj = top.framebottom;

if((typeof(obj)!="undefined") && (typeof(obj.mo)!="undefined")) {       //  Are we using the submenu? (the mo object is only available here)

    page = getButtonName(document.location.href);

    if(page=='museet') page=obj.mo.defaultImage;

    obj.mo.activateButton(page);

}



function getButtonName(buttonuri) {

    names = (buttonuri.substr(7, buttonuri.length - 8)).split('/');

    return names[names.length - 1];;

}



function frameLoaded() {

    if(top.frames.length==0) {

        url = (document.location.href).substr(7);

        url = url.substr(url.indexOf('/'));

        document.frameform.frameurl.value = url;

        document.frameform.submit();

    }

}

