
var serverUrl = 'http://novaserver.vertice.fr/novaserver/novawebgen';
var rootUrl;
var showFps = false;
function initNwg(spanid, sceneid) {
    if (rootUrl == null) {
        rootUrl = "http://novaserver.vertice.fr/NovaServer/(S(1wu32oioie2yry452jkt2x55))/";
    }
  
    if (typeof (nwgScriptLoaded) == "undefined") {
        loadNwgScriptAndCss();
    }
    if (nwgScriptLoaded) {
        init(spanid, sceneid, 0);
    }
    else {
        window.setTimeout("initNwg('" + spanid + "'," + sceneid + ")", 25);
    }
}
function loadNwgScriptAndCss() {
    nwgScriptLoaded = false;
    
    var dynscript = document.createElement("script");
    dynscript.setAttribute("type", "text/javascript");
    dynscript.setAttribute("src", rootUrl + "novawebgen/nwg.aspx");
    dynscript.setAttribute("id", "nwgscript");
    
    
    var ajaxScript = document.createElement("script");
    ajaxScript.setAttribute("type", "text/javascript");
    ajaxScript.setAttribute("src", rootUrl + "novawebgen/MicrosoftAjax.js");
    ajaxScript.setAttribute("id", "nwgAjaxScript");
    
    var headElement = document.getElementsByTagName("head")[0];
    headElement.appendChild(dynscript);
    headElement.appendChild(ajaxScript);
    
    
    var dyncss = document.createElement("link");
    dyncss.setAttribute("type", "text/css");
    dyncss.setAttribute("rel", "stylesheet");
    dyncss.setAttribute("href", rootUrl + "novawebgen/nwg.css");
    dyncss.setAttribute("title", "nwgcss");
    headElement.insertBefore(dyncss, dynscript);
}
initNwg("nwg", 3);