// Popup function
function popUp(url, titre, params) { 
	window.open(url, titre, params);
}

// Resize function
var iMinWidth = 960;
var iMinHeight = 614;
window.onresize = onResizeScreen;

function onResizeScreen(){

    var iScreenWidth;
    var iScreenHeight;

    var oBody = document.body;
    oBody.scroll="no";

    if (window.innerWidth){
            iScreenWidth = window.innerWidth;
            iScreenHeight = window.innerHeight;
    }
    else if (document.all){
            iScreenWidth = document.body.clientWidth;
            iScreenHeight = document.body.clientHeight;
    }

    if (iScreenWidth<iMinWidth || iScreenHeight<iMinHeight){
            oBody.scroll="yes";
            var bScrollW = false;
            var bScrollH = false;

            var iW;
            if (iScreenWidth<iMinWidth){
                    iW = iMinWidth;
                   bScrollW = true;
            }
            else {
                    iW = iScreenWidth;
            }

            var iH;
            if (iScreenHeight<iMinHeight){
                    iH = iMinHeight;
                    bScrollH = true;
            }
            else {
                    iH = iScreenHeight;
            }

            if (navigator.appName == "Netscape" && navigator.userAgent.indexOf("Safari")==-1){
                    if (bScrollW && !bScrollH)
                            iH -= 16;
                    if (!bScrollW && bScrollH)
                            iW -= 16;
            }
            else if (navigator.appName == "Microsoft Internet Explorer"){
                    if (bScrollW)
                        oBody.style.overflowX = "scroll";
                    else
                        oBody.style.overflowX = "hidden";
                    if (bScrollH)
                        oBody.style.overflowY = "scroll";
                    else
                        oBody.style.overflowY = "hidden";

            }

            resize(iW, iH);
    }
    else {
            if (navigator.appName == "Microsoft Internet Explorer"){
               oBody.style.overflowX = "hidden";
               oBody.style.overflowY = "hidden";
            }
            oBody.scroll="no";
            resize("100%", "100%");
    }

}

function resize(iWidth, iHeight){
    var oDiv = document.getElementById("flashcontent");
    oDiv.style.width = iWidth;
    oDiv.style.height = iHeight;
}