﻿FDNC={};FDNC.Web={};FDNC.Web.Browser=new Object();FDNC.Web.Browser.IsGecko=/gecko/i.test(navigator.userAgent);FDNC.Web.Browser.IsIE=/MSIE/.test(navigator.userAgent);FDNC.Web.UI={};FDNC.Web.UI.GetSynchronousJSONResponse=function(a,b){var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){if(new ActiveXObject("Microsoft.XMLHTTP")){c=new ActiveXObject("Microsoft.XMLHTTP")}else{c=new ActiveXObject("Msxml2.XMLHTTP")}}}a=a+"?rnd="+Math.random();c.open("POST",a,false);c.setRequestHeader("Content-Type","application/json; charset=utf-8");c.send(b);var d=c.responseText;return d};FDNC.Web.UI.WebForm_FireDefaultButton_Old=function(a,b){};var __defaultFired=false;FDNC.Web.UI.WebForm_FireDefaultButton=function(b,d){var c=b.target||b.srcElement;if(!__defaultFired&&b.keyCode==13&&!(c&&(c.tagName.toLowerCase()=="textarea"))){var a;if(__nonMSDOMBrowser){a=document.getElementById(d)}else{a=document.all[d]}if(a&&typeof(a.click)!="undefined"){a.click();b.cancelBubble=true;if(b.stopPropagation){b.stopPropagation()}return false}}return true};FDNC.Web.UI.GetLocation_Old=function(a){};FDNC.Web.UI.GetLocation=function(c){if(c===document.documentElement){return new Sys.UI.Point(0,0)}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<=7){if(c.window===c||c.nodeType===9||!c.getClientRects||!c.getBoundingClientRect){return new Sys.UI.Point(0,0)}var h=c.getClientRects();if(!h||!h.length){return new Sys.UI.Point(0,0)}var n=h[0];var a=0;var e=0;var j=false;try{j=c.ownerDocument.parentWindow.frameElement}catch(g){j=true}if(j){var b=c.getBoundingClientRect();if(!b){return new Sys.UI.Point(0,0)}var f=n.left;var d=n.top;for(var k=1;k<h.length;k++){var m=h[k];if(m.left<f){f=m.left}if(m.top<d){d=m.top}}a=f-b.left;e=d-b.top}var l=c.document.documentElement;return new Sys.UI.Point(n.left-2-a+l.scrollLeft,n.top-2-e+l.scrollTop)}else{return FDNC.Web.UI.GetLocation_Old(c)}};FDNC.Web.UI.WebServices={};FDNC.Web.UI.WebServices.SynchronousCall=function(a,b){var c=null;if(window.XMLHttpRequest){c=new XMLHttpRequest()}else{if(window.ActiveXObject){if(new ActiveXObject("Microsoft.XMLHTTP")){c=new ActiveXObject("Microsoft.XMLHTTP")}else{c=new ActiveXObject("Msxml2.XMLHTTP")}}}a=a+"?rnd="+Math.random();c.open("POST",a,false);c.setRequestHeader("Content-Type","application/json; charset=utf-8");c.send(b);var d=c.responseText;return d};FDNC.Web.UI.WebControls={};FDNC.Web.UI.WebControls.GetElement=function(a){if(typeof(a)=="object"){return a}if(typeof(a)=="string"){return document.getElementById(a)}throw"FDNC.Web.UI.WebControls.GetElement : invalid element"};FDNC.Web.UI.WebControls.Enable=function(a){FDNC.Web.UI.WebControls.GetElement(a).disabled=""};FDNC.Web.UI.WebControls.Disable=function(a){FDNC.Web.UI.WebControls.GetElement(a).disabled="disabled"};FDNC.Web.UI.WebControls.Show=function(a){FDNC.Web.UI.WebControls.GetElement(a).visible=true};FDNC.Web.UI.WebControls.Hide=function(a){FDNC.Web.UI.WebControls.GetElement(a).visible=false};FDNC.Web.UI.WebControls.SetFocus=function(a){FDNC.Web.UI.WebControls.GetElement(a).focus()};FDNC.Web.UI.WebControls.TextBox={};FDNC.Web.UI.WebControls.TextBox.ReplaceTextOfToken=function(e,b,d){var a=FDNC.Web.UI.WebControls.GetElement(d);var g=a.value;var i=g.indexOf(e,0);if(i>-1){var c=g.indexOf("\r\n",i);if(c==-1){var c=g.indexOf("\n",i)}if(c==-1){var c=g.indexOf("\r",i)}if(c>-1){var f=g.substring(i,c);var j=new RegExp(f,"gi");var h=g.replace(j,b);a.value=h}}else{a.value=b+"\r\n"+g}};FDNC.Web.UI.WebControls.TextBox.ReplaceOldTextOfToken=function(f,c,e,d){var b=FDNC.Web.UI.WebControls.GetElement(d);var a=b.value.indexOf(f,0);if(a>-1){b.value=b.value.replace(f+c,f+e)}else{b.value=f+e+"\r\n"+b.value}};FDNC.Web.UI.IcsPage={};FDNC.Web.UI.IcsPage.ShowModelessDialog=function(d,c,a){if(window.showModelessDialog){var b=new Object();b.opener=window;window.showModelessDialog(d,b,"dialogWidth:"+c+"px;dialogHeight:"+a+"px;center:yes;help:no;status:no;resizable=no")}else{var e=window.open(d,"PopupWindow_"+d,"left=0,top=0,width="+c+"px,height="+a+"px,modal=no,directories=0,menubar=0,titlebar=0,toolbar=0");if(e){if(!e.closed){e.focus()}}}};FDNC.Web.UI.IcsPage.ShowModalDialog=function(d,c,a){if(window.showModalDialog){var b=new Object();b.opener=window;window.showModalDialog(d,b,"dialogWidth:"+c+"px;dialogHeight:"+a+"px;center:yes;help:no;status:no;resizable=no")}else{var e=window.open(d,"PopupWindow_"+d,"left=0,top=0,width="+c+"px,height="+a+"px,modal=yes,directories=0,menubar=0,titlebar=0,toolbar=0");if(e){if(!e.closed){e.focus()}}}};FDNC.Web.UI.IcsPage.CloseWindow=function(){window.close()};FDNC.Web.UI.IcsPage.CloseWindowWithReloadOpener=function(a,c){if(a&&window.dialogArguments!=null){var b=window.dialogArguments.opener;if(b!=null){b.focus();b.location.href=b.location.href}}if(c&&window.opener!=null){window.opener.location.href=window.opener.location.href}window.close()};FDNC.Web.UI.IcsPage.ReloadPage=function(){window.location.href=window.location.href;return false};FDNC.Web.UI.IcsPage.RefreshPage=function(){var a=document.getElementsByTagName("form");if(a.length>0){a[0].submit();return false}else{return true}};FDNC.Web.UI.IcsPage.ReloadModalPage=function(){var a=FDNC.Web.UI.WebControls.GetElement("workaround_reloadModal");if(a==null){a=document.createElement("A");a.id="workaround_reloadModal";a.style.display="none";document.body.appendChild(a)}if(a!=null){a.href=location.href;a.click()}return false};FDNC.Web.UI.IcsPage.ResizeAndCenterPage=function(c,b,e){var d=Math.floor((screen.availWidth-c)/2);var a=Math.floor((screen.availHeight-b)/2);if(FDNC.Web.Browser.IsIE&&e){window.dialogWidth=c+"px";window.dialogHeight=b+"px";window.dialogTop=a;window.dialogLeft=d}else{self.resizeTo(c,b);self.moveTo(a,d)}};FDNC.Web.UI.IcsPage.ResizeWindow=function(b,a,c){if(FDNC.Web.Browser.IsIE&&c){window.dialogWidth=b+"px";window.dialogHeight=a+"px"}else{self.resizeTo(b,a)}};FDNC.Web.UI.IcsPage.CenterWindow=function(c){var d=0;var b=0;if(FDNC.Web.Browser.IsIE){d=document.body.offsetWidth;b=document.body.offsetHeight}else{d=window.innerWidth;b=window.innerHeight}var e=Math.floor((screen.availWidth-d)/2);var a=Math.floor((screen.availHeight-b)/2);if(FDNC.Web.Browser.IsIE&&c){window.dialogTop=a;window.dialogLeft=e}else{self.moveTo(a,e)}};FDNC.Web.UI.IcsPage.GetScrollbarPositionX=function(){return FDNC.Web.UI.IcsPage.GetScrollbarPosition().X};FDNC.Web.UI.IcsPage.GetScrollbarPositionY=function(){return FDNC.Web.UI.IcsPage.GetScrollbarPosition().Y};FDNC.Web.UI.IcsPage.GetScrollbarPosition=function(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}return{X:b,Y:a}};FDNC.Web.UI.IcsPage.GetUrlParameter=function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+a+"=([^&#]*)";var b=new RegExp(c);var d=b.exec(window.location.href);if(d==null){return""}else{return d[1]}};FDNC.Web.UI.HtmlControls={};FDNC.Web.UI.HtmlControls.HtmlInputText={};FDNC.Web.UI.HtmlControls.HtmlInputText.GetSelection=function(a){var b=0;if(FDNC.Web.Browser.IsIE){a.focus();var c=document.selection.createRange();c.moveStart("character",-a.value.length);b=c.text.length}else{b=a.selectionStart}return(b)};FDNC.Web.UI.HtmlControls.HtmlInputText.SetSelection=function(b,c){if(FDNC.Web.Browser.IsIE){b.focus();b.setSelectionRange(c,c)}else{var a=b.createTextRange();a.collapse(true);a.moveEnd("character",c);a.moveStart("character",c);a.select()}};FDNC.Web.UI.HtmlControls.HtmlInputText.SetSelectionRange=function(b,a,c){if(FDNC.Web.Browser.IsIE){var d=b.createTextRange();d.collapse(true);d.moveStart("character",a);d.moveEnd("character",c-a);d.select()}else{b.setSelectionRange(a,c)}};FDNC.Web.UI.HtmlControls.HtmlInputText.SelectAllText=function(a){FDNC.Web.UI.WebControls.GetElement(a).select(-1)};FDNC.Events={};FDNC.Events.AddEventHandler=function(b,c,a){if(b==null){throw"FDNC.Events.AddEventHandlerToElement : invalid element"}if(FDNC.Web.Browser.IsIE){b.attachEvent("on"+c,a)}else{b.addEventListener(c,a,false)}};FDNC.IO={};FDNC.IO.Keyboard={};FDNC.IO.Keyboard.GetKeyCode=function(a){return a.keyCode};FDNC.IO.Keyboard.GetAsciiCode=function(a){return a.charCode?a.charCode:a.keyCode};FDNC.IO.Keyboard.IsKeyCodeArrow=function(a){return(a>=37&&a<=40)};FDNC.String={};FDNC.String.Format=function(){for(var b=1;b<arguments.length;b++){var a=new RegExp("\\{"+(b-1)+"\\}","gm");arguments[0]=arguments[0].replace(a,arguments[b])}return arguments[0]};if(!String.prototype.Format){String.prototype.Format=function(){var b=this;for(var c=0;c<arguments.length;c++){var a=new RegExp("\\{"+(c)+"\\}","gm");b=b.replace(a,arguments[c])}return b}}if(!this.JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());FDNC.Telerik={};FDNC.Telerik.RadControls={};FDNC.Telerik.OverrideAlert=function(a){window.alert=function(b){radalert(b,null,null,a)}};FDNC.Telerik.RadControls.TreeView={};FDNC.Telerik.RadControls.TreeView.protoype=new Object();FDNC.Telerik.RadControls.TreeView.ChangeNodeText=function(b,a){b.TextElement().innerText=a;b.StartEdit();b.EndEdit()};FDNC.Telerik.RadControls.TreeView.GetSelectedNode=function(a,b){return b.SelectedNode};FDNC.Telerik.RadControls.TreeView.GetSelectedValue=function(a,b){return FDNC.Telerik.RadControls.TreeView.GetSelectedNode(a).Value};FDNC.Telerik.RadControls.Window={};FDNC.Telerik.RadControls.Window.protoype=new Object();FDNC.Telerik.RadControls.Window.OpenWindowByName=function(d,b){var c=GetRadWindowManager();var a=c.GetWindowByName(d);if(a){a.Show();a.SetUrl(b);a.SetActive(true)}else{a=window.radopen(msgId,d)}};FDNC.Telerik.RadControls.Window.OpenWindowByNameEx=function(d,c,a){c=c+"?rnd="+Math.random();var b=GetRadWindowManager().getWindowByName(d);if(b==null){b=window.radopen(c,d)}b.setUrl(c);b.show();if(typeof(a)=="function"){b.add_close(a)}};FDNC.Telerik.RadControls.Window.GetCurrentWindow=function(){if(window.radWindow){return window.radWindow}if(window.frameElement.radWindow){return window.frameElement.radWindow}};FDNC.Telerik.RadControls.Window.CloseCurrentWindow=function(a){FDNC.Telerik.RadControls.Window.GetCurrentWindow().close(a)};FDNC.Telerik.RadControls.Window.ValidateCurrentWindow=function(a){FDNC.Telerik.RadControls.Window.GetCurrentWindow().Close(a)};FDNC.Telerik.RadControls.Window.CancelCurrentWindow=function(){FDNC.Telerik.RadControls.Window.GetCurrentWindow().Close()};FDNC.Telerik2008={};FDNC.Telerik2008.RadControls={};FDNC.Telerik2008.RadControls.ToolTip={};FDNC.Telerik2008.RadControls.ToolTip.CloseActive=function(){window.setTimeout(function(){var b=Telerik.Web.UI.RadToolTipController.getInstance();var a=b.get_activeToolTip();if(a){a.hide()}},1)};FDNC.Telerik2008.RadControls.Window={};FDNC.Telerik2008.RadControls.Window.FermerFenetreRetourJSON=function(b){var a=JSON.stringify(b,function(d,c){return c});FDNC.Telerik.RadControls.Window.CloseCurrentWindow(a)};FDNC.Telerik2008.RadControls.Window.FermerFenetre=function(valeurRetourJSON,fenetreParente,callback){var wnd=GetRadWindow();if(typeof(fenetreParente)=="string"&&typeof(callback)=="string"){var wndFenetreParent=wnd.get_windowManager().getWindowByName(fenetreParente);var contenuFenetreParent=wndFenetreParent.get_contentFrame().contentWindow;eval("contenuFenetreParent."+callback+"(valeurRetourJSON);");wnd.close()}else{wnd.close(valeurRetourJSON)}};FDNC.DateTime={};Date.prototype.addDays=function(b){var a=new Date(this.valueOf());a.setDate(a.getDate()+b);return a};Date.prototype.addYears=function(b){var a=new Date(this.valueOf());a.setFullYear(a.getFullYear()+b);return a};