var minw = 1000;	//ALSO SET #flashcontainer width property to this value!
var minh = 700;
var minflashv = "10.0.0";
//
function getViewportSize() {
    var size = [0, 0];
    if (typeof window.innerWidth != "undefined") {
        size = [window.innerWidth, window.innerHeight];
    }
    else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
        size = [document.documentElement.clientWidth, document.documentElement.clientHeight];
    }
    else {
        size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight];
    }
    return size;
}
function createFullBrowserFlash() {
    swfobject.createCSS("html", "height:100%;");
    swfobject.createCSS("body", "height:100%;");
    swfobject.createCSS("#flashcontainer", "margin:0; width:100%; height:100%; min-width:" + minw + "px; min-height:" + minh + "px;");
    window.onresize = function() {
        var el = document.getElementById("flashcontainer");
        var size = getViewportSize();
        el.style.width = size[0] < minw ? minw + "px" : "100%";
        el.style.height = size[1] < minh ? minh + "px" : "100%";
    };
    window.onresize();
}
//
var flashvars = {};
flashvars.domain = "www.sevenedge.be";
flashvars.initlang = "nl";
var params = {bgcolor:"#D8D7D7"};
params.allowscriptaccess = "always";
var attributes = {id:"content"};
swfobject.embedSWF("preloader.swf", "content", "100%", "100%", minflashv, null, flashvars, params, attributes);
if (swfobject.hasFlashPlayerVersion(minflashv)){
    swfobject.addDomLoadEvent(createFullBrowserFlash);
}else{
    showAltContent();
}
// redirect to noflash page that shows a layouted alt page
function showAltContent(){
    window.location = '?page=1';
}