﻿// Copyright 2008 Naïs - Informatique & Télécom
// Small and unperfect part of AJAÏS Framework
// All rights reserved - email info@infonais.fr
var xmtca=null;var W= function (n,_3w,width,height,_3p,_3p1,_3b,mrz) { this.width=width; this.height=height; this._3w=_3w; this._3p=_3p; this._3p1=_3p1; this._3b=_3b; this.site=1;if ((this._3b)&&(this.site)) { this._11d=0; this._12r=0;} else {this._11d=1; this._12r=1;} this._13C=this; this.mrz=mrz; _15n++; _16p++; _16p++; this._18z=_16p; this.n='_20W'+_15n; this._20W=this; this._21E(); this._22F(); }; W.prototype._25i=function() {  this._27o = document.getElementsByTagName("body").item(0);  var _29t=this;  if (!(this._3b)) { this._33w = document.createElement("div"); this._33w.style.position='absolute'; this._33w.style.left=this._3p; this._33w.style.top=this._3p1; this._33w.style.width = this.width; this._33w.style.height = this.height; this._33w.style.zIndex=this._18z; this._27o.appendChild(this._33w); } else { this._33w=this._27o; }; this.debug = document.createElement("span"); this.debug.style.position = 'absolute'; this.debug.style.marginLeft='50%'; this.debug.style.marginTop='0%'; this.debug.style.zIndex='1000'; this.debug.style.color='black'; this._33w.appendChild(this.debug);  this._53f=this._53P._53E(this);  this._55d = document.createElement("div"); this._55d.style.position = 'absolute'; this._55d.style.left=brow?'100%':'100%'; this._55d.style.height=xxx+'px';this._55d.style.top=-xxx+'px';this._55d.style.margin='0'; this._55d.style.zIndex=this._18z+1;this._33w.appendChild(this._55d);  if ((this._11d)&&(xmtca==null)&&(this.mrz!=42)) { this._64w = document.createElement("img"); this._64w.src = ixdrag; this._64w.width=xxx;this._64w.height=xxx;this._64w.style.display='inline'; this._64w.style.border='0'; this._64w.style.cursor='pointer'; this._64w.style.margin='1px'; if (this.mrz==42) { this._64w.style.marginLeft=-(parseInt(this._64w.width)>0?parseInt(this._64w.width):10)+'px';}; this._55d.appendChild(this._64w);  if (this._3b) { var _73f=function(event) {_29t._73m(event||window.event);}; } else { var _73f=this._76i._53E(this); };  this._79a(this._64w,'mousedown',_73f, false);  this._79a(this._64w,'mousedown',this._53f, false); };  if (((this._3b)&&(this.site==0))||(this._605x!=null)||(this.mrz==41)) { this._86w = document.createElement("img"); this._86w.src = ixclose; this._86w.style.display='inline'; this._86w.style.cursor='pointer'; this._86w.style.border='0'; this._86w.style.margin='1px';this._86w.width=xxx;this._86w.height=xxx;this._55d.appendChild(this._86w); if (this.mrz==41) {this._55d.style.width=(xxx+2)*this._55d.childNodes.length+'px';};this._93f=function() {_29t._626D.call(_29t);}; this._79a(this._86w,'mousedown',this._93f, false); }; if (this._3w.length>0) { this._104w = document.createElement("img"); this._104w.style.position = 'absolute'; this._104w.style.left='0px'; this._104w.style.width = '100%'; this._104w.style.height = '100%'; this._104w.style.display= 'block'; this._104w.style.cursor= 'pointer'; this._104w.src = this._3w; this._104w.style.zIndex=this._18z; this._104w.onclick=_29t._53P._528D(_29t); this._33w.appendChild(this._104w); };  if (((this._12r)||((this._3b)&&(this._12r)))&&(xmtca==null)&&(this.mrz!=42)) { this._118w = document.createElement("img"); this._118w.style.position = 'absolute'; this._118w.style.top=brow?'100%':'100%'; this._118w.style.left=brow?'100%':'100%'; this._118w.src = ixresize; this._118w.width=xxx;this._118w.height=xxx;this._118w.style.zIndex=this._18z+1; this._118w.style.cursor='pointer';this._33w.appendChild(this._118w);  if (this._3b) { var _130f=this._130R; this._118w.style.zIndex='10000'; } else { var _130f=this._133i._53E(this); }; this._79a(this._118w,'mousedown',this._53f, false); this._79a(this._118w,'mousedown',_130f, false); };  if ((!(this._3b))||(this._3b==2)) { this._141s = document.createElement("div"); this._141s.w=this ; this._141s.style.position = 'absolute'; this._141s.className = '_141s'; this._141s.style.width = '90%'; this._141s.style.height = '90%'; this._141s.style.top = brow?'5%':'5%'; this._141s.style.marginLeft=brow?'-45%':'5%'; this._141s.style.zIndex=this._18z; this._141s.style.display = 'block'; this._33w.appendChild(this._141s);  this._152d = document.createElement("div"); this._152d.style.width = '100%'; this._152d.style.height = '100%'; this._141s.appendChild(this._152d);  this._157d = document.createElement("div"); this._157d.style.styleFloat = 'left'; this._157d.style.cssFloat = 'left'; this._157d.style.width = '100%'; this._157d.style.height = '100%'; this._157d.style.overflow = 'hidden'; this._152d.appendChild(this._157d);  this._165g = document.createElement("div"); this._165g.style.styleFloat = 'left'; this._165g.style.cssFloat = 'left'; this._165g.style.display = 'block'; this._165g.style.width = '100%'; this._165g.style.height = '100%'; this._165g.style.marginTop = '0px'; this._165g.style.marginLeft = '0px'; this._157d.appendChild(this._165g); }; this.width=this._33w.offsetWidth; };   W.prototype._179C=function(_13C,sc,enddropaction) { while (this._165g.firstChild) { this._165g.removeChild(this._165g.firstChild); };  this._165g.appendChild(_13C._397m);  this._186A(sc);  }; W.prototype._189d=function(_259e) { if(_259e.keyCode==13) { this.blur(); return true; }; return false; }; W.prototype._186A=function(sc) {  if (sc==1) { this._165g.style.marginLeft=this.width+'px'; } else { this._165g.style.marginLeft="0px"; };  if (this._3b) { this._208y=this._27o.offsetHeight; this._209x=this._27o.offsetWidth; } else { this._208y=this._141s.offsetHeight>0?this._141s.offsetHeight:this.height; this._209x=this._141s.offsetWidth>0?this._141s.offsetWidth:this.width; };  if (sc==1) { this.j=0; this._218E=0; if (this.t0) {clearInterval(this.t0);}; var _220f=this._220E._220D(this,0.2); this.t0=setInterval(_220f,10); };  };  W.prototype._220E=function(_227s) { var _227s=_227s; var d = new Date(); var _229p = 100; var _230s = this._209x;  if ( this._218E == 0 ) { this._218E = d.valueOf(); };  if (_227s) { _229p = (((d.valueOf()-this._218E)/1000)/_227s)*100; } else { clearInterval(this.t0); this._218E = 0; };  _230s=this._209x*Math.exp(1-_229p/100); this.j++;  if (_230s>=1) { this._165g.style.marginLeft=_230s+'px'; } else { this._165g.style.marginLeft='0px'; clearInterval(this.t0); this._218E = 0; } };  W.prototype._259w=function(_259f,_259e) { if (!_259e.relatedTarget) { _259f(_259e); } };  W.prototype._76i=function(_259e) {  if (_259e.preventDefault) { _259e.preventDefault(); }; _259e.returnValue = false;  this._273m=this._274g(_259e); this._274m=this._273g(_259e);  this._276g=this._276m(this._33w)-this._1000L(this._33w);  this._276g=this._274m-this._276g; this._276to=this._1002G(this._33w)-this._1001T(this._33w);this._276to=this._273m-this._276to; this._280f=this._280D._53E(this); this._281f=this._281e._53E(this); this._282g=this._259w._282E(this,this._281f); if (this.xt!='no') {this._323S();};  this._79a(this._27o,"mousemove",this._280f, false); this._79a(this._27o,"mouseup",this._281f, false); this._79a(window,"mouseout",this._282g, false); };  W.prototype._280D=function(_259e) {  if (_259e.preventDefault) { _259e.preventDefault(); }; _259e.returnValue = false;  var _297y=this._274g(_259e); var _298x=this._273g(_259e);  this._33w.style.top = _297y-this._276to+'px'; this._33w.style.left =_298x-this._276g+'px'; };  W.prototype._281e=function(_259e) { if (this.xt!='no') {this._305S();}; this._306d(this._27o,"mousemove",this._280f, false); this._306d(this._27o,"mouseup",this._281f, false); this._306d(window,"mouseout",this._282g, false); };  W.prototype._133i=function(_259e) { if (_259e.preventDefault) { _259e.preventDefault(); }; _259e.returnValue = false;  this._273m=this._274g(_259e); this._274m=this._273g(_259e);  this._320f=this._320W._53E(this); this._321f=this._321e._53E(this); this._322R=this._259w._282E(this,this._321f); if (this.xt!='no') {this._323S();};  this._79a(this._27o,"mousemove",this._320f, false); this._79a(this._27o,"mouseup",this._321f, false); this._79a(window,"mouseout",this._322R, false); };  W.prototype._320W=function(_259e) {  if (_259e.preventDefault) { _259e.preventDefault(); }; _259e.returnValue = false;  var _297y=this._274g(_259e); var _298x=this._273g(_259e);  if ((this._340g(this._33w)+_298x-this._274m>this.mrz)&&(this.getheight(this._33w)+_297y-this._273m)) { this._342s(this._33w,this._340g(this._33w)+_298x-this._274m); this._343s(this._33w,this.getheight(this._33w)+_297y-this._273m); } else { this._321e(); }; this.width=this._33w.offsetWidth; this._273m=this._274g(_259e); this._274m=this._273g(_259e); };  W.prototype._321e=function(_259e) { if (this.xt!='no') {this._305S();}; this._306d(this._27o,"mousemove",this._320f, false); this._306d(this._27o,"mouseup",this._321f, false); };    W.prototype._360A=function() { this._361W=new _595x(); this._20W._25i(); this._20W._13C=this._361W; this._20W._259f=this._20W._13C; this._361W._25i(this._20W); };  W.prototype._53P=function() { if ((_15n>1) && (!(this._3b)) && (this._18z<_16p)) { _16p++; _16p++; this._18z=_16p; this._33w.style.zIndex=_16p; } };  W.prototype._323S=function() { this._33w.style.opacity= '.5';if(!brow) {this._33w.style.filter= 'alpha(opacity=50)';}};  W.prototype._305S=function() { this._33w.style.opacity= '1'; this._33w.style.filter= 'alpha(opacity=100)'; if (brow) {this._33w.style.removeAttribute("filter");} }; var _595x = function() {};  _595x.prototype._25i=function(_390W) { this._391S=_390W._391S; this._79a=_390W._79a; this._306d=_390W._306d; this._340g=_390W._340g;  this._390W=_390W; this._397m = document.createElement("div"); this._397m.style.styleFloat = 'left'; this._397m.style.cssFloat = 'left'; this._397m.style.width = '100%'; this._397m.style.height = '100%'; };  W.prototype._21E=function() {  var _29t=this;  this._409n=function _409n(url) { window.open(url+'?n=popup_'+popup); popup++; };  this._73m=function _73m(_259e) { external.movewidget(_29t._273g(_259e),_29t._274g(_259e),0); };  this._130R=function _130R() { external.ResizeWidget(); };  this._93c=function _93c(_259e) { external.closeWidget(''); } };  W.prototype._22F=function() {  this._391S=function _391S(url,tab) { var xhr_object = null; var data = ''; if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest(); else if(window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); if (xhr_object) { xhr_object.open("POST", url, true);  for (i=0;i<tab.length;i++) { data += tab[i][0]+'='+tab[i][1]+'&'; }; xhr_object.setRequestHeader("_13C-type", "application/_209x-www-form-urlencoded"); xhr_object.send(data); return xhr_object; } };  this._79a=function _79a(objet, typeEvent, nomFunction, typePropagation){ if (objet.addEventListener) { objet.addEventListener(typeEvent, nomFunction, typePropagation); } else if (objet.attachEvent) { objet.attachEvent('on' + typeEvent, nomFunction); } };  this._306d=function _306d(objet, typeEvent, nomFunction, typePropagation){ if (objet.addEventListener) { objet.removeEventListener(typeEvent, nomFunction, typePropagation); } else if (objet.attachEvent) { objet.detachEvent('on' + typeEvent, nomFunction); } };  this._276m=function _276m(obj) { var curleft = curtop = 0; if (obj.offsetParent) { curleft = obj.offsetLeft; curtop = obj.offsetTop; while (obj = obj.offsetParent) { curleft += obj.offsetLeft; curtop += obj.offsetTop; } }; return curleft; };  this._340g=function _340g(obj) { return parseInt(obj.style.width.substr(0,obj.style.width.length-2)); };  this.getheight=function getheight(obj) { return parseInt(obj.style.height.substr(0,obj.style.height.length-2)); };  this.getmarginleft=function getmarginleft(obj) { return parseInt(obj.style.marginLeft.substr(0,obj.style.marginLeft.length-2)); };  this._342s=function _342s(obj,width) { obj.style.width=width+'px'; };  this._343s=function _343s(obj,height) { obj.style.height=height+'px'; };  this._274g=function _274g(_259e) { if (_259e.pageY) { return _259e.pageY; } else { return _259e.clientY; } };  this._273g=function _273g(_259e) { if (_259e.pageX) { return _259e.pageX; } else { return _259e.clientX; } }; this._1000L=function _1000L(obj) {return parseInt(obj.style.marginLeft.substr(0,obj.style.marginLeft.length-2));}; this._1001T=function _1001T(obj) {return parseInt(obj.style.marginTop.substr(0,obj.style.marginTop.length-2));};this._1002G=function _1002G(obj) {var curleft = curtop = 0;if (obj.offsetParent) {curleft = obj.offsetLeft;curtop = obj.offsetTop;while (obj = obj.offsetParent) {curleft += obj.offsetLeft;curtop += obj.offsetTop}};return curtop;};this._1003H=function _1003H(obj) {return parseInt(obj.style.height.substr(0,obj.style.height.length-2));};}; Function.prototype._282E=function(obj,obj2) { var f=this;return function(event) { f.call(obj,obj2,event||window.event); }};  Function.prototype._53E=function(obj) { var f=this;return function(event) { f.call(obj,event||window.event); }};  Function.prototype._528D=function(obj) { var f=this;return function() { f.call(obj); }};  Function.prototype._220D=function(obj,obj2) { var f=this;return function() { f.call(obj,obj2); }};  function Browstype() { if (self.innerHeight) {return 0;} else {return 1;}};  _595x.prototype.xInput=function(text,left,top,width,_259f,divcont,xalign,xwidth,xheight,ximgg,ximg,ximgd) {  var _29t=this;   this._539x = document.createElement("div"); this._539x.style.cssFloat = 'none'; this._539x.style.clear = 'both'; this._539x.style.padding='0'; this._539x.style.border='0'; this._539x.style.display='block'; divcont.appendChild(this._539x);  this._550x = document.createElement("span"); this._550x.style.background='url("'+ximgg+'") no-repeat'; this._550x.style.left=brow?'0':'0'; this._550x.style.width=xwidth; this._550x.style.height=xheight; this._550x.style.display=brow?'inline':'block'; this._550x.style.cssFloat = 'left'; if (!(brow)) {this._550x.style.marginLeft=-parseInt(parseInt(width.substr(0,width.length-2))/2)-parseInt(xwidth.substr(0,xwidth.length-2))+'px';}; this._539x.appendChild(this._550x);  this._560x = document.createElement("input"); this._560x.style.textAlign='left'; this._560x.style.verticalAlign='top'; this._560x.value=text; this._560x.style.textAlign=xalign; this._560x.style.fontSize='0.85em'; this._560x.style.height=xheight; this._560x.style.width=width; this._560x.style.background='url("'+ximg+'")'; this._560x.style.display=brow?'inline':'block'; this._560x.style.padding='0'; this._560x.style.marginTop=brow?'-1':'0'; this._560x.style.cssFloat = 'left'; this._560x.onchange= _259f;  if (brow) { this._560x.onkeydown = function(event) {_29t._390W._189d.call(this,event||window.event);}; }  this._560x.onmousedown = function() {this.value=text;}; if (!(brow)) {this._560x.style.marginLeft=-parseInt(parseInt(width.substr(0,width.length-2))/2)+'px';}; this._539x.appendChild(this._560x);  this._570x = document.createElement("span"); this._570x.style.background='url("'+ximgd+'") no-repeat'; this._570x.style.width=xwidth; this._570x.style.height=xheight; this._570x.style.display=brow?'inline':'block'; this._570x.style.cssFloat = 'left'; this._539x.appendChild(this._570x); this.type='input'; };  W.prototype._595M=function(text) { var hgt=this._27o.offsetHeight;var wdt=this._27o.offsetWidth; var dfthgt=250; var dftwdt=600; var lft=wdt>dftwdt?parseInt((wdt-dftwdt)/2):0; var tp=hgt>dfthgt?parseInt((hgt-dfthgt)/2):0; var ttext=[[text,text]]; var params=[]; xmtca=1; this._20W=new W('','./mtcimg/MTCAlert'+ext,dftwdt+'px',dfthgt+'px','50%','50%',0,0); this._20W._605x=this._20W; this._360A(); this._361W._607C(text); this._20W._179C(this._361W,1,{});this._20W._33w.style.marginLeft=-parseInt(dftwdt/2)+'px'; this._20W._33w.style.marginTop=-parseInt(dfthgt/2)+'px';xmtca=this._20W;};  _595x.prototype._607C=function(text) { var that=this._390W;  var _605x = document.createElement("div"); _605x.style.fontWeight = 'bold'; _605x.style.color = '#FFFFFF'; _605x.style.marginTop = '20px';_605x.innerHTML=text;this._397m.appendChild(_605x);this._306d(that._86w,'mousedown',that._93f, false);var _622f=function(e) {that._626D.call(that,e||window.e);that._306d(that._27o,"mousedown",_622f, true);};this._79a(this._390W._27o,"mousedown",_622f, true);};W.prototype._626D=function() {if (xmtca==this) {xmtca=null;};this._53P();_16p=this._18z==_16p?_16p-2:_16p;this._27o.removeChild(this._33w);while (this._13C._397m.firstChild) {this._13C._397m.removeChild(this._13C._397m.firstChild);};while (this._33w.firstChild) {this._33w.removeChild(this._33w.firstChild);}};
