myURL = document.URL; basePath = myURL.substring(0,myURL.lastIndexOf("/")+1); appName = "Services Techniques"; appNameEn = "Technical Services"; version = "11.1.0"; releaseDate = "2020.12.04"; dataSource = "STC"; defLang = "fr"; uSess = null; IEBrowser = false; FFBrowser = false; if (window.ActiveXObject) IEBrowser = true; else FFBrowser = true; var dates = { convert:function(d) { // Converts the date in d to a date-object. The input can be: // a date object: returned without modification // an array : Interpreted as [year,month,day]. NOTE: month is 0-11. // a number : Interpreted as number of milliseconds // since 1 Jan 1970 (a timestamp) // a string : Any format supported by the javascript engine, like // "YYYY/MM/DD", "MM/DD/YYYY", "Jan 31 2009" etc. // an object : Interpreted as an object with year, month and date // attributes. **NOTE** month is 0-11. return ( d.constructor === Date ? d : d.constructor === Array ? new Date(d[0],d[1],d[2]) : d.constructor === Number ? new Date(d) : d.constructor === String ? new Date(d) : typeof d === "object" ? new Date(d.year,d.month,d.date) : NaN ); }, compare:function(a,b) { // Compare two dates (could be of any type supported by the convert // function above) and returns: // -1 : if a < b // 0 : if a = b // 1 : if a > b // NaN : if a or b is an illegal date // NOTE: The code inside isFinite does an assignment (=). return ( isFinite(a=this.convert(a).valueOf()) && isFinite(b=this.convert(b).valueOf()) ? (a>b)-(a 0) Result = document.cookie.substring(aPos,bPos); else Result = document.cookie.substring(aPos); } return Result; } function setCookie(Tag, Val) { document.cookie = Tag + "=" + Val + "; expires=" + cookieDate(); //alert("setCookie : " + Tag + " = " + Val + "\n" + document.cookie); } function formatMessage(msg,parms) { if (parms == undefined || parms == null) return msg; for (var i=0 ; i < parms.length; i++) { var index = msg.indexOf("%s"); if (index != -1) { msg = msg.substring(0,index) + parms[i] + msg.substring(index+2); } } return msg; } function cookieDate() { Result = ""; aDate = new Date(); mYr = aDate.getFullYear(); if (mYr > 1950) mYr = mYr - 1899; else mYr++; aDate.setYear(mYr); aDate.setDate(1); DOW = aDate.getDay(); MOY = aDate.getMonth(); dows = new Array ( "Sunday, ", "Monday, ","Tuesday, ", "Wednesday, ", "Thursday, ", "Friday, ","Saturday, "); Result = dows[DOW]; if (aDate.getDate() < 10) Result += "0"; Result += aDate.getDate() + "-"; mots = new Array ("jan","feb", "mar","apr","may","jun", "jul","aug","sep","oct","nov","dec"); Result += mots[MOY]; mYr = aDate.getFullYear(); if (mYr < 1950) mYr += 1900; Result += "-" + mYr + " 23:59:59 GMT"; return Result; } function showstuff(objectid) { document.getElementById(objectid).style.display='inline'; } function hidestuff(objectid) { document.getElementById(objectid).style.display='none'; } function execFromWebClient(method, parms) { try { var fnc = eval(method); if (fnc) { return fnc.apply(this,parms); } } catch(execption) { alert("Erreur " + execption); } } function closeWebClientSession(webSessId) { dojo.xhrPost({ //form: /(!Panel:!NameID)_form, url : relPath + "PlexFront", content: { _endsess: "" ,websessid: webSessId}, load: function(type, data, evt) { }, preventCache: true, //sync: true // To correct a new feature of Chrome sync: false }); }