Object.extend=function(_1,_2,_3){for(prop in _2){if(_3==false&&_1[prop]!=null){continue;}_1[prop]=_2[prop];}return _1;};Object.extend(Function.prototype,{apply:function(o,a){var r,x="__fapply";if(typeof o!="object"){o={};}o[x]=this;var s="r = o."+x+"(";for(var i=0;i0){s+=",";}s+="a["+i+"]";}s+=");";eval(s);delete o[x];return r;},bind:function(o){if(!Function.__objs){Function.__objs=[];Function.__funcs=[];}var _a=o.__oid;if(!_a){Function.__objs[_a=o.__oid=Function.__objs.length]=o;}var me=this;var _c=me.__fid;if(!_c){Function.__funcs[_c=me.__fid=Function.__funcs.length]=me;}if(!o.__closures){o.__closures=[];}var _d=o.__closures[_c];if(_d){return _d;}o=null;me=null;return Function.__objs[_a].__closures[_c]=function(){return Function.__funcs[_c].apply(Function.__objs[_a],arguments);};}},false);Object.extend(Array.prototype,{push:function(o){this[this.length]=o;},addRange:function(_f){if(_f.length>0){for(var i=0;i<_f.length;i++){this.push(_f[i]);}}},clear:function(){this.length=0;return this;},shift:function(){if(this.length==0){return null;}var o=this[0];for(var i=0;i");}}if(window.frames&&window.frames[_2b]){this.iframe=window.frames[_2b];}this.iframe.name=_2b;this.iframe.document.open();this.iframe.document.write("");this.iframe.document.close();}this.method=_28;this.url=url;this.async=_2a;},setRequestHeader:function(_2d,_2e){for(var i=0;i=0){tag="textarea";}if(doc.all){ele=doc.createElement("<"+tag+" name=\""+_34+"\" />");}else{ele=doc.createElement(tag);ele.setAttribute("name",_34);}ele.setAttribute("value",_35);_33.appendChild(ele);ele=null;},send:function(_38){if(this.iframe==null){return;}var doc=this.iframe.contentDocument||this.iframe.document;var _3a=doc.createElement("form");doc.body.appendChild(_3a);_3a.setAttribute("action",this.url);_3a.setAttribute("method",this.method);_3a.setAttribute("enctype","application/x-www-form-urlencoded");for(var i=0;i=" "){if(c=="\\"||c=="\""){v.push("\\");}v.push(c);}else{switch(c){case "\n":v.push("\\n");break;case "\r":v.push("\\r");break;case "\b":v.push("\\b");break;case "\f":v.push("\\f");break;case "\t":v.push("\\t");break;default:v.push("\\u00");v.push(c.charCodeAt().toString(16));}}}return "\""+v.join("")+"\"";case Array:var v=[];for(var i=0;i0){return "{"+v.join(",")+"}";}return "{}";}return o.toString();}},dispose:function(){if(AjaxPro.queue!=null){AjaxPro.queue.dispose();}}},false);addEvent(window,"unload",AjaxPro.dispose);AjaxPro.Request=function(url){this.url=url;this.xmlHttp=null;};AjaxPro.Request.prototype={url:null,callback:null,onLoading:AjaxPro.noOperation,onError:AjaxPro.noOperation,onTimeout:AjaxPro.noOperation,onStateChanged:AjaxPro.noOperation,args:null,context:null,isRunning:false,abort:function(){if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}if(this.xmlHttp){this.xmlHttp.onreadystatechange=AjaxPro.noOperation;this.xmlHttp.abort();}if(this.isRunning){this.isRunning=false;this.onLoading(false);}},dispose:function(){this.abort();},getEmptyRes:function(){return {error:null,value:null,request:{method:this.method,args:this.args},context:this.context,duration:this.duration};},endRequest:function(res){this.abort();if(res.error!=null){this.onError(res.error,this);}if(typeof this.callback=="function"){this.callback(res,this);}},mozerror:function(){if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}var res=this.getEmptyRes();res.error={Message:"Unknown",Type:"ConnectFailure",Status:0};this.endRequest(res);},doStateChange:function(){this.onStateChanged(this.xmlHttp.readyState,this);if(this.xmlHttp.readyState!=4||!this.isRunning){return;}this.duration=new Date().getTime()-this.__start;if(this.timeoutTimer!=null){clearTimeout(this.timeoutTimer);}var res=this.getEmptyRes();if(this.xmlHttp.status==200&&this.xmlHttp.statusText=="OK"){res=this.createResponse(res);}else{res=this.createResponse(res,true);res.error={Message:this.xmlHttp.statusText,Type:"ConnectFailure",Status:this.xmlHttp.status};}this.endRequest(res);},createResponse:function(r,_4b){if(!_4b){var _4c=new String(this.xmlHttp.responseText);if(AjaxPro.cryptProvider!=null&&typeof AjaxPro.cryptProvider=="function"){_4c=AjaxPro.cryptProvider.decrypt(_4c);}if(this.xmlHttp.getResponseHeader("Content-Type")=="text/xml"){r.value=this.xmlHttp.responseXML;}else{if(_4c!=null&&_4c.trim().length>0){r.json=_4c;eval("r.value = "+_4c+"*/");}}}return r;},timeout:function(){this.duration=new Date().getTime()-this.__start;var r=this.onTimeout(this.duration,this);if(typeof r=="undefined"||r!=false){this.abort();}else{this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);}},invoke:function(_4e,_4f,_50,_51){this.__start=new Date().getTime();if(this.xmlHttp==null){this.xmlHttp=new XMLHttpRequest();}this.isRunning=true;this.method=_4e;this.args=_4f;this.callback=_50;this.context=_51;var _52=typeof _50=="function"&&_50!=AjaxPro.noOperation;if(_52){if(MS.Browser.isIE){this.xmlHttp.onreadystatechange=this.doStateChange.bind(this);}else{this.xmlHttp.onload=this.doStateChange.bind(this);this.xmlHttp.onerror=this.mozerror.bind(this);}this.onLoading(true);}var _53=AjaxPro.toJSON(_4f)+"";if(AjaxPro.cryptProvider!=null){_53=AjaxPro.cryptProvider.encrypt(_53);}this.xmlHttp.open("POST",this.url,_52);this.xmlHttp.setRequestHeader("Content-Type","text/plain; charset=utf-8");this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Method",_4e);if(AjaxPro.token!=null&&AjaxPro.token.length>0){this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Token",AjaxPro.token);}if(!MS.Browser.isIE){this.xmlHttp.setRequestHeader("Connection","close");}this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);try{this.xmlHttp.send(_53);}catch(e){}if(!_52){return this.createResponse({error:null,value:null});}return true;}};AjaxPro.RequestQueue=function(_54){this.queue=[];this.requests=[];this.timer=null;if(isNaN(_54)){_54=2;}for(var i=0;i<_54;i++){this.requests[i]=new AjaxPro.Request();this.requests[i].callback=function(res){var r=res.context;res.context=r[3][1];r[3][0](res,this);};this.requests[i].callbackHandle=this.requests[i].callback.bind(this.requests[i]);}};AjaxPro.RequestQueue.prototype={process:function(){this.timer=null;if(this.queue.length==0){return;}for(var i=0;i0;i++){if(this.requests[i].isRunning==false){var r=this.queue.shift();this.requests[i].url=r[0];this.requests[i].onLoading=r[3].length>2&&r[3][2]!=null&&typeof r[3][2]=="function"?r[3][2]:AjaxPro.onLoading;this.requests[i].onError=r[3].length>3&&r[3][3]!=null&&typeof r[3][3]=="function"?r[3][3]:AjaxPro.onError;this.requests[i].onTimeout=r[3].length>4&&r[3][4]!=null&&typeof r[3][4]=="function"?r[3][4]:AjaxPro.onTimeout;this.requests[i].onStateChanged=r[3].length>5&&r[3][5]!=null&&typeof r[3][5]=="function"?r[3][5]:AjaxPro.onStateChanged;this.requests[i].invoke(r[1],r[2],this.requests[i].callbackHandle,r);r=null;}}if(this.queue.length>0&&this.timer==null){this.timer=setTimeout(this.process.bind(this),10);}},add:function(url,_5b,_5c,e){this.queue.push([url,_5b,_5c,e]);if(this.timer==null){this.timer=setTimeout(this.process.bind(this),1);}},abort:function(){this.queue.length=0;if(this.timer!=null){clearTimeout(this.timer);}this.timer=null;for(var i=0;i7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var _spt=String.prototype;_spt.trim=function(blnIgnoreCarriage,blnIgnoreInnerWhiteSpace){var temp=this.replace(/^\s*/,"");temp=temp.replace(/\s*$/,"");blnIgnoreCarriage=blnIgnoreCarriage?true:false;blnIgnoreInnerWhiteSpace=blnIgnoreInnerWhiteSpace?true:false;if(blnIgnoreCarriage&&blnIgnoreInnerWhiteSpace){;}else if(blnIgnoreCarriage&& !blnIgnoreInnerWhiteSpace){temp=temp.replace(/\t+/g," ");temp=temp.replace(/ +/g," ");}else if(!blnIgnoreCarriage&&blnIgnoreInnerWhiteSpace){temp=temp.replace(/(\n\r)+/g,"");}else if(!blnIgnoreCarriage&& !blnIgnoreInnerWhiteSpace){temp=temp.replace(/\s+/g," ");}if(temp==" "){temp="";}return temp;};_spt.removeTags=function(){var regEx=/<[\/]?([a-zA-Z0-9]+)[^>^<]*>/ig;return this.replace(regEx,"");};function InitializeCaptcha(){/*if(document.getElementById("captcha")!=null){var code=Soda.Ajax.Captcha.GenerateCode().value;document.getElementById("captcha").src="/scripts/captcha.aspx?t="+code;document.getElementById("ecode").value=code;document.getElementById("txtUserInput").value="";}*/};function CaptchaOnSubmit(){/*var ecode=document.getElementById("ecode").value;var inp=document.getElementById("txtUserInput").value;var ret=Soda.Ajax.Captcha.CheckCaptchaCode(ecode,inp);if(!ret.value){alert("Invalid captcha input");}return ret.value;*/return true;}; function GoToVideosPage(i){CP=i; var s=Soda.Ajax.Videos.GetVideosPage(IDNav,Tag,i,SortOrder).value;document.getElementById("VideoList").innerHTML=s;} function GoToVidPageBV(i){CP=i; top.location.href="http://www.bnjmultimedia.ch/scripts/modules/videos/listall.aspx?idn="+IDNav+"&pg="+CP+"&bv="+bv+"&tag="+Tag; /* var s=Soda.Ajax.Videos.GetVideosPageBV(IDNav,Tag,i,SortOrder,bv).value;document.getElementById("VideoList").innerHTML=s; */ } function GoToCommentsPage(i){document.getElementById("CommentsList").innerHTML=Soda.Ajax.Videos.GetCommentsPage(VideoID,IDNav,Tag,i).value;} function LoadDetailPage(i){top.location.href="http://www.bnjmultimedia.ch/scripts/modules/videos/listall.aspx?idn="+IDNav+"&vid="+i+"&pg="+CP+"&bv="+bv+"&tag="+Tag; /*document.getElementById("VideoBox").innerHTML=Soda.Ajax.Videos.GetDetailPage(i).value;VideoOnLoad();VideoID=i;*/}; function AddCommentA(){if(!CaptchaOnSubmit())return;var txtName=document.getElementById("txtNameAC").value.removeTags().trim();var txtEmail=document.getElementById("txtEmailAC").value.removeTags().trim();var txtWeb=document.getElementById("txtWebAC").value.removeTags().trim();var txtMessage=document.getElementById("txtMessageAC").value.removeTags().trim();var t=Soda.Ajax.Videos.AddComment(IDNav,VideoID,txtName,txtEmail,txtWeb,txtMessage);if(t.value!=true)alert(t.value);else{alert("Le commentaire a été ajouté avec succès");document.getElementById("txtNameAC").value="";document.getElementById("txtEmailAC").value="";document.getElementById("txtWebAC").value="";document.getElementById("txtMessageAC").value="";InitializeCaptcha();GoToCommentsPage(1);}};function AddCommentL(){ var txtMessage=document.getElementById("txtMessageL").value.removeTags().trim();var t=Soda.Ajax.Videos.AddComment(IDNav,VideoID,"","","",txtMessage);if(t.value!=true)alert(t.value);else{alert("Le commentaire a été ajouté avec succès");document.getElementById("txtMessageL").value="";GoToCommentsPage(1);}}; function GoToVidPageBVP(i){GoToVidPageBV(i-1);} function GoToVidPageBVN(i){GoToVidPageBV(i+1);} function GoToVideosPageP(i){GoToVideosPage(i-1);} function GoToVideosPageN(i){GoToVideosPage(i+1);} function GoToCommentsPageP(i){GoToCommentsPage(i-1);}function GoToCommentsPageN(i){GoToCommentsPage(i+1);};function TabClick(box,bid){if(bid!=null){tabs=document.getElementById(box).getElementsByTagName('a');for(i=0;i