function CreateMainPan(titre){var box=document.createElement("div");box.className="winPanel";var pan=document.createElement("div");pan.className="panelTitle";pan.appendChild(document.createTextNode(titre));box.appendChild(pan);return box;};function CreatePan(){var pan=document.createElement("div");pan.className="panel";return pan;};function applyPropsFromObj(o,pa){for(var i in pa)eval("o."+i+"=pa[i];");};function Popup(){this.win=null;this.titre=null;this.contenu=null;this.buttons=null;this.Open=function(titre,contenu,params){if(this.win==null){this.win=document.createElement("DIV");this.win.className="popup";var e=document.createElement("DIV");e.className="popupTitle";this.win.appendChild(this.titre=e);e=document.createElement("DIV");e.className="popupButtons";e.innerHTML='';this.win.appendChild(this.buttons=e);e=document.createElement("DIV");e.className="popupContent";this.win.appendChild(this.contenu=e);var b=document.getElementsByTagName("body")[0];b.insertBefore(this.win,b.firstChild);};if(this.win){this.titre.innerHTML=titre;this.contenu.innerHTML=contenu;}};this.Show=function(){if(this.win)this.win.style.display="block";};this.Hide=function(){if(this.win)this.win.style.display='none';};this.SetWidth=function(w){if(this.win)this.win.style.width=w;};this.SetHeight=function(h){if(this.win)this.win.style.height=h;};this.SetX=function(x){if(this.win)this.win.style.offsetX=x;};this.SetY=function(y){if(this.win)this.win.style.offsetY=y;};this.ShowFromEvent=function(evt){var docEl=document.documentElement;var body=document.body;var _evt=(evt)?evt:(window.event)?window.event:null;this._source=(_evt.target)?_evt.target:(_evt.srcElement)?_evt.srcElement:null;this.win.style.left=((_evt.pageX)?_evt.pageX:(docEl.scrollLeft)?(docEl.scrollLeft+_evt.clientX):(body.scrollLeft)?(body.scrollLeft+_evt.clientX):_evt.clientX)+"px";this.win.style.top=((_evt.pageY)?_evt.pageY:(docEl.scrollTop)?(docEl.scrollTop+_evt.clientY):(body.scrollTop)?(body.scrollTop+_evt.clientY):_evt.clientY)+"px";this.Show();};};function GetSelectedColorHex(evt){var hex="0123456789ABCDEF";var _evt=(evt)?evt:(window.event)?window.event:null;var _source=(_evt.target)?_evt.target:(_evt.srcElement)?_evt.srcElement:null;var rgbstr=_source.style.backgroundColor.replace(/([^0-9,]+)+/g,"").split(',');var str="#";var n="#";for(var i=0;i<3;i++){str+=hex.charAt(rgbstr[i]/16)+hex.charAt(rgbstr[i]%16);n+=hex.charAt(15-rgbstr[i]/16)+hex.charAt(15-rgbstr[i]%16);};return Array(str,_source.style.backgroundColor,n);};function GetColorValue(evt){var c=GetSelectedColorHex(evt);ColorPopup._source.style.backgroundColor=ColorPopup._source.value=c[0];ColorPopup._source.style.color=c[2];ColorPopup.Hide();};function HoverColor(evt){var e=document.getElementById("selcolor");var v=GetSelectedColorHex(evt);e.style.backgroundColor=v[1];e.style.color=v[2];e.innerHTML=v[0];};function InitColorPopup(){var i=0;var s="
";i++;};s+=" |