var it_Accordion=function(h,j){j=$extend({cssPrefix:null,separatorEnabled:true},j);var n=this;var g=[];var m=-1;var f,e,s,a;var p,o,k,b,t;var c;var l=true;var r=function(){it_ComponentUtils.init(n,h,j);p=new Element("div");p.setStyle=function(v,u){if(v=="zIndex"){s=u;d()}};o=new Fx.Tween(p,{property:"zIndex",duration:500,unit:null,transition:Fx.Transitions.Quad.easeOut,onComplete:function(){e=s=null}});b=new it_Timer(300,function(){n.openPanel(k.index)});t=new it_Timer(1000,function(){n.closePanel()})};this.addPanel=function(z,E){z=$(z);E=$extend({id:z.getProperty("id"),initialClosedHeight:20,separatorEnabled:true,triggerMode:"mouseOver",useScrollPane:false},E);var B=g.length;var A=null;if(B!=0&&j.separatorEnabled){A=new Element("div",{"class":j.cssPrefix.getClass(["Separator","Separator"+B]),styles:{position:"relative",width:n._width,fontSize:1}});A.inject(n.canvas);if(m==-1){m=A.getHeight();if(!(m>0)){throw new Error('The separator class must have the height property set, with class: "'+A.className+'"')}}}z.setWidth(n._width);var C=z.getHeight();var y;if(E.useScrollPane){var w=new Element("div",{styles:{width:n._width,height:C}});var x=new it_ScrollPane(w);x.setContent(z);x.forceScrollBarVisibility(false);y=w}else{z.setStyle("overflow","hidden");y=z}y.inject(n.canvas);if(!(C>0)){throw new Error("The panel Element must have its height set.")}var u={content:y,index:B,id:E.id,openHeight:C,initialClosedHeight:E.initialClosedHeight,scrollPane:x,separatorElement:A};g.push(u);if(u.id!=null){g[u.id]=u}if(j.triggerMode=="mouseOver"){y.addEvents({mouseover:function(){if(l){k=u;b.start();t.stop()}},mouseout:function(){if(l){k=null;b.stop();t.start()}}})}else{y.addEvent("click",function(){n.openPanel(u.id)})}f=[];a=n._height-(g.length-1)*m;var v=0;g.forEach(function(F){v+=F.initialClosedHeight});if(v>a){var D=a-v;g.forEach(function(F,G){if(G<g.length-1){var I=it_Utils.changeScale(0,v,F.initialClosedHeight,0,1);var H=(D*I).toInt();f.push(F.initialClosedHeight-H)}})}else{g.forEach(function(F,G){if(G<g.length-1){f.push(F.initialClosedHeight)}})}q(f);d();return this};this.openPanel=function(A){b.stop();t.stop();var v=g[A];if(v==c){return}var z=c;c=v;var u=c.openHeight;var x=f[c.index];if(x>u){u=x}else{u=Math.min(u,a)}e=[];var w=a-u;var y=0;f.forEach(function(B,C){if(C!=c.index){y+=B}});g.forEach(function(C,D){if(D<g.length-1){if(C==c){e.push(u)}else{var E=it_Utils.changeScale(0,y,f[D],0,1);var B=(w*E).toInt();e.push(B)}if(C.scrollPane){C.scrollPane.forceScrollBarVisibility(C==c?undefined:false)}}});q(e);o.start(0,100);if(z!=null){n.fireEvent("panelClosed",[z.index,z.id])}n.fireEvent("panelOpened",[v.index,v.id])};this.closePanel=function(){b.stop();t.stop();if(c==null){return}if(c.scrollPane){c.scrollPane.forceScrollBarVisibility(false)}e=f;o.start(0,100);n.fireEvent("panelClosed",[c.index,c.id]);c=null};var q=function(w){var v=0;w.forEach(function(x){v+=x});var u=a-v;w.push(u);return u};var d=function(){var u=[];if(e!=null){g.forEach(function(v,w){if(w<g.length-1){var x=v.content.getHeight();u[w]=Math.floor(it_Utils.changeScale(0,100,s,x,e[w])+0.5)}q(u)})}else{u=f}g.forEach(function(v,w){v.content.setHeight(u[w])})};this.setEventsEnabled=function(u){l=u};r()};var it_PropertiesAccordion=function(e,d){d=$extend({cssPrefix:"propertiesAccordion"},d);var c=this;var a;var b;var f=true;var g=function(){it_ComponentUtils.init(c,e,d);var k=d.cssPrefix.createChild("ButtonBar");var l=k.getWidth(true);var h=new Element("div",{"class":k.getClass()}).inject(c.canvas);var j=new Element("div",{"class":d.cssPrefix.getClass(),styles:{width:c._width-l}}).inject(c.canvas);it_ComponentUtils.horizontalLayout(c.canvas,{mode:"resizeLastChild"});b=new it_AutoButtonBar(h,{cssPrefix:k,orientation:"vertical",beginDivEnabled:false,endDivEnabled:false});a=new it_Accordion(j,{cssPrefix:d.cssPrefix});a.addEvent("panelOpened",function(n,p){var o=b.getButton(n);o.fade(true,false);c.fireEvent("panelOpened",[n,p])});a.addEvent("panelClosed",function(n,p){var o=b.getButton(n);o.fade(false,false);c.fireEvent("panelClosed",[n,p])});var m=new it_Timer(1000,function(){if(f){a.closePanel()}else{m.start()}});c.canvas.addEvent("mouseover",function(){m.stop()});c.canvas.addEvent("mouseout",function(){m.start()})};this.addPanel=function(k,j){k=$(k);j=$extend({buttonText:null},j);var l=b.getButtonCount();var h=b.addButton({cssPrefix:d.cssPrefix.createChild("Button"),text:j.buttonText});h.addEvent("activation",function(){a.openPanel(l)});if(j.initialClosedHeight==null){j.initialClosedHeight=h.canvas.getHeight()}a.addPanel(k,j);return this};this.end=function(){b.end()};this.setEventsEnabled=function(h){f=h;a.setEventsEnabled(h)};this.getAccordion=function(){return a};g()};function it_AutoComplete(a,n){n=$extend({queryUrl:null,queryParameter:"query",queryFunction:null,charactersPreventingQuery:"[],",closeTimeOut:3000,width:250},n);var m=this;a=$(a);var c=false;var b=3;var d=null;if((n.queryUrl==null||n.queryParameter==null)&&n.queryFunction==null){throw new Error("Query source not found. You must set the queryUrl and queryParameter options, or the queryFunction option")}var e;var h=null;var j;var l=function(){e=new it_Timer(200,function(){g()},{autoCancel:true});a.setProperty("autocomplete","off");a.addEvent(it_Utils.getKeyEventType(),function(p){p=new Event(p);if(!p.shift){switch(p.key){case"enter":if(j.isOpen()){if(j.getSelectionIndex()!=-1){j.lineSelected()}else{j.close()}p.stop()}return;case"up":case"down":if(a.value!=d){g()}else{if(d==null){break}else{if(!j.isOpen()){j.open()}else{if(p.key=="up"){j.selectPreviousLine()}else{j.selectNextLine()}}}}p.stop();return;case"esc":j.close();return}}}).addEvent("keyup",function(p){p=new Event(p);if(p.key!="enter"&&p.key!="esc"){e.start()}}).addEvent("mousedown",function(p){if(c){g()}});var o=new it_CompoundFocus(a).addEvents({focus:function(){c=true},blur:function(){c=false;j.close()}});n.triggerElement=a;n.compoundFocus=o;j=new it_PopupMenu(n);j.addEvents({closed:function(){e.stop();if(h!=null){h.cancel()}},lineSelected:function(q,p){a.value=q}});if(n.queryFunction==null){h=new it_AjaxService(n.queryUrl,{data:{cmd:"suggest"},autoCancel:true,onComplete:function(p){k(p)}})}};var g=function(){if(!c||(!it_StringUtils.isIdeograph(a.value)&&a.value.length<b)){j.close()}else{if(a.value==d){j.open()}else{valid=false;f()}}};var f=function(){d=a.value;if(n.charactersPreventingQuery!=null){for(var o=0;o<n.charactersPreventingQuery.length;o++){var q=n.charactersPreventingQuery.charAt(o);if(d.contains(q)){k([]);return}}}if(h!=null){var p=new Object();p[n.queryParameter]=d;h.send(p)}else{k(n.queryFunction(d))}};var k=function(o){n.popupMenuBuilder.setData(o);if(!c){return}j.popupMenuChanged()};l()}var it_AutoButton=function(b,c){c=$extend({name:null,activationTime:0,fadeTime:500,cssPrefix:"Button",layerCreationFunc:null,text:null,createForeground:false,opacityChanged:$empty},c);var k=this;var t=null;var s,a;var u;var j;var q;var g=c.activationTime>0;var f=false;var m="test";var p=function(){b=it_ComponentUtils.init(k,b,c);s=$splat(e(false));s.forEach(function(v){v.inject(b)});a=$splat(e(true));a.forEach(function(v){v.inject(b)});t=new Element("div",{"class":c.cssPrefix.getClass("Event"),styles:{opacity:0.01,backgroundColor:"#ffffff"},events:{click:d}}).inject(b);t.addEvents({mouseover:l,mouseout:h});u=new Fx({duration:g?c.activationTime:400,transition:Fx.Transitions.linear,onComplete:n});j=new Fx({duration:c.fadeTime,transition:Fx.Transitions.linear});u.set=j.set=r;k.doLayout()};var r=function(v){for(var w=0;w<a.length;w++){s[w].set("opacity",1-v)}for(var w=0;w<a.length;w++){a[w].set("opacity",v);c.opacityChanged(1-v,q)}};var e=function(y){if(c.layerCreationFunc){return c.layerCreationFunc(y,k,c)}var A=y?"Off":"On";var x=y?c.backgroundColorOff:c.backgroundColorOn;var z=[];var v=new Element("div",{"class":c.cssPrefix.getClass(A)});z.push(v);if(c.createForeground){var w=new Element("div",{"class":c.cssPrefix.getClass("Overlay"+A)});z.push(w)}if(c.text!=null){new Element("span",{html:"&nbsp;"+c.text}).inject(v)}if(x!=null){v.setStyle("backgroundColor",x)}return z};this.doLayout=function(){it_ComponentUtils.allChildrenAbsoluteAllOverParent(k.canvas)};var n=function(){if(m!=null){m()}};this.fade=function(v,w){if(f!=v){o(v,w);if(v){q=false;j.start(1,0)}else{q=true;j.start(0,1)}}};this.getState=function(){return f};this.getEventElement=function(){return t};this.setState=function(w){var v=w?0:1;q=null;r(v);f=w};var l=function(){if(j.timer){return}u.pause();if(!f){q=false;if(g){u.options.duration=c.activationTime;u.start(1,0);m=function(){o(true,true)}}else{u.options.duration=400;u.start(1,0.6);m=null}}};var h=function(){if(!f){u.pause();u.options.duration=200;q=true;u.start(a[0].get("opacity"),1);m=null}};var d=function(){if(j.timer){return}u.pause();if(!f){k.setState(true);o(true,true)}};var o=function(v,w){f=v;if(w==null||w){if(f){k.fireEvent("activation",c.name)}}};p()};var it_AutoButtonBar=function(b,j){j=$extend({cssPrefix:"ButtonBar",orientation:"vertical",separatorEnabled:true,beginDivEnabled:true,endDivEnabled:true,animatedOverlays:false},j);j.orientation=j.orientation.toLowerCase();var h=this;var c;var e;var d;var f=[];var g=function(){b=it_ComponentUtils.init(h,b,j);h.invalidationEnabled=false;var k=it_ComponentUtils.createAbsoluteDiv(j.cssPrefix.getClass("Content"),h.canvas);c=it_ComponentUtils.createAbsoluteDiv(null,k);it_ComponentUtils.absoluteAllOverParent(k);it_ComponentUtils.absoluteAllOverParent(c);e=j.orientation=="vertical"?"height":"width";d=j.orientation=="vertical"?it_ComponentUtils.verticalLayout:it_ComponentUtils.horizontalLayout;if(j.beginDivEnabled){var l=j.cssPrefix.createChild("Begin");if(a(l)){new Element("div",{"class":l.getClass()}).inject(c)}}};this.doLayout=function(){it_ComponentUtils.allChildrenAbsoluteAllOverParent(b);it_ComponentUtils.absoluteAllOverParent(c);d(c,{mode:"leaveEmptySpace"})};var a=function(k){return k.getNumericStyle(e)!=null};this.addButton=function(p){p=p||{};var l=f.length;if(p.cssPrefix===undefined){p.cssPrefix=j.cssPrefix.createChild("Button")}if(p.separatorCssPrefix===undefined){p.separatorCssPrefix=j.cssPrefix.createChild("Separator")}var v=["",""+l];p=$merge(p,{cssPrefix:p.cssPrefix.createChild(v),separatorCssPrefix:p.separatorCssPrefix.createChild(v)});if(l>0&&j.separatorEnabled){if(a(p.separatorCssPrefix)){new Element("div",{"class":p.separatorCssPrefix.getClass(),styles:{position:"relative",fontSize:1}}).inject(c)}}if(j.animatedOverlays){var n=it_ComponentUtils.createAbsoluteDiv(p.cssPrefix.getClass(["BarOverlay","BarOverlay100"]),b).setStyle("visibility","hidden");var u=[];for(var r=0;r<4;r++){var q=Math.pow(2,r)*10;var t=it_ComponentUtils.createAbsoluteDiv(p.cssPrefix.getClass(["BarOverlay","BarOverlay"+q]),b).setStyle("visibility","hidden");u.push(t)}var m=0;p.opacityChanged=function(w,y){var x=Math.round(w*10);if(x!=m){m=x;if(x===10){u.forEach(function(A){A.style.visibility="hidden"});n.style.visibility="visible"}else{var z=x.toString(2);u.forEach(function(B,A){var C=z.charAt(z.length-1-A)==="1";B.style.visibility=C?"visible":"hidden"});n.style.visibility="hidden"}}}}var k=it_ComponentUtils.createAbsoluteDiv(p.cssPrefix.getClass(["",p.name]),c);var o=j.orientation==="vertical"?"width":"height";k.setStyle(o,b.getStyle(o));var s=new it_AutoButton(k,p);s.addEvent("activation",function(){f.map(function(x,w){if(w===l){return null}else{if(w===l-1){return"BottomRightShadow"}else{if(w===l+1){return"TopRightShadow"}else{return"RightShadow"}}}});h.setStateOfAll(false,l)});f.push(s);return s};this.addFiller=function(n){var m;if(!n||!n.cssPrefix){m=j.cssPrefix.getClass("Button")}else{m=n.cssPrefix.getClass()}var l=it_ComponentUtils.createAbsoluteDiv(m,c);var k=j.orientation==="vertical"?"width":"height";l.setStyle(k,b.getStyle(k))};this.end=function(){var l=[];f.forEach(function(n){l.push(n.getEventElement())});var k=it_ComponentUtils.createAbsoluteDiv(j.cssPrefix.getClass("Overlay"),b);new it_Overlay(k,l);if(j.endDivEnabled){var m=j.cssPrefix.createChild("End");if(a(m)){new Element("div",{"class":m.getClass()}).inject(h.canvas);h.doLayout()}}this.invalidationEnabled=true;this.doLayout()};this.setStateOfAll=function(l,k){f.forEach(function(n,m){if(k===undefined||m!=k){n.fade(l,false)}})};this.getButtonCount=function(){return f.length};this.getButton=function(k){return f[k]};g()};var it_Carousel=function(e,f){f=$extend({cssPrefix:null,images:null,delay:4000},f);if(f.images==null){throw new Error("Missing options.images")}var p;var a;var s,G,u,x,D,E,q,r,l,H,k,j;var z,w,t;var b=0;var m,g;var c,o;var C;var B;var y=this;var F=function(){e=it_ComponentUtils.init(y,e,f);a=f.images.map(function(J){if(J.width<=0){console.log("Missing width in image with src: "+J.src+". The container width is used.")}if(J.height<=0){console.log("Missing height in image with src: "+J.src+". The container height is used.")}return{width:J.width,height:J.height}});p=f.images.map(function(J){return J.dispose()});s=new Element("div",{"class":f.cssPrefix.getClass("Container"),styles:{overflow:"hidden"}}).inject(e);G=new Element("div",{"class":f.cssPrefix.getClass("SlidingContent"),styles:{position:"absolute",left:0}}).inject(s);m=new Fx.Tween(G,{property:"left",duration:400,transition:Fx.Transitions.Cubic.easeOut,link:"cancel"});p.forEach(function(J){J.setStyle("position","absolute").inject(G)});u=new Element("div",{"class":f.cssPrefix.getClass("Controls"),styles:{position:"absolute",left:0}}).inject(s);x=new Fx.Tween(u,{property:"top",duration:400,transition:Fx.Transitions.Cubic.easeOut,link:"cancel"});j=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass("DotBackground"),u);g=new Fx.Tween(j,{property:"left",duration:400,transition:Fx.Transitions.Cubic.easeOut,link:"cancel"});D=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["NoDot","LeftNoDot"]),u);q=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["Arrow","LeftArrow"]),D).addEvent("click",function(){d()});l=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["Separator","LeftSeparator"]),D);k=p.map(function(K,J){return it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass("Dot"),u).addEvent("click",function(){v(J)})});E=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["NoDot","RightNoDot"]),u);r=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["Arrow","RightArrow"]),E).addEvent("click",function(){A()});H=it_ComponentUtils.createAbsoluteDiv(f.cssPrefix.getClass(["Separator","RightSeparator"]),E);e.set("events",{mouseenter:n,mouseleave:I});B=new it_Wrapper9(e,{cssPrefix:f.cssPrefix.createChild("Frame"),handlesLayout:false});y.onStylesReady(function(){y.doLayout();h()})};var h=function(){C=new Chain().wait(f.delay).chain(function(){A(h)});C.callChain()};var A=function(J){b++;if(b==p.length){b=0}v(b,J)};var d=function(J){b--;if(b<0){b=p.length-1}v(b,J)};var v=function(J,K){b=J;m.start(-J*z);g.start(c+J*o);if(K){m.chain(K)}};this.doLayout=function(){B.doLayout();it_ComponentUtils.absoluteAllOverParent(s);t=u.getHeight("Missing controls height in css");z=s.getWidth();w=s.getHeight("Missing container height in css");x.set(w);var M=q.getWidth("Missing left arrow width in css");var L=r.getWidth("Missing right arrow width in css");o=k[0].getWidth("Missing dot width in css");var K=(z-M-L-o*k.length)/2;c=M+K;u.setWidth(z);D.setWidth(M+K);l.setStyles({left:M,width:K});E.setStyles({left:z-L-K,width:L+K});H.setWidth(K);r.setStyle("left",K);k.forEach(function(O,P){O.setStyle("left",c+P*o)});g.set(c+b*o);it_ComponentUtils.centerVerticallyAllChildren(u);it_ComponentUtils.centerVerticallyAllChildren(D);it_ComponentUtils.centerVerticallyAllChildren(E);var J=s.getHeight();var N={left:0,top:0,width:z,height:J};p.forEach(function(T,Q){N.left=z*Q;var S=a[Q];var P=S.width;var O=S.height;if(P<=0){P=z}if(O<=0){O=J}var R=it_PositionUtils.fit(N,S.width,S.height,"center");T.setStyles({left:R.left,top:R.top,width:R.width,height:R.height})})};var n=function(J){C.clearChain();C=null;x.start(w-t)};var I=function(){if(C==null){h();x.start(w)}};F()};var it_CheckBoxGroup=function(a,r){r=$extend({cssPrefix:"checkBoxGroup",columnCount:2,useScrollPane:true},r);var q=this;var k,b;var l,m,c;var h,o;var p=function(){a=it_ComponentUtils.init(q,a,r);if(r.allItem||r.noneItem){k=new Element("div",{"class":r.cssPrefix.getClass("Header")}).inject(a);var u;if(r.allItem){l=g(r.allItem,false);l.element.setWidth(r.noneItem?a.getWidth()/2:a.getWidth());l.element.inject(k);u=l.element.getHeight()}if(r.noneItem){m=g(r.noneItem,false);m.element.setWidth(r.allItem?a.getWidth()/2:a.getWidth());m.element.inject(k);if(u==null){u=m.element.getHeight()}}k.setHeight(u);it_ComponentUtils.horizontalLayout(k,{mode:"resizeContainer"});k.setWidth(k.getWidth()+1);it_LayoutUtils.centerHorizontally(k)}b=new Element("div",{"class":r.cssPrefix.getClass("Body")}).inject(a);c=[];r.data.forEach(function(x){var w=g(x,true);w.element.inject(b);c.push(w)});it_ComponentUtils.verticalLayout(a);it_LayoutUtils.columnLayout(b,{columnCount:r.columnCount,mode:"resizeContainer"});if(r.useScrollPane){var v=new Element("div",{styles:{width:b.getWidth(),height:b.getHeight()}});var t=new it_ScrollPane(v);b.dispose();t.setContent(b);v.inject(a)}var s=b.getHeight();if(k){s+=k.getHeight()}a.setHeight(s)};var g=function(s,t){return new e(s,t)};this.doLayout=function(){if(r.useScrollPane){it_ComponentUtils.verticalLayout(a,{mode:"resizeLastChild"})}it_LayoutUtils.columnLayout(b,{columnCount:r.columnCount});it_Utils.forEach([l,m,c],function(s){s.doLayout()})};var e=function(s,w){this.itemData=s;var u=this;var x=false;var t=false;var v;this.element=undefined;var y=function(){var A=w?"Item":["Item","HeaderItem"];var C=new Element("div",{"class":r.cssPrefix.getClass(A)});u.element=C;var z=new Element("div").inject(C);v=new it_Checkbox(z,{cssPrefix:["stdCheckBox",r.cssPrefix.getClassArray("CheckBox")],events:{stateChanged:function(){f(u)}}});var B=new Element("div",{overflow:"ellipsis",text:s[1]}).inject(C);if(w){it_PopupUtils.link("Uniquement "+s[1],B,{mode:"info"});B.addEvent("click",function(){n(u)})}else{B.addEvent("click",function(){u.setChecked(!u.isChecked());f(u)})}};this.doLayout=function(){var z={alignment:"center",gap:5};it_ComponentUtils.horizontalLayout(this.element,z)};this.isChecked=function(){return v.getStateBoolean()};this.setChecked=function(z){v.setState(z,false);t=false};this.setSingleState=function(z){t=z};this.isSingleState=function(){return t};this.saveState=function(){x=this.isChecked()};this.restoreState=function(){this.setChecked(x);this.setSingleState(false)};y()};var n=function(s){if(s.isSingleState()){j()}else{d();h=o=false;if(l){l.setChecked(false)}if(m){m.setChecked(false)}c.forEach(function(t){t.setChecked(t===s);if(t===s){t.setSingleState(true)}})}q.fireEvent("modified")};var f=function(s){if(s===l){if(s.isChecked()){d();h=true;o=false;if(m){m.setChecked(false)}c.forEach(function(t){t.setChecked(true)})}else{j()}}else{if(s===m){if(s.isChecked()){d();o=true;h=false;if(l){l.setChecked(false)}c.forEach(function(t){t.setChecked(false)})}else{j()}}}h=true;o=true;c.every(function(t){if(t.isChecked()){o=false}else{h=false}return h||o});if(l){l.setChecked(h)}if(m){m.setChecked(o)}q.fireEvent("modified")};var d=function(){c.forEach(function(s){s.saveState()})};var j=function(){c.forEach(function(s){s.restoreState()})};this.getState=function(){var t=[];var s=[];c.forEach(function(u){(u.isChecked()?t:s).push(u.itemData)});return{all:h,none:o,checked:t,unchecked:s}};p()};var it_ColorPickerSingleton=function(s){s=$extend({imgDir:it_basePath+"img/components/colorPicker"},s);if(!it_StringUtils.endsWith(s.imgDir,"/")){s.imgDir=s.imgDir+"/"}var x;var D;var k;var a;var c;var h;var z,p,u,y,B,l,L,I,d,v;var e;var f;var w;var J,O,P;var j=-1;var N=-1;var o=-1;var A;var M=function(){var Q="<style>#pickerPanel {	width: 333px;	height: 199px;	FONT: bold 10px Arial, Helvetica, sans-serif;	color: #333;	line-height: 14px;	margin: 0;	BORDER: 1px solid #000000;	VISIBILITY: hidden;}/* slider */.dragPanel {	position: relative;	background-color: #efeeed;	margin: 4px;	width: 260px;	height: 180px;}#pickervaldiv input, #pickerButtons input {	font-size: .85em;	BORDER: 1px solid #000000;}#pickerButtons input {	BORDER-LEFT-COLOR:#999999;	BORDER-TOP-COLOR:#999999;}.thumb {	cursor:default;	width:18px;	height:18px;	z-index: 9;	position:absolute;}.bg {	position:absolute;	left:10px;	height:18px;	width:146px;	border: 0px solid #aaaaaa;}.bg span, .bg p {	cursor:default;	position: relative;	font-size: 2px;	overflow: hidden;	color: #aaaaaa;	top: 4px;	height: 10px;	width: 4px;	display: block;	float:left;}.bg span {	border-top:1px solid #cccccc;	border-bottom:1px solid #cccccc;}.bg .lb {	border-left:1px solid #cccccc;}.bg .rb {	border-right:1px solid #cccccc;}#valdiv {	position:absolute;	top: 100px;	left:10px;}#rBG {	top:30px;}#gBG {	top:50px;}#bBG {	top:70px;}#rgbSwatch {	position:absolute;	left:160px;	top:34px;	height:50px;	width:50px;	border:1px solid #aaaaaa;}#rgbPanel {	width: 360px;	height: 240px;}/* picker */#hueThumb {	cursor:default;	width:28px;	height:14px;	z-index: 9;	position:absolute;	left: -5px;}#hueBg {	position:absolute;	left:198px;	height:198px;	width:23px;	background-repeat: no-repeat;}#pickerDiv {	position:absolute;	left:3px;	height:187px;	width:188px;	/*	background-repeat: no-repeat;	*/	top:2px;}#selector {	cursor:default;	width:11px;	height:11px;	z-index: 9;	position:absolute;}#pickerSwatch, #pickerWitness {	position:absolute;	right:8px;	top:8px;	height:30px;	width:99px;	border:1px solid #000000;}#pickerSwatch {	BORDER-BOTTOM: 0px;}#pickerWitness {	BORDER-TOP: 0px;	top:38px;}#pickervaldiv, #pickerButtons {	position:absolute;	top: 80px;	right: 8px;	text-align:right;	LINE-HEIGHT: 20px;}#pickerButtons {	top: 171px;}.pickerButton {	WIDTH: 49px;	CURSOR: pointer;}</style>";document.write(Q);var g='<div id="pickerDiv">	<div id="selector"></div></div><div id="hueBg">	<div id="hueThumb"></div></div><div id="pickervaldiv">	<form id="pickerform" name="pickerform" onsubmit="return pickerUpdate()">	<span title="Rouge"     >R:</span> <input name="pickerrval" id="pickerrval" type="text"/>	<span title="Tonalité"  >H:</span> <input name="pickerhval" id="pickerhval" type="text"/><br/>	<span title="Vert"      >G:</span> <input name="pickergval" id="pickergval" type="text"/>	<span title="Saturation">S:</span> <input name="pickergsal" id="pickersval" type="text"/><br/>	<span title="Bleu"      >B:</span> <input name="pickerbval" id="pickerbval" type="text"/>	<span title="Luminosité">V:</span> <input name="pickervval" id="pickervval" type="text"/><br/>	# <input name="pickerhexval" id="pickerhexval" type="text" value="0" size="6" maxlength="6"/>	</form></div><div id="pickerButtons">	<input type="button" id="pickerOkButton" value="Ok" class="pickerButton"/><input type="button" id="pickerCancelButton" value="Annuler" class="pickerButton"/></div>	<div id="pickerSwatch">&nbsp;</div>	<div id="pickerWitness">&nbsp;</div></div>';new Element("div",{id:"pickerPanel","class":"dragPanel",styles:{zIndex:10000,position:"absolute",top:100,left:100,visibility:"hidden"}}).inject(document.body,"top").innerHTML=g;var T=function(){q("hsv",true)};var S=function(){q("rgb",true)};var r={value:0,size:3,maxlength:3};z=$("pickerWitness");p=$("pickerhexval").addEvent("keyup",function(){q("hex",true)});u=$("pickerPanel");y=$("pickerSwatch");B=$("pickerhval").addEvent("keyup",T).setProperties(r);l=$("pickersval").addEvent("keyup",T).setProperties(r);L=$("pickervval").addEvent("keyup",T).setProperties(r);I=$("pickerrval").addEvent("keyup",S).setProperties(r);d=$("pickergval").addEvent("keyup",S).setProperties(r);v=$("pickerbval").addEvent("keyup",S).setProperties(r);$("pickerOkButton").addEvent("click",function(){K(true)});$("pickerCancelButton").addEvent("click",function(){K(false)});it_CssUtils.setBackground("hueThumb",s.imgDir+"hline.png");it_CssUtils.setBackground("pickerDiv",s.imgDir+"pickerbg.png");it_CssUtils.setBackground("selector",s.imgDir+"select.gif");it_CssUtils.setBackground("hueBg",s.imgDir+"hue.png");it_CssUtils.setBackground("pickerDiv",s.imgDir+"pickerbg.png");e=$("hueThumb");e.setStyle("left",-5);var b=false;new Drag(e,{limit:{x:[-5,-5],y:[0,180]},onStart:function(){b=true},onComplete:function(){setTimeout(function(){b=false},200)},onDrag:function(){q("hueSlider",true)}});var R=$("hueBg");R.addEvent("click",function(V){if(!b){V=new Event(V);var W=V.page.y-R.getTop()-10;W=W.limit(0,180);new Fx.Tween(e,{property:"top",duration:500,transition:Fx.Transitions.Quad.easeOut,onComplete:function(){q("hueSlider",true)}}).start(W)}});w=$("selector");var U=false;new Drag(w,{limit:{x:[0+C,180+C],y:[0+E,180+E]},onStart:function(){U=true},onComplete:function(){setTimeout(function(){U=false},200)},onDrag:function(){q("pickerRegion",true)}});f=$("pickerDiv");f.addEvent("click",function(W){if(!U){W=new Event(W);var V=W.page.x-f.getLeft()-6;var X=W.page.y-f.getTop()-6;new Fx.Morph(w,{duration:500,transition:Fx.Transitions.Quad.easeOut,onComplete:function(){q("pickerRegion",true)}}).start({left:V,top:X})}})};var C=1;var E=1;var m=function(){return{x:(w.getStyle("left").toInt()-C).limit(0,180),y:(w.getStyle("top").toInt()-E).limit(0,180)}};var t=function(b,g){b=b.limit(0,180);g=g.limit(0,180);w.setStyle("left",b+C);w.setStyle("top",g+E)};this.show=function(b,Q,S,r,T,R){x=b;D=Q;A=x.value;if(A==""){A="FFFFFF"}z.style.backgroundColor="#"+A;D.style.backgroundColor="#"+A;p.value=A;a=r;c=T;h=R;k=S;if(it_IE&&k){for(var g=0;g<k.length;g++){k[g].set("opacity",0)}}it_PositionUtils.calculateAndSetPos(D,u,{anchor:"trigger",alignmentX:"left"});u.style.visibility="visible";q("hex")};var K=function(r){if(r&&!x.disabled){var g=p.value;D.style.backgroundColor="#"+g;x.value=g;if(a!=null){a(g)}}else{if(c!=null){c(A)}}u.style.visibility="hidden";if(it_IE&&k){for(var b=0;b<k.length;b++){$(k[b]).set("opacity",1)}}x=null;D=null;k=null;a=null;h=null;A=null};var F=function(T,S,R,Q){T.style.backgroundColor="rgb("+S+", "+R+", "+Q+")"};var H=function(r,g){var b=g.value;if(b>r){g.value=r}if(b<0){g.value=0}};var q=function(Q,T){if(Q=="hueSlider"){j=(180-e.getStyle("top").toInt())/180;if(j==1){j=0}n()}else{if(Q=="pickerRegion"){var r=m();N=r.x/180;o=(180-r.y)/180;n()}else{if(Q=="hsv"){H(360,B);H(100,l);H(100,L);j=B.value/360;N=l.value/100;o=L.value/100;n()}else{if(Q=="rgb"){H(255,I);H(255,d);H(255,v);J=I.value;O=d.value;P=v.value;G()}else{if(Q=="hex"){var S=p.value;if(S.length<6){return}var g=it_ColorUtils.hex2rgb(S);J=g[0];O=g[1];P=g[2];G()}}}}}if(Q!="rbg"){I.value=J;d.value=O;v.value=P}if(Q!="hex"){p.value=it_ColorUtils.rgb2hex(J,O,P)}F(y,J,O,P);if(Q!="hsv"){B.value=(j*360).toInt();l.value=(N*100).toInt();L.value=(o*100).toInt()}if(Q!="hueSlider"){var R=(180-(180*j)).toInt();if(R>=180){R=0}e.setStyle("top",R)}if(Q!="pickerRegion"){var b=it_ColorUtils.hsvToRgb(j,1,1);F(f,b[0],b[1],b[2]);t(N*180,180-(o*180));t(N*180,180-(o*180))}if(T&&h!=null){S=it_ColorUtils.rgb2hex(J,O,P);h(S)}};var G=function(){var b=it_ColorUtils.rgbToHsv(J,O,P);j=b[0];N=b[1];o=b[2]};var n=function(){var b=it_ColorUtils.hsvToRgb(j,N,o);J=b[0];O=b[1];P=b[2]};M()};var it_ColorPicker=function(c,d,a){if(window.it_colorPickerSingleton==null){window.it_colorPickerSingleton=new it_ColorPickerSingleton(a)}c=$(c);d=$(d);a=a||{};if(a.elementsToHide!=null){a.elementsToHide=it_Utils.ensureDomArray(a.elementsToHide)}var b=function(f){c.setStyle("backgroundColor","");a.okListener(f)};d.addEvent("click",function(){if(!c.disabled){it_colorPickerSingleton.show(c,d,a.elementsToHide,b,a.cancelListener,a.earlyListener)}});var e=function(){try{if(it_ColorUtils.isColor(c.value)){d.setStyle("backgroundColor","#"+c.value);c.setStyle("backgroundColor","");return true}}catch(f){console.log("input.value isn't valid: '"+c.value+"'")}return false};c.addEvents({keyup:function(){if(e()&&a.okListener){a.okListener(c.value)}},change:function(){if(!it_ColorUtils.isColor(c.value)){c.setStyle("backgroundColor","#FFDDCF")}}});e()};var it_Combo=function(d,c){c=$extend({popupMenuBuilder:null,wrap9Prefix:"combo"},c);if(c.popupMenuBuilder==null){throw new Error("options.popupMenuBuilder is missing")}var b=this;var a;var e;var f=function(){it_ComponentUtils.init(b,d,c);var g=new Element("div",{overflow:hidden}).inject(b.canvas);it_ComponentUtils.absoluteAllOverParent(g);a=c.content.getStyle("height");e=this._height};f()};if(!window.it_ComponentUtils){(function(){var a=function(){this.init=function(k,j,h){j=this.initWithoutLayout(k,j,h);this.initLayout(k,h.bufferResize,false);return j};this.initWithoutLayout=function(m,l,k){if(k!=null&&k.cssPrefix!==undefined){k.cssPrefix=it_CssUtils.toCssChain(k.cssPrefix)}k=$extend({bufferResize:false,checkWidth:true,checkHeight:true},k);l=$(l);if(!l){it_Utils.throwError("Canvas not found")}m.canvas=l;l.component=m;m._width=l._width;m._height=l._height;m._left=l._left;m._top=l._top;if(k.width!=null){l.setWidth(k.width)}else{var h=l.getWidth();if(h<=0&&k.defaultWidth>0){l.setWidth(k.defaultWidth)}else{if(!(m._width>0)){m._width=h}}}if(k.checkWidth&&!(m._width>0)){it_Utils.throwError('Missing width style in canvas with className: "'+l.className+'"',l)}if(k.height!=null){l.setHeight(k.height)}else{var j=l.getHeight();if(j<=0&&k.defaultHeight>0){l.setHeight(k.defaultHeight)}else{if(m._height<=0){m._height=j}}}if(k.checkHeight&&!(m._height>0)){it_Utils.throwError('Missing height style in canvas with className: "'+l.className+'"',l)}if(l.getStyle("position")=="static"){l.setStyle("position","relative")}m.onStylesReady=function(q,o){if(Browser.Engine.webkit||Browser.Engine.presto){var n=false;var p=function(){if(!n){n=true;m.canvas.style.visibility="visible";q()}};m.canvas.style.visibility="hidden";if(!o){o=2000}window.addEvents({domready:p.create({delay:o}),load:p})}else{q()}};it_Utils.addEventMethods(m,k);return l};this.initLayout=function(k,l,j){if(k.doLayout){if(l){var h=new it_Timer(50,k.doLayout)}var m=function(){if(k.invalidationEnabled){l?h.start():k.doLayout()}};k.canvas.addEvent("resize",m);k.invalidationEnabled=true;k.invalidate=m;if(j===undefined||j){k.doLayout()}else{}}};this.verticalLayout=function(k,u){u=u||{};var p=u.mode!=null?u.mode:"leaveEmptySpace";var r=u.alignment!=null?u.alignment:"fill";var s=u.gap!=null?u.gap:0;if(k.getStyle("position")=="static"){k.setStyle("position","relative")}var l=k.getWidth();var j=0;var n=it_Utils.getChildren(k,"div");var o=n.length;for(var q=0;q<o;q++){var m=n[q];m.setStyle("position","absolute");if(r=="none"){}else{if(r=="fill"){m.setStyle("left","0");m.setWidth(l)}else{if(r=="left"){m.setStyle("left","0")}else{if(r=="center"){m.setStyle("left",(l-m.getWidth())/2)}else{if(r=="right"){m.setStyle("left",l-m.getWidth())}else{it_Utils.throwError("Unknown alignment: '"+r,k)}}}}}m.setStyle("top",j);if(q!=n.length-1||p=="resizeContainer"){var h=it_CssUtils.getHeightWithMargin(m);if(isNaN(h)){it_Utils.throwError("Missing height with the child at the index "+q+" of the container '"+k+"'",m)}j+=h;if(q!=n.length-1){j+=s}}else{if(q==n.length-1&&p=="resizeLastChild"){var t=k.getHeight();m.setHeight(Math.max(0,t-j))}}}if(p=="resizeContainer"){k.setHeight(j)}};this.horizontalLayout=function(j,u){u=u||{};var n=u.mode!=null?u.mode:"leaveEmptySpace";var q=u.alignment!=null?u.alignment:"fill";var s=u.gap!=null?u.gap:0;if(j.getStyle("position")=="static"){j.setStyle("position","relative")}var t=j.getHeight();var h=0;var l=it_Utils.getChildren(j,"div");var m=l.length;for(var o=0;o<m;o++){var k=l[o];k.setStyle("position","absolute");if(q=="none"){}else{if(q=="fill"){k.setStyle("top","0");k.setHeight(t)}else{if(q=="top"){k.setStyle("top","0")}else{if(q=="center"){k.setStyle("top",(t-k.getHeight())/2)}else{if(q=="bottom"){k.setStyle("top",t-k.getHeight())}else{it_Utils.throwError("Unknown alignment: '"+q)}}}}}k.setStyle("left",h);if(o!=l.length-1||n=="resizeContainer"){var p=it_CssUtils.getWidthWithMargin(k);if(isNaN(p)){it_Utils.throwError("Missing width with the child at the index "+o+" of the container '"+j+"'",k)}h+=p;if(o!=l.length-1){h+=s}}else{if(o==l.length-1&&n=="resizeLastChild"){var r=j.getWidth();if(isNaN(r)){it_Utils.throwError("The layout mode is 'resizeLastChild', but the container doesn't have a width",j)}k.setWidth(r-h)}}}if(n=="resizeContainer"){j.setWidth(h)}};this.centerVerticallyAllChildren=function(h){h=$(h);var j=h.getHeight("Missing height in container");it_Utils.getChildren(h,"div").forEach(function(k){k.setStyle("top",(j-k.getHeight("Missing height in child"))/2)})};this.centerHorinzontallyAllChildren=function(h){h=$(h);var j=h.getHeight("Missing width in container");it_Utils.getChildren(h,"div").forEach(function(k){k.setStyle("left",(j-k.getWidth("Missing width in child"))/2)})};this.fixSmallElementForIE=function(h){h.setStyle("fontSize",1)};this.setSize=function(j,k,h){j.setWidth(k);j.setHeight(h)};var g={position:"absolute",left:0};var c={backgroundRepeat:"no-repeat",backgroundPosition:"bottom center"};var b={backgroundRepeat:"repeat-y",backgroundPosition:"top center"};var d={backgroundRepeat:"no-repeat",backgroundPosition:"top center"};this.vertical3PartBg=function(h){h=$(h);var j=h.getChildren();j[0].setStyles(g).setStyles(c);j[1].setStyles(g).setStyles(b);j[2].setStyles(g).setStyles(d)};this.createAbsoluteDiv=function(k,h,j){var l=new Element("div");if(k!=null){l.setProperty("class",k)}l.setStyles(g);if(h){l.inject(h)}if(j){l.setStyles(j)}return l};var f=["marginLeft","paddingLeft","marginRight","paddingRight"];var e=["marginTop","paddingTop","marginBottom","paddingBottom"];this.allChildrenAbsoluteAllOverParent=function(j){j=$(j);var k=it_Utils.getStyleOrZero(j,"width");var h=it_Utils.getStyleOrZero(j,"height");it_Utils.getChildren(j,"div").forEach(function(n){n.setStyles(g);var m=k;var l=h;f.forEach(function(o){m=m-it_Utils.getStyleOrZero(n,o)});e.forEach(function(o){l=l-it_Utils.getStyleOrZero(n,o)});n.setWidth(m);n.setHeight(l)})};this.absoluteAllOverParent=function(l){l.setStyles(g);var k=l.getParent();var j=it_Utils.getStyleOrZero(k,"width");var h=it_Utils.getStyleOrZero(k,"height");f.forEach(function(m){j=j-it_Utils.getStyleOrZero(l,m)});e.forEach(function(m){h=h-it_Utils.getStyleOrZero(l,m)});l.setWidth(j);l.setHeight(h)};this.absoluteAllOverParentComponent=function(j,h){j.setStyles(g);j.setWidth(h._width);j.setHeight(h._height)};this.getFirstChild=function(h){h=$(h);var j=it_Utils.getChildren(h,"div");if(j.length>0){return j[0]}else{return null}};this.linkImageScrollerAndTabbedPane=function(k,h,j){h.addEvent("beforeTabClose",function(m,l){if(j==l){k.pause()}});h.addEvent("beforeTabOpen",function(m,l){if(j==l){k.resume()}});k.pause()};this.linkButtonAndSlidingPanel=function(j,h){j.addEvent("activation",function(){h.slide(true)});h.addEvent("beforeStateChange",function(k,l){j.fade(l)})}};window.it_ComponentUtils=new a()})();(function(){var d=function(j){var h=$type(j);if(h=="number"){return true}if(h=="string"){if(j.length==0){return false}if(it_StringUtils.isDigit(j.charAt(j.length-1))){return true}return it_StringUtils.endsWith(j,"px")}return false};var f=function(o,n,l){if(n===undefined){return this}l=l!==false;if(l&&!this.parentNode){l=false}var k=o=="width"||o=="height";var m=k||o=="left"||o=="top";var j=undefined;var p;if(m){if($type(n)==="array"){n=n[0]}if(n.toInt){p=n.toInt()}if(isNaN(p)){return this}var h="_"+o;if(k&&l){j=this[h]}this[h]=d(n)?p:undefined;if(this.component!==undefined){this.component[h]=this[h]}}if(k&&l&&j===undefined){j=this.getStyle(o).toInt()}arguments.callee.parent.apply(this,arguments);if(k&&l&&j!=p){this.fireEvent("resize")}return this};f.parent=Element.prototype.setStyle;var b=function(l){var k=null;var j=l=="width"||l=="height"||l=="left"||l=="right";if(j){var h="_"+l;if(this[h]!==undefined){k=this[h]+"px"}}if(k===null){k=arguments.callee.parent.apply(this,arguments);if(j){var m=k.toInt();if(isNaN(m)){m=undefined}this[h]=m;if(this.component!==undefined){this.component[h]=m}}}return k};b.parent=Element.prototype.getStyle;var a=function(j){if(this._width!==undefined){return this._width}var h=parseInt(this.style.width);if(isNaN(h)){if(document.defaultView){h=document.defaultView.getComputedStyle(this,null).getPropertyValue("width")}else{if(this.currentStyle){h=this.currentStyle.width}}h=parseInt(h);if(isNaN(h)||h===0){h=this.offsetWidth}}this._width=h;if(this.component!==undefined){this.component._width=h}if(j&&h===undefined){it_Utils.throwError(j,this)}return h};var g=function(j){if(this._height!==undefined){return this._height}var h=parseInt(this.style.height);if(isNaN(h)){if(document.defaultView){h=document.defaultView.getComputedStyle(this,null).getPropertyValue("height")}else{if(this.currentStyle){h=this.currentStyle.height}}h=parseInt(h);if(isNaN(h)||h===0){h=this.offsetHeight}}this._height=h;if(this.component!==undefined){this.component._height=h}if(j&&h===undefined){it_Utils.throwError(j,this)}return h};var e=function(k,j){var l=parseInt(k);if(isNaN(l)){return this}var h=this.getWidth();this.style.width=l+"px";this._width=l;if(this.component){this.component._width=l}if(j!==false&&h!=l){this.fireEvent("resize")}return this};var c=function(k,j){var l=parseInt(k);if(isNaN(l)){return this}var h=this.getHeight();this.style.height=l+"px";this._height=l;if(this.component){this.component._height=l}if(j!==false&&h!=l){this.fireEvent("resize")}return this};Element.implement({setStyle:f,getStyle:b,getWidth:a,setWidth:e,getHeight:g,setHeight:c})})();Element.Properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"}}else{if(this.style.visibility!="visible"){this.style.visibility="visible"}}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1}if(Browser.Engine.trident){if(a==1){this.style.removeAttribute("filter")}else{this.style.filter="alpha(opacity="+a*100+")"}}this.style.opacity=a;this.store("opacity",a)},get:function(){return this.retrieve("opacity",1)}};(function(){var a=function(){this.setButtonMouseEvents=function(c,b){b=$extend({mouseDown:$empty,mouseUp:$empty,mouseClick:$empty},b);var d=false;var e=false;c.addEvent("mouseenter",function(){d=true;if(e){b.mouseDown()}});c.addEvent("mouseleave",function(){d=false;if(e){b.mouseUp()}});c.addEvent("mousedown",function(){e=true;b.mouseDown()});c.addEvent("mouseup",function(){e=false;if(d){b.mouseUp();b.mouseClick()}})}};window.it_EventUtils=new a()})()}function it_DateUtilsClass(){this.getDay=function(a){return a.getDate()};this.getMonth=function(a){return a.getMonth()+1};this.getYear=function(a){return a.getFullYear()};this.setDay=function(b,a){b.setDate(a);return b};this.setMonth=function(a,b){a.setMonth(b-1);return a};this.setYear=function(a,b){a.setFullYear(b);return a};this.addDay=function(b,a){b.setTime(b.getTime()+a*24*60*60*1000);return b};this.addYear=function(b,a){b.setFullYear(b.getFullYear()+a);return b};this.newDate=function(b,c,a){return new Date(b,c-1,a)};this.padZero=function(a){return((a<=9)?("0"+a):a)};this.getDayStr=function(a){return this.padZero(this.getDay(a))};this.getMonthStr=function(a){return this.padZero(this.getMonth(a))};this.getComparInt=function(b,c){var a=this.getMonth(b)*100+this.getDay(b);if(c!==false){a+=this.getYear(b)*10000}return a};this.equals=function(c,b,a){return this.getComparInt(c,a)==this.getComparInt(b,a)};this.getDaysInMonth=function(b,c){var a=[0,31,28,31,30,31,30,31,31,30,31,30,31];if(b!=2){return a[b]}else{return((c%4==0&&c%100!=0)||c%400==0?29:28)}};this.clone=function(b){var a=new Date();a.setTime(b.getTime());return a};this.getDateShifted=function(b,a){b=this.clone(b);b.setDate(b.getDate()+a);return b};this.isDateBefore=function(a,b){if(b.getFullYear()!==a.getFullYear()){return b.getFullYear()<a.getFullYear()}if(b.getMonth()!==a.getMonth()){return b.getMonth()<a.getMonth()}if(b.getDate()!==a.getDate()){return b.getDate()<a.getDate()}return false};this.getDayShort=function(a){return it_message("common.date.day.short."+it_DateUtils.getDaySuffix(a))};this.getDayLong=function(a){return it_message("common.date.day.long."+it_DateUtils.getDaySuffix(a))};this.getDaySuffix=function(a){if($type(a)==="date"){a=it_DateUtils.getMonth(a)}switch(a){case 1:return"sun";case 2:return"mon";case 3:return"tue";case 4:return"wed";case 5:return"thu";case 6:return"fri";case 7:return"sat";default:throw new Error("The day of week index must be between 1 and 7")}};this.getMonthShort=function(a){return it_message("common.date.month.short."+it_DateUtils.getMonthSuffix(a))};this.getMonthLong=function(a){return it_message("common.date.month.long."+it_DateUtils.getMonthSuffix(a))};this.getMonthSuffix=function(a){if($type(a)==="date"){a=it_DateUtils.getMonth(a)}switch(a){case 1:return"jan";case 2:return"feb";case 3:return"mar";case 4:return"apr";case 5:return"may";case 6:return"jun";case 7:return"jul";case 8:return"aug";case 9:return"sep";case 10:return"oct";case 11:return"nov";case 12:return"dec"}};this.formatDateTextShort=function(a){return it_DateUtils.getDay(a)+" "+it_DateUtils.getMonthShort(a)+" "+it_DateUtils.getYear(a)};this.iterateDays=function(a,c,d){var b=it_DateUtils.clone(a);while(b<=c){d(b);b.setDate(b.getDate()+1)}}}var it_DateUtils=new it_DateUtilsClass();var CompoundDate=function(l,a,d){this.objName=l;var w;if($defined(d)&&$defined(d.today)){w=d.today}else{w=new Date()}d=$extend({dayOfWeekElement:null,anchorElement:null,imgDir:"img",shortYear:false,fromDate:w,toDate:it_DateUtils.newDate(it_DateUtils.getYear(w)+1,it_DateUtils.getMonth(w),it_DateUtils.getDay(w)),selectedDate:w},d);d.dayOfWeekElement=$(d.dayOfWeekElement);if(d.anchorElement!=null){d.anchorElement=$(d.anchorElement);d.anchor=d.anchorElement}this.options=d;this.dateListener=null;var o=this;var b=true;var m,v,j,x,s;if(a!=null){a=it_FormUtils.getForm(a);m=a.elements[l+".day"];v=a.elements[l+".monthYear"];j=$defined(v);if(!j){x=a.elements[l+".month"];s=a.elements[l+".year"]}}else{m=$(l+".day");v=$(l+".monthYear");j=$defined(v);if(!j){x=$(l+".month");s=$(l+".year")}}this.setDateListener=function(y){this.dateListener=y};this.getSelDay=function(){return m[m.selectedIndex].value};this.getSelMonth=function(){if(j){var y=v[v.selectedIndex].value;return y.substring(0,y.indexOf("-")).toInt()}else{return x[x.selectedIndex].value}};this.getSelYear=function(){if(j){var y=v[v.selectedIndex].value;return y.substring(y.indexOf("-")+1).toInt()}else{return s[s.selectedIndex].value}};this.getDate=function(){return it_DateUtils.newDate(this.getSelYear(),this.getSelMonth(),this.getSelDay())};this.setDate=function(y){this.setDateParts(it_DateUtils.getYear(y),it_DateUtils.getMonth(y),it_DateUtils.getDay(y))};this.setDateParts=function(z,A,y){p(A,z);m.selectedIndex=y-1;if(j){it_SelectUtils.select(v,""+A+"-"+z)}else{x.selectedIndex=A-1;it_SelectUtils.select(s,z)}t();if(this.dateListener!=null){this.dateListener(this)}};this.showCalendar=function(y){it_getCalendar().show(y,this);o.fireEvent("calendarShown")};this.calendarHidden=function(){o.fireEvent("calendarHidden")};this.setVisible=function(y){if(b==y){return}b=y;it_Utils.setVisible([m,v,j,x,s,d.anchorElement,d.dayOfWeekElement],b)};var g=function(){t();q();if(o.dateListener!=null){o.dateListener(this)}};var k=function(){it_Utils.addEventMethods(o);$(m);m.addEvent("change",g);if(j){$(v);v.addEvent("change",g)}else{$(x);$(s);x.addEvent("change",g);s.addEvent("change",g)}if(d.anchorElement!=null){d.anchorElement.addEvent("mouseover",function(){it_singletonPopup.clearTimeout(l)});d.anchorElement.addEvent("mouseout",function(){it_singletonPopup.timeout(l);window.status=""});d.anchorElement.addEvent("click",o.showCalendar.bind(o))}};var t=function(){if(d.dayOfWeekElement){var z=it_DateUtils.newDate(o.getSelYear(),o.getSelMonth(),o.getSelDay());var y=z.getDay();d.dayOfWeekElement.innerHTML=it_DateUtils.getDayLong(y+1)}};var q=function(){var z=o.getSelMonth();var y=o.getSelYear();p(z,y)};var p=function(C,A){var y=it_DateUtils.getDaysInMonth(C,A);var B=m.length;var z;if(B>y){for(z=0;z<(B-y);z++){m.options[m.options.length-1]=null}}if(y>B){var D=m.options.length;for(z=D+1;z<=y;z++){it_SelectUtils.addOption(m,z,z)}}if(m.selectedIndex<0){m.selectedIndex=0}};var c=function(){u();if(j){n()}else{e();r()}};var u=function(){for(var y=1;y<=31;y++){it_SelectUtils.addOption(m,y,y)}};var f=function(y){y=""+y;return d.shortYear?y.substring(2):y};if(j){var n=function(){var C=it_DateUtils.getYear(d.fromDate);var y=it_DateUtils.getYear(d.toDate);var B=it_DateUtils.getMonth(d.fromDate);var A=it_DateUtils.getMonth(d.toDate);if(y>C){h(B,12,C);for(var z=C+1;z<y;z++){h(1,12,z)}h(1,A,y)}else{h(B,A,C)}};var h=function(A,B,z){for(var y=A;y<=B;y++){it_SelectUtils.addOption(v,y+"-"+z,it_DateUtils.getMonthShort(y)+" "+f(z))}}}else{var e=function(){for(var y=1;y<=12;y++){it_SelectUtils.addOption(x,y,it_DateUtils.getMonthShort(y))}};var r=function(){var A=it_DateUtils.getYear(d.fromDate);var y=it_DateUtils.getYear(d.toDate);for(var z=A;z<=y;z++){it_SelectUtils.addOption(s,z,f(z))}}}k();c();this.setDate(d.selectedDate);q();t()};document.write('<div id="calendarContainer" style="position:absolute; visibility: hidden; left: 0px; width: 124px; background-color : #ffffff;"></div>');var it_calendar;var it_getCalendar=function(){if(!$defined(it_calendar)){it_calendar=new Calendar()}return it_calendar};var Calendar=function(){this.daysInMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var b=$("calendarContainer");var a=1;var d;this.updatePopupContent=function(){var o=new StringBuilder();o.a('<form id="calendarForm" onSubmit="this.year.blur();return false;"><table width="100%" border="0" cellspacing="0" cellpadding="2" class="calBorderColor"><tr><td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="1" class="calBgColor">').a('<tr><td width="60%" class="cal" align="left">').a('<table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="javascript: it_getCalendar().changeMonth(-1);" onmouseover="window.status=\'Mois pr&eacute;c&eacute;dent\';return true;" onmouseout="window.status=\'\';return true;"><img name="calendar" src="').a(d.options.imgDir).a('/calendar/down.gif" width="8" height="12" border="0" alt=""></a></td><td class="cal" width="100%" align="center">').a(it_DateUtils.getMonthLong(this.month)).a('</td><td class="cal"><a href="javascript: it_getCalendar().changeMonth(+1);" onmouseover="window.status=\'Mois suivant\';return true;" onmouseout="window.status=\'\';return true;"><img name="calendar" src="').a(d.options.imgDir).a('/calendar/up.gif" width="8" height="12" border="0" alt=""></a></td></tr></table>').a('</td><td width="40%" align="right" class="cal">').a('<table border="0" cellspacing="0" cellpadding="0"><tr><td class="cal"><a href="javascript: it_calendar.changeYear(-1);" onmouseover="window.status=\'Ann&eacute;e pr&eacute;c&eacute;dente\';return true;" onmouseout="window.status=\'\';return true;"><img name="calendar" src="').a(d.options.imgDir).a('/calendar/down.gif" width="8" height="12" border="0" alt=""></a></td><td class="cal" width="100%" align="center">').a(this.year).a('</td><td class="cal"><a href="javascript: it_getCalendar().changeYear(+1);" onmouseover="window.status=\'Ann&eacute;e suivante\';return true;" onmouseout="window.status=\'\';return true;"><img name="calendar" src="').a(d.options.imgDir).a('/calendar/up.gif" width="8" height="12" border="0" alt=""></a></td></tr></table>').a("</td></tr></table>");var n=(7+this.getFirstDOM()-a)%7;var l=it_DateUtils.getDaysInMonth(this.month,this.year);o.a('<table width="100%" border="0" cellspacing="0" cellpadding="1" class="calBgColor"><tr>');var m;for(m=0;m<7;m++){var h=it_DateUtils.getDayShort((a+m)%7+1);o.a('<td align="center" class="calDaysColor">').a(h).a("</td>")}o.a("</tr>");var q=it_DateUtils.getComparInt(d.options.fromDate);var f=it_DateUtils.getComparInt(d.options.toDate);var p=1;var g=it_DateUtils.newDate(this.year,this.month,p);var e=it_DateUtils.getComparInt(g);for(var k=1;k<=6;k++){o.a("<tr>");for(m=1;m<=7;m++){o.a('<td width="16" align="center" ');if((7*(k-1)+m)>=n+1&&p<=l){if(this.day==p&&this.year==d.getSelYear()&&this.month==d.getSelMonth()){o.a('class="calHighlightColor"')}else{if(m==7-a||m==((7-a)%7)+1){o.a('class="calWeekend"')}else{o.a('class="cal"')}}o.a(">");if(e>=q&&e<=f){o.a('<a class="cal" href="javascript: it_getCalendar().clickDay(').a(p).a(');" onmouseover="window.status=\'').a(p).a(" ").a(it_DateUtils.getMonthLong(this.month)).a(" ").a(this.year).a("';return true;\" onmouseout=\"window.status='';return true;\">").a(p).a("</a>")}else{o.a('<span class="disabled">').a(p).a("</span>")}p++;it_DateUtils.setDay(g,p);e=it_DateUtils.getComparInt(g)}else{if(m==7-a||m==((7-a)%7)+1){o.a('class="calWeekend"')}else{o.a('class="cal"')}o.a(">&nbsp;")}o.a("</td>")}o.a("</tr>")}o.a("</table></td></tr></table></form>");b.innerHTML=o.toString()};this.getFirstDOM=function(){var e=new Date();it_DateUtils.setDay(e,1);it_DateUtils.setMonth(e,this.month);it_DateUtils.setYear(e,this.year);return e.getDay()};this.changeYear=function(e){(e==1)?this.year++:this.year--;this.updatePopupContent()};this.changeMonth=function(e){if(this.month==12&&e==1){this.month=1;this.year++}else{if(this.month==1&&e==-1){this.month=12;this.year--}else{(e==1)?this.month++:this.month--}}this.updatePopupContent()};this.clickDay=function(e){d.setDateParts(this.year,this.month,e);this.hide()};this.show=function(e,f){d=f;this.month=d.getSelMonth();this.day=d.getSelDay();this.year=d.getSelYear();this.updatePopupContent();b.setStyle("visibility","");it_singletonPopup.triggerMouseOver(d.objName,b,$extend({onClose:function(g){if(g==d.objName){c()}}},d.options),e)};this.hide=function(){it_singletonPopup.close(d.objName)};var c=function(){if(d!=null){d.calendarHidden();d=null}}};var it_CompoundTime=function(e,f,b){b=b||{};var a,d;if(f!=null){f=it_FormUtils.getForm(f);a=f.elements[e+".hour"];d=f.elements[e+".minute"]}else{a=$(e+".hour");d=$(e+".minute")}var c;if(a){for(c=0;c<=23;c++){it_SelectUtils.addOption(a,c,(c<10?"0":"")+c)}}if(d){for(c=0;c<60;c+=15){it_SelectUtils.addOption(d,c,(c<10?"0":"")+c)}}this.setTime=function(g){this.setTimeParts(g.getHours(),g.getMinutes())};this.setTimeParts=function(g,h){it_SelectUtils.select(a,g);it_SelectUtils.select(d,h)};this.getHourSelect=function(){return a}};function it_ScrollerImage(b,a){this.title=b;this.imageUrl=a}var it_ImageScroller=function(s,j,D,X,I,u,B){B=$extend({imageClass:null,showPartialImages:false,vertical:true,transition:"opacity",transitionDelay:1000,canvas:null,alignment:null,alignmentLimit:null,waitToInit:false},B);if(B.canvas!=null){B.canvas=$(B.canvas);j=B.canvas.getWidth();D=B.canvas.getHeight()}else{j=parseInt(j);D=parseInt(D)}X=parseInt(X);I=parseInt(I);var q={};var o=2;var W=B.vertical?"height":"width";var t=B.vertical?"width":"height";var x=B.vertical?D:j;var A=B.vertical?j:D;var S=B.vertical?"top":"left";var n=B.vertical?"left":"top";var d=B.vertical?I:X;var K=B.vertical?X:I;var Q=Math.floor((A+o)/(K+o));var z=Math.floor((x+o)/(d+o));var P=z;if(B.showPartialImages){P++}var l=P*(d+o);var F=Math.ceil(u.length/Q);var h=z<F;var V;var b=Q*(K+o)-o;if(B.alignment==null){if(B.alignmentLimit!=null){B.alignment=A>B.alignmentLimit?"left":"center"}else{B.alignment="left"}}if(B.alignment=="left"||B.alignment=="top"){V=0}else{if(B.alignment=="right"||B.alignment=="bottom"){V=A-b}else{V=(A-b)/2}}var v;var N;var p=-1;var m,C;var a=-1;var M;var f=null;var U=false;var w=false;var g=this;var L=false;this.canvas=null;var k=function(){var Y=new StringBuilder();if(B.canvas==null){Y.a("<div id='"+s+"ScrollerContainer' style='width: ").a(j).a("px;height: ").a(D).a("px;'></div>");document.write(Y.toString());g.canvas=$(s+"ScrollerContainer")}else{g.canvas=B.canvas}g.canvas.setStyle("position","relative");if(!B.waitToInit){g.init()}};this.init=function(){if(L){return false}L=true;var Z=new Element("div",{styles:{position:"absolute",overflow:"hidden"}});this.canvas.adopt(Z);Z.setStyle(W,x);Z.setStyle(t,b);Z.setStyle(n,V);Z.onmouseover=it_Utils.delegate(this,y);Z.onmouseout=it_Utils.delegate(this,c);if(!h){O(Z);e(Z);Z.setStyle("zIndex",20);return true}var Y={position:"absolute",top:0,left:0,width:j,height:D};v=new Element("div",{styles:Y});N=[new Element("div",{styles:Y}),new Element("div",{styles:Y})];O(N[0]);O(N[1]);e(N[0]);N[0].setStyle("zIndex",20);v.adopt(N);Z.adopt(v);if(B.transitionDelay>0){C=new Fx({duration:B.transitionDelay,fps:10,onComplete:G});C.set=$empty}if(B.transition=="slide"){m=new J()}else{m=new T()}R();return true};var O=function(aa){var ae=B.vertical?Q:P;var Z=B.vertical?P:Q;var Y=h?null:u.length;aa.empty();var ac=0;for(var ad=0;ad<Z;ad++){for(var ab=0;ab<ae;ab++){var af={width:X,height:I,styles:{position:"absolute",top:ad*(I+o),left:ab*(X+o)}};if(B.imageClass!=null){af["class"]=B.imageClass}new Element("img",af).inject(aa);ac++;if(Y!=null&&Y==ac){return}}}};var R=function(){M=true;if(C==null){G()}else{C.start(0,1)}};var G=function(){M=false;p++;p=p%2;var Y=N[p];var Z=N[(p+1)%2];e(Z);m.start(Y,Z)};var e=function(Y){Y.getChildren().forEach(function(aa){E(aa);if(!q[aa.src]){var Z=new Image();q[aa.src]=Z;Z.src=aa.src}})};var E=function(aa){a++;if(a>=u.length){a=0}var Y=a;var Z=u[Y];aa.setProperty("title",Z.title);aa.setProperty("src",Z.imageUrl)};var H=function(){if(M){C.pause()}else{m.pause()}};var r=function(){if(M){C.resume()}else{m.resume()}};this.pause=function(){if(L&&h&&!U){U=true;if(!w){H()}}};this.resume=function(){if(!L){this.init()}this.canvas.setStyle("display","");if(h&&U){U=false;if(!w){r()}}};var y=function(){if(h&&!w){w=true;if(!U){H()}}};var c=function(){if(h&&w){w=false;if(!U){r()}}};var J=function(){var Z=20;var Y=l*1000/Z;var aa=new Fx.Tween(v,{property:S,duration:Y,fps:Z,transition:Fx.Transitions.linear,onComplete:it_Utils.delegate(this,R)});this.start=function(ab,ac){ab.setStyle(S,0);ab.setStyle(n,0);ac.setStyle(S,l);ac.setStyle(n,0);aa.start(0,-l)};this.pause=function(){aa.pause()};this.resume=function(){aa.resume()}};var T=function(){var Y=new Fx.Tween(v,{property:"opacity",duration:500,fps:30,transition:Fx.Transitions.linear,onComplete:it_Utils.delegate(this,R)});this.start=function(Z,aa){Z.setStyle("opacity",1);Z.setStyle("zIndex",10);aa.setStyle("opacity",0);aa.setStyle("zIndex",20);Y.element=aa;Y.start(0,1)};this.pause=function(){Y.pause()};this.resume=function(){Y.resume()}};k()};if(!window.it_LayoutUtils){(function(){var a=function(){this.columnLayout=function(d,n){n=n||{};var m=it_Utils.getPropertyMandatory(n,"columnCount");var e=it_CssUtils.getWidth(d,true);var k=Math.floor(e/m);var c=0;var g=it_Utils.getChildren(d,"div");for(var l=0;l<g.length;l+=m){var b=0;for(var j=0;j<m;j++){var f=g[l+j];var h=f.getHeight();if(h>0){b=Math.max(b,h)}}if(b==0){throw new Error("We need at least one element in the row to have an height. The first element in the row has the class: '"+g[l].getProperty("class")+"'")}for(j=0;j<m;j++){f=g[l+j];f.setStyle("position","absolute");f.setStyle("top",c);f.setStyle("left",k*j);f.setWidth(k);f.setHeight(b)}c+=b}if(n.mode=="resizeContainer"){d.setHeight(c)}};this.centerHorizontally=function(b){b.setStyle("left",(b.getParent().getWidth()-getWidth())/2)}};window.it_LayoutUtils=new a()})()}var it_Overlay=function(e,d,c){c=$extend({passClickEvents:true,passMouseMoveEvents:true},c);e=$(e);d=it_Utils.ensureArray(d);var f=d.map(function(h){return $(h)});var b;if(c.passClickEvents){e.addEvent("click",function(l){l=new Event(l);var h=l.page;var k=a(h);if(k!=null){var j=k.getPosition();g(k,"click",h,j)}})}if(c.passMouseMoveEvents){e.addEvents({mousemove:function(l){l=new Event(l);var h=l.page;var k=a(h);if(k!==b){var j;if(b!=null){j=b.getPosition();g(b,"mouseout",h,j)}if(k!=null){j=k.getPosition();g(k,"mouseover",h,j)}b=k}},mouseout:function(j){if(b!=null){var h=new Event(j).page;childPos=b.getPosition();g(b,"mouseout",h,childPos);b=null}}})}var g=function(o,j,h,m){var l=h.x-m.x;var k=h.y-m.y;var n;if(document.createEventObject){n=document.createEventObject();n.screenX=h.x;n.screenY=h.y;n.clientX=l;n.clientY=k;n.type="on"+j;n.srcElement=o;n.target=o;n.cancelBubble=false;n.returnValue=true;o.fireEvent(j,new Event(n))}else{n=document.createEvent("MouseEvents");n.initMouseEvent(j,true,true,window,1,h.x,h.y,l,k,false,false,false,false,1,null);o.dispatchEvent(n)}};var a=function(h){for(var j=0;j<f.length;j++){var l=f[j];var k=l.getCoordinates();if(k.left<=h.x&&h.x<=(k.left+k.width)&&k.top<=h.y&&h.y<=(k.top+k.height)){return l}}return null}};var it_PopupMenu=function(p){p=$extend({popupMenuBuilder:null,triggerElement:null,compoundFocus:null,imgDir:it_basePath+"img/",anchor:"trigger",anchorAlignmentX:"left",offsetY:-1,visibleLineCount:6,lineHeight:18,width:200,adjustToWindowWidth:true},p);if(p.popupMenuBuilder==null){it_Utils.throwError("options.popupMenuBuilder is mandatory")}p.triggerElement=$(p.triggerElement);if(!p.triggerElement){it_Utils.throwError("options.triggerElement is mandatory")}if(p.imgDir!=null&&!it_StringUtils.endsWith(p.imgDir,"/")){p.imgDir=p.imgDir+"/"}var b="Popup"+it_nextRef();var o=this;var f=null;var q=null;var c=null;var k=null;var e=null;var a=false;var d=false;var m;var g=false;var j;var n=function(){it_Utils.addEventMethods(o);p.popupMenuBuilder.init(o,p);j=$extend({onOpen:function(){d=true;l();if(p.compoundFocus){p.compoundFocus.addMouseDownSource(it_singletonPopup)}o.fireEvent("open")},onClose:function(){d=false;if(p.compoundFocus){p.compoundFocus.removeMouseDownSource(it_singletonPopup)}o.fireEvent("closed")}},p)};this.selectPreviousLine=function(r){var t=r!==undefined?r:f;var s;if(t==null){s=q.length-1}else{if(t!=0){s=t-1}else{return}}if(!o.setSelectedIndex(s)){this.selectPreviousLine(s)}else{it_singletonPopup.resetTimeout();h()}};this.selectNextLine=function(r){var t=r!==undefined?r:f;var s;if(t==null){s=0}else{if(t!=(q.length-1)){s=t+1}else{return}}if(!o.setSelectedIndex(s)){this.selectNextLine(s)}else{it_singletonPopup.resetTimeout();h()}};var h=function(){if(e.sliderVisible){var s=Math.floor((p.visibleLineCount/2))*p.lineHeight;var r=f*p.lineHeight-s;r=Math.max(0,r);r=Math.min(r,q.length*p.lineHeight-m);e.setScrollY(r)}};this.setSelectedIndex=function(r){if(g){return false}if(!p.popupMenuBuilder.isResultValid(r)){return false}if(f!=null){q[f].removeClass("autoCompleteSelected")}f=r;q[f].addClass("autoCompleteSelected");return true};this.getSelectionIndex=function(){if(f===null||f===undefined||f<0){return -1}else{return f}};this.lineSelected=function(){if(f!=null){var r=p.popupMenuBuilder.getInputValue(f);this.fireEvent("lineSelected",[r,f]);this.close()}};this.close=function(){if(d){it_singletonPopup.close(b)}};this.open=function(){if(p.popupMenuBuilder.isDataShowable()){l();it_singletonPopup.triggerMouseOver(b,c,j,j.triggerElement)}else{this.close()}};this.popupMenuChanged=function(){f=null;a=false;this.open()};this.isOpen=function(){return d};var l=function(){if(!a){a=true;if(c==null){c=new Element("div",{"class":"autoCompleteContainer",styles:{position:"absolute",left:0,width:100,height:100}}).inject(document.body);k=new Element("div",{styles:{position:"absolute",left:0,cursor:"pointer",textAlign:"left",height:200}});e=new it_ScrollPane(c,{useContentWidth:true,events:{onMouseDown:function(v){g=true;it_singletonPopup.manualPreventClosing=true}},imgDir:p.imgDir+"components/slider/"});e.setContent(k);var r=function(v){if(g){g=false;it_singletonPopup.manualPreventClosing=false}};document.addEvent("mouseup",r)}k.empty();q=p.popupMenuBuilder.buildContent(k);m=Math.min(p.visibleLineCount,q.length)*p.lineHeight;c.setHeight(m);k.setHeight(q.length*p.lineHeight);var t=p.width;if(p.popupMenuBuilder.getLineWidth){var u=0;q.forEach(function(w){var v=p.popupMenuBuilder.getLineWidth(w);u=Math.max(u,v)});u+=4;u=e.getWidthFromContentWidth(u);t=Math.max(t,u)}if(p.adjustToWindowWidth){var s=Window.getSize().x;if(t>s){t=s}}c.setWidth(t);e.setScrollY(0);f=null}};n()};var it_DefaultPopupMenuBuilder=function(c){var a;var b;this.init=function(d,e){if(a!=null){it_Utils.throwError("The popupBuilder can't be shared")}a=d;b=e};this.getInputValue=function(d){return c[d].value};this.isDataShowable=function(){return true};this.isResultValid=function(d){return true};this.buildContent=function(e){var d=[];c.forEach(function(f,h){var g=new Element("div",{styles:{position:"relative",height:b.lineHeight},events:{mouseover:function(){a.setSelectedIndex(h)},mousedown:function(){setTimeout(function(){a.lineSelected()},0)}}}).inject(e);var j=new Element("span",{text:f.text}).inject(g);d.push(g)});return d};this.getLineWidth=function(d){return d.getElement("span").offsetWidth}};var it_CompoundFocus=function(b){var h=[];var f=false;var c=false;var d=this;var g=function(){b=$(b);b.addEvents({focus:function(){e()},blur:function(){if(!f){c=false;if(it_currentCompoundFocus===d){it_currentCompoundFocus=null}d.fireEvent("blur")}}});it_Utils.addEventMethods(d)};var a=function(){f=true;it_currentCompoundFocus=d;e()};this.mouseUp=function(){b.focus();f=false};var e=function(){if(!c){c=true;d.fireEvent("focus")}};this.addMouseDownSource=function(j){if(!h.contains(j)){j.addEvent("mousedown",a);h.push(j)}return this};this.removeMouseDownSource=function(j){if(it_Utils.remove(h,j)){j.removeEvent("mousedown",a)}return this};g()};var it_currentCompoundFocus=null;document.addEvent("mouseup",function(){if(it_currentCompoundFocus!=null){it_currentCompoundFocus.mouseUp()}});var it_VerticalScrollBar=function(b,c){c=$extend({minValue:0,maxValue:100,imgDir:it_basePath+"img/components/slider/",ratio:0},c);var j=TRACK_BOTTOM_HEIGHT=4;var e=KNOB_BOTTOM_HEIGHT=KNOB_GRIP_HEIGHT=8;var n,g,h,k,d,l,t;var s,r,q;var o=null;var f=null;var m=this;var p=function(){b=it_ComponentUtils.init(m,b,c);n=new Element("div",{styles:{position:"absolute",left:0,width:m._width},events:{click:function(x){x=new Event(x);var w=x.page.y-b.getPosition().y;if(w>h.offsetTop){m.nextPage()}else{m.previousPage()}}}}).inject(b);new Element("div",{styles:{height:j,backgroundImage:"url('"+c.imgDir+"trackTop.png')"}}).inject(n);g=new Element("div",{styles:{backgroundImage:"url('"+c.imgDir+"trackMiddle.png')"}}).inject(n);new Element("div",{styles:{height:TRACK_BOTTOM_HEIGHT,backgroundImage:"url('"+c.imgDir+"trackBottom.png')"}}).inject(n);it_ComponentUtils.vertical3PartBg(n);h=new Element("div",{styles:{position:"absolute",fontSize:1,top:0,left:0,width:m._width}}).inject(b);k=new Element("div",{styles:{height:e,backgroundImage:"url('"+c.imgDir+"knobTop.png')"}}).inject(h);d=new Element("div",{styles:{backgroundImage:"url('"+c.imgDir+"knobMiddle.png')"}}).inject(h);l=new Element("div",{styles:{height:KNOB_BOTTOM_HEIGHT,backgroundImage:"url('"+c.imgDir+"knobBottom.png')"}}).inject(h);it_ComponentUtils.vertical3PartBg(h);t=new Element("div",{styles:{position:"absolute",left:0,width:m._width,height:KNOB_GRIP_HEIGHT,backgroundImage:"url('"+c.imgDir+"knobGrip.png')",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}}).inject(d);var v=false;var u={mousedown:function(w){if(!v){v=true;m.fireEvent("onMouseDown")}},mouseup:function(w){if(v){v=false;m.fireEvent("onMouseUp")}}};q=new Drag(h,{limit:{x:[0,0],y:[0,0]},snap:0,onDrag:function(){a(h.offsetTop)},onBeforeStart:u.mousedown,onComplete:u.mouseup});b.addEvents(u);m.setRatio(c.ratio)};var a=function(u){var v=it_Utils.changeScale(s,r,u,c.minValue,c.maxValue);m.setValue(v)};this.getValue=function(){return Math.floor(it_Utils.changeScale(s,r,h.offsetTop,c.minValue,c.maxValue))};this.setValue=function(v){var u=Math.floor(it_Utils.changeScale(c.minValue,c.maxValue,v,s,r));h.setStyle("top",u);if(v!==o){o=v;m.fireEvent("drag",v)}};this.nextPage=function(){var v=Math.floor(it_Utils.changeScale(0,100-f,f,c.minValue,c.maxValue));var u=Math.min(this.getValue()+v,c.maxValue);this.setValue(u)};this.previousPage=function(){var v=Math.floor(it_Utils.changeScale(0,100-f,f,c.minValue,c.maxValue));var u=Math.max(this.getValue()-v,c.minValue);this.setValue(u)};this.doLayout=function(){var u=c.height?c.height:b.getHeight();var y=Math.max(0,u-j-TRACK_BOTTOM_HEIGHT);g.setHeight(y);it_ComponentUtils.verticalLayout(n,{mode:"resizeContainer"});var v=KNOB_BOTTOM_HEIGHT+e+KNOB_GRIP_HEIGHT;var w=Math.max(u*f/100,v);var x=w-e-KNOB_BOTTOM_HEIGHT;d.setHeight(x);it_ComponentUtils.verticalLayout(h,{mode:"resizeContainer"});t.setStyle("top",(x-KNOB_GRIP_HEIGHT)/2);s=j;r=u-w-TRACK_BOTTOM_HEIGHT;q.options.limit.y=[s,r]};this.setRatio=function(u){f=u;this.invalidate();a(s)};p()};var it_ScrollPane=function(c,l){l=$extend({sliderWidth:15,imgDir:it_basePath+"img/components/slider/"},l);c=$(c);var k=this;var g,d,f,b;var h=null;var e;this.sliderVisible=true;var j=function(){c=it_ComponentUtils.init(k,c,l);g=new Element("div",{styles:{position:"absolute",top:0,left:0,overflow:"hidden"}}).inject(c);d=new Element("div",{styles:{position:"absolute",top:0,left:0}}).inject(g);f=new Element("div",{styles:{position:"absolute",left:0,width:l.sliderWidth,height:k._height}}).inject(c);b=new it_VerticalScrollBar(f,{imgDir:l.imgDir,minValue:0,maxValue:1000,events:{drag:function(n){var m=Math.floor(it_Utils.changeScale(0,1000,n,0,h-k._height));g.scrollTo(0,m)},onMouseDown:function(m){k.fireEvent("onMouseDown")},onMouseUp:function(m){k.fireEvent("onMouseUp")}}});c.addEvent("mousewheel",function(o){o=new Event(o);o.stop();var m=h-k._height;var n=Math.floor(it_Utils.changeScale(0,1000,b.getValue(),0,m));n=n-30*o.wheel;n=Math.min(n,m);n=Math.max(n,0);k.setScrollY(n)})};this.setContent=function(n){var m=it_ComponentUtils.getFirstChild(d);if(m!=null){m.removeEvent("resize",a)}d.empty();n.inject(d).setStyle("top",0).setStyle("left",0);n.addEvent("resize",a);this.invalidate()};var a=function(){k.invalidate()};this.doLayout=function(){var o=it_ComponentUtils.getFirstChild(d);if(o!=null){this._height=c.getHeight();h=o.getHeight();if(e===null||e===undefined){this.sliderVisible=h>this._height}else{this.sliderVisible=e}f.setStyle("display",this.sliderVisible?"block":"none");var p={width:this.sliderVisible?this._width-l.sliderWidth:this._width,height:h};var m={width:p.width,height:this._height};this.invalidationEnabled=false;o.setStyles(p);this.invalidationEnabled=true;d.setStyles(p);g.setStyles(m);f.setStyle("left",this._width-l.sliderWidth);f.setHeight(m.height);if(this.sliderVisible){var n=100*this._height/h;b.setRatio(n)}this.setScrollY(0)}};this.setScrollY=function(n){var m=it_Utils.changeScale(0,h-this._height,n,0,1000);b.setValue(m)};this.forceScrollBarVisibility=function(m){e=m};this.getWidthFromContentWidth=function(m){return this.sliderVisible?m+l.sliderWidth:m};j()};if(!window.it_Select){(function(){window.it_Select=function(b,g){g=$extend({visibleLineCount:10,openOnFocus:false,closeTimeOut:3000},g);var f=this;b=$(b);var h;var e;var d;var c="Select"+it_nextRef();var j=function(){it_Utils.addEventMethods(f,g);h=[];it_SelectUtils.forEachOption(b,function(n){h.push({value:n.value,text:n.text})});var l=null;var k=b.getSize();d=new Element("div",{styles:{display:"inline","float":"left",width:k.x,height:k.y},events:{mousedown:function(){setTimeout(function(){var n=new Date().getTime();if(l==null||n-l>500){e.isOpen()?e.close():e.open()}},0)}},html:h[b.selectedIndex].text}).inject(b,"after");b.setStyles({position:"absolute",left:-2000});var m=new it_CompoundFocus(b).addMouseDownSource(d).addEvents({focus:function(){d.setStyle("backgroundColor","grey");if(g.openOnFocus){l=new Date().getTime();e.open()}},blur:function(){d.setStyle("backgroundColor","white");e.close()}});g.width=k.x;g.triggerElement=d;g.compoundFocus=m;g.popupMenuBuilder=new it_DefaultPopupMenuBuilder(h);e=new it_PopupMenu(g);e.addEvents({lineSelected:function(o,n){var p=h[n];f.fireEvent("lineSelected",[p.value,p.text]);d.innerHTML=p.text;it_SelectUtils.select(b,p.value)},closed:function(){f.fireEvent("closed")},open:function(){f.fireEvent("open")}});b.addEvent(it_Utils.getKeyEventType(),function(n){n=new Event(n);if(!n.shift){switch(n.key){case"enter":if(e.isOpen()){e.lineSelected();n.stop()}return;case"up":case"down":if(!e.isOpen()){e.open()}else{if(n.key=="up"){e.selectPreviousLine()}else{e.selectNextLine()}}n.stop();return;case"esc":e.close();return}}})};j()};var a=function(){this.createSelects=function(b,c){document.getElements(b).forEach(function(d,e){new it_Select(d,e)})}};window.it_SelectComponentUtils=new a()})()}var it_Slider=function(f,e,d,j){j=$extend({onChange:$empty,formatter:new PriceFormat().format,formatterUnit:"",allwaysShowLabel:false},j);if(!d){d=""}else{d=d+"."}$(d+"minLabel").innerHTML=j.formatter(f)+j.formatterUnit;$(d+"maxLabel").innerHTML=j.formatter(e)+j.formatterUnit;var g=$(d+"label");var c=$(d+"track");it_ComponentUtils.fixSmallElementForIE(c);var a;var h=function(){var k=c.offsetWidth;a=new it_SliderKnob(d+"knob",f,e,k,true,{onDrag:b,onComplete:function(){j.onChange(false,a.getValue())}});if(j.allwaysShowLabel){b()}else{g.set("opacity",0)}c.addEvent("click",function(m){m=new Event(m);var l=m.client.x-c.getLeft()-a.getElement().getWidth()/2;a.setValue(a.toValue(l),{onComplete:function(){b();j.onChange(false,a.getValue())}})})};var b=function(){var k=a.getValue();if(j.allwaysShowLabel||k>f){g.innerHTML=j.formatter(a.getValue())+j.formatterUnit+"&nbsp;";g.set("opacity",1)}else{g.innerHTML="";if(!j.allwaysShowLabel){g.set("opacity",0)}}g.setStyle("left",a.getPositionOnTrack()-(g.offsetWidth/2).toInt())};h()};var it_RangeSlider=function(m,h,g,q){q=$extend({onChange:$empty,formatter:new PriceFormat().format,formatterUnit:"",knobPressedClass:null},q);this.options=q;if(!g){g=""}else{g=g+"."}$(g+"minLabel").innerHTML=q.formatter(m)+q.formatterUnit;$(g+"maxLabel").innerHTML=q.formatter(h)+q.formatterUnit;var p=$(g+"leftLabel");var f=$(g+"rightLabel");var c=$(g+"track");it_ComponentUtils.fixSmallElementForIE(c);var r,l;var k=undefined;var a=false;var e=false;var o=function(){var s=c.offsetWidth;r=new it_SliderKnob(g+"leftKnob",m,h,s,true,{classWhenPressed:q.knobClassWhenPressed,onDrag:b,onComplete:function(){q.onChange(false,r.getValue())}});l=new it_SliderKnob(g+"rightKnob",m,h,s,false,{classWhenPressed:q.knobClassWhenPressed,onDrag:b,onComplete:function(){q.onChange(true,l.getValue())}});p.set("opacity",0);f.set("opacity",0);j()};this.getLeftValue=function(){return r.getValue()};this.getRightValue=function(){return l.getValue()};var j=function(){var s=r.getValue()>(m+h)/2;if(s!==k){k=s;r.element.setStyle("zIndex",k?1001:1000);l.element.setStyle("zIndex",k?1000:1001)}};var b=function(){r.changeUpperLimit(l.getValue());l.changeLowerLimit(r.getValue());var t=r.getValue();if(t>m){p.innerHTML=q.formatter(r.getValue())+q.formatterUnit+"&nbsp;";p.set("opacity",1)}else{p.innerHTML="";p.set("opacity",0)}var s=l.getValue();if(s<h){f.innerHTML=q.formatter(l.getValue())+q.formatterUnit;f.set("opacity",1)}else{f.innerHTML="";f.set("opacity",0)}p.setStyle("left",r.getPositionOnTrack()-(p.offsetWidth/2).toInt());f.setStyle("left",l.getPositionOnTrack()-(f.offsetWidth/2).toInt());a=false;e=false;n();d();n();j()};var n=function(){var t=f.offsetLeft-(p.offsetLeft+p.offsetWidth);if(t<0){t=-t;if(a){f.setStyle("left",f.offsetLeft+t)}else{if(e){p.setStyle("left",p.offsetLeft-t)}else{var s=(t/2).toInt();f.setStyle("left",f.offsetLeft+s);p.setStyle("left",p.offsetLeft-(t-s))}}}};var d=function(){if(p.offsetLeft<c.offsetLeft){p.setStyle("left",c.offsetLeft);a=true}if(f.offsetLeft+f.offsetWidth>c.offsetLeft+c.offsetWidth){f.setStyle("left",c.offsetLeft+c.offsetWidth-f.offsetWidth);e=true}};o()};var it_SliderKnob=function(e,j,g,m,h,l){l=$extend({onStart:$empty,onDrag:$empty,onComplete:$empty,classWhenPressed:null},l);var b=$(e);this.element=b;it_ComponentUtils.fixSmallElementForIE(b);var d,a;if(h){d=b.offsetLeft;a=d+m}else{a=b.offsetLeft;d=a-m}var c=[d,a];var f=new Drag(b,{limit:{x:c,y:[b.offsetTop,b.offsetTop]},snap:0,onStart:function(){if(l.classWhenPressed){b.addClass(l.classWhenPressed)}l.onStart()},onDrag:l.onDrag,onComplete:function(){if(l.classWhenPressed){b.removeClass(l.classWhenPressed)}l.onComplete()}});this.getValue=function(){return this.toValue(b.offsetLeft)};this.setValue=function(o,p){p=$extend({animate:true,onComplete:$empty},p);var n=k(o);if(p.animate){new Fx.Tween(b,{property:"left",duration:400,transition:Fx.Transitions.Quart.easeOut,onComplete:p.onComplete}).start(n)}else{b.setStyle("left",n);p.onComplete()}};this.changeUpperLimit=function(n){c[1]=k(n);if(f.limit){f.limit.x[1]=c[1]}};this.changeLowerLimit=function(n){c[0]=k(n);if(f.limit){f.limit.x[0]=c[0]}};this.getPositionOnTrack=function(){return b.offsetLeft-d};var k=function(n){return it_Utils.changeScale(j,g,n,d,a)};this.toValue=function(n){return it_Utils.changeScale(d,a,n,j,g)};this.getElement=function(){return b}};var it_SlidingPanels=function(e,d){d=$extend({initialPanelIndex:0,slideStartPosition:"left",transition:"quad"},d);d.slideStartPosition=d.slideStartPosition.toLowerCase();d.transition=d.transition.toLowerCase();var b=this;var c=[];var a;var g=function(){e=it_ComponentUtils.init(b,e,d);e.setStyle("overflow","hidden")};this.addPanel=function(k,j){k=$(k);j=it_Utils.extendIfNonNull({panelName:k.getProperty("id")},j);if(it_StringUtils.isEmpty(j.panelName)){j.panelName="panel"+it_nextRef()}k.inject(b.canvas);it_ComponentUtils.absoluteAllOverParent(k);var h={content:k,index:c.length,name:j.panelName};c.push(h);if(h.name!=null){c[h.name]=h}c.forEach(function(l,m){if(m==d.initialPanelIndex){l.content.setStyle("visibility","visible").setStyle("zIndex",20);if(it_IE6){f(l.content,true)}a=l}else{l.content.setStyle("visibility","hidden").setStyle("zIndex",10);if(it_IE6){f(l.content,false)}}});return h};this.openPanel=function(u){var h=c[u];if(h==a){return}var l=a;a=h;var p=l.content.getElements("input");var s;for(var n=0;n<p.length;n++){var t=p[n];if(t.getProperty("type")==="text"){s=t;break}}if(s){s.focus();s.blur()}l.content.setStyle("zIndex",10);a.content.setStyle("zIndex",20);if(it_IE6){f(a.content,true);f(l.content,false)}var o,k,r;if(d.transition=="opacity"){o="opacity";k=0;r=1}else{if(d.transition=="quad"||d.transition=="bounce"){r=0;if(d.slideStartPosition=="left"){o="left";k=-b._width}else{if(d.slideStartPosition=="right"){o="left";k=b._width}else{if(d.slideStartPosition=="top"){o="top";k=-b._height}else{if(d.slideStartPosition=="bottom"){o="top";k=b._height}else{throw new Error("when transition is 'quad' or 'bounce', options.slideStartPosition can only be 'left', 'right', 'top' or 'bottom' (wrong value is '"+d.slideStartPosition+"')")}}}}}else{throw new Error("options.transition can only by 'opacity', quad' or 'bounce' (wrong value is '"+d.transition+"')")}}var q;var m;if(d.transition=="opacity"){m=400;q=Fx.Transitions.linear}else{if(d.transition=="quad"){m=500;q=Fx.Transitions.quadOut}else{if(d.transition=="bounce"){m=700;q=it_LightBounce}}}b.fireEvent("beforePanelOpen",[h.index,h.name]);var j=new Fx.Tween(h.content,{property:o,duration:m,transition:q}).addEvent("onComplete",function(){b.fireEvent("afterPanelOpen",[h.index,h.name])}.bind(this));j.set(k);if(d.transition=="quad"||d.transition=="bounce"){h.content.set("opacity",1)}new Fx.Tween(l.content,{property:"opacity",duration:200,transition:Fx.Transitions.linear}).addEvent("onComplete",function(){b.fireEvent("afterPanelClose",[l.index,l.name])}.bind(this)).start(1,0).chain(function(){j.start(k,r)})};var f=function(l,k){var j=l.getElementsByTagName("select");for(var h=0;h<j.length;h++){j[h].style.visibility=k?"visible":"hidden"}};g()};var it_TabbedPane=function(e,d){d=$extend({divsTitle:[],cssPrefix:"tabbedPane",activationTime:0,tabsPosition:"top",transition:"bounce",buttonBarOptions:null,maxButtonCount:null},d);var b=this;var a,c;var f=function(){it_ComponentUtils.init(b,e,d);var l=it_Utils.getChildren(b.canvas,"div");l.forEach(function(n){n.dispose()});var k=d.tabsPosition=="top"?"horizontal":"vertical";var j=d.cssPrefix.createChild("Header");var g=new Element("div",{"class":j.getClass()}).inject(b.canvas);var m=new Element("div",{"class":d.cssPrefix.getClass("Content")}).inject(b.canvas);if(k=="horizontal"){it_ComponentUtils.verticalLayout(b.canvas,{mode:"resizeLastChild"})}else{it_ComponentUtils.horizontalLayout(b.canvas,{mode:"resizeLastChild"})}a=new it_AutoButtonBar(g,it_Utils.extendIfNonNull({cssPrefix:j,orientation:k},d.buttonBarOptions));c=new it_SlidingPanels(m,{slideStartPosition:d.tabsPosition,transition:d.transition});c.addEvents({beforePanelClose:function(n,o){b.fireEvent("beforeTabClose",[n,o])},afterPanelClose:function(n,o){b.fireEvent("afterTabClose",[n,o])},beforePanelOpen:function(n,o){b.fireEvent("beforeTabOpen",[n,o])},afterPanelOpen:function(n,o){b.fireEvent("afterTabOpen",[n,o])}});l.forEach(function(o,n){b.addPanel(o,{tabTitle:d.divsTitle.length>n?d.divsTitle[n]:null,last:n==l.length-1})});var h;if(!isNaN(d.maxButtonCount)){for(h=l.length;h<d.maxButtonCount;h++){a.addFiller({cssPrefix:d.cssPrefix.createChild(["Title","Title"+h])})}}if(l.length>0){b.endInit()}};this.endInit=function(){a.end();a.getButton(0).setState(true);var g=a.getButtonCount();for(i=1;i<g;i++){a.getButton(i).setState(false)}b.canvas.setStyle("display","block");return this};this.addPanel=function(j,h){j=$(j);h=$extend({tabTitle:null,buttonLayerCreationFunc:null},h);var g=c.addPanel(j,{panelName:h.tabName});a.addButton({name:g.name,layerCreationFunc:h.buttonLayerCreationFunc,text:h.tabTitle,cssPrefix:d.cssPrefix.createChild("Title"),createForeground:true,activationTime:d.activationTime,last:h.last}).addEvent("activation",function(k){c.openPanel(k)});return this};f()};var it_Checkbox=function(e,j){j=$extend({cssPrefix:"Checkbox",width:10,height:10,midStateEnabled:false},j);var h=this;var c,d;var f;var b;var a=j.midStateEnabled;var g=function(){e=it_ComponentUtils.init(h,e,j);j.cssPrefix.getClassArray().forEach(function(k){e.addClass(k)});c=new Element("div").inject(h.canvas);it_ComponentUtils.fixSmallElementForIE(c);it_ComponentUtils.absoluteAllOverParentComponent(c,h);d=new Element("div",{"class":j.cssPrefix.getClass("Pressed")}).inject(h.canvas);it_ComponentUtils.fixSmallElementForIE(d);it_ComponentUtils.absoluteAllOverParentComponent(d,h);d.set("opacity",0);it_EventUtils.setButtonMouseEvents(e,{mouseDown:function(){d.set("opacity",1)},mouseUp:function(){d.set("opacity",0)},mouseClick:function(){h.click()}});h.setState("off",false)};this.click=function(){var k;if(b=="off"){k=a?"mid":"on"}else{if(b=="mid"){k="on"}else{k="off"}}this.setState(k)};this.getState=function(){return b};this.getStateBoolean=function(){if(b=="off"){return false}else{if(b=="on"){return true}else{return null}}};this.setState=function(k,l){if(k===false){k="off"}else{if(k===true){k="on"}}if(b===k){return}if(f!=null){c.removeClass(f)}if(k==="off"){f=j.cssPrefix.getClass("Off")}else{if(k==="on"){f=j.cssPrefix.getClass("On")}else{if(k==="mid"){this.setMidStateEnabled(true);f=j.cssPrefix.getClass("Mid")}else{throw new Error("Unknown state: "+k)}}}b=k;c.addClass(f);if(l==null||l){this.fireEvent("stateChanged",[this,b])}};this.isMidStateEnabled=function(){return a};this.setMidStateEnabled=function(k){if(!k&&b=="mid"){h.setState("on")}a=k};g()};var it_Wrapper9=function(c,d){d=$extend({compatibilityMode:false,handlesLayout:true,cssPrefix:"wrapper9",topCssPrefix:null,content:null,topContent:null},d);if(d.content){d.content=$(d.content);d.content.setStyle("overflow","hidden")}if(d.topContent!=null){d.topContent=$(d.topContent)}var l=this;var n,k,m,e,s,p,h,j;var a,f,b,r;var q=function(){if(d.handlesLayout){c=it_ComponentUtils.init(l,c,d)}else{c=it_ComponentUtils.initWithoutLayout(l,c,d)}var t;if(d.topCssPrefix!=null){t=d.topCssPrefix=it_CssUtils.toCssChain(d.topCssPrefix)}else{t=d.cssPrefix}n=g(t,d.compatibilityMode?"LeftCorner":"TopLeft","no-repeat");k=g(t,"Top","repeat-x");m=g(t,d.compatibilityMode?"RightCorner":"TopRight","no-repeat");e=g(d.cssPrefix,"Left","repeat-y");s=g(d.cssPrefix,"Right","repeat-y");p=g(d.cssPrefix,d.compatibilityMode?"LeftBotCorner":"BottomLeft","no-repeat");h=g(d.cssPrefix,d.compatibilityMode?"Bot":"Bottom","repeat-x");j=g(d.cssPrefix,d.compatibilityMode?"RightBotCorner":"BottomRight","no-repeat");if(d.compatibilityMode){o(n,k,m);o(p,h,j);e.setWidth(n.getWidth());s.setWidth(m.getWidth())}if(d.content){d.content.inject(c).setStyle("position","absolute")}if(d.topContent!=null){d.topContent.inject(k).setStyle("position","absolute")}if(d.handlesLayout){l.onStylesReady(l.doLayout)}};var o=function(u,w,v){var t=w.getHeight();u.setStyles({height:t,width:w.getStyle("marginLeft").toInt()});v.setStyles({height:t,width:w.getStyle("marginRight").toInt()});w.setStyle("margin","0")};var g=function(v,t,u){return new Element("div",{"class":v.getClass(t),styles:{backgroundRepeat:u,position:"absolute"}}).inject(c)};this.doLayout=function(){if(a===undefined){a=it_CssUtils.getHeight(k,true);f=it_CssUtils.getWidth(s,true);b=it_CssUtils.getHeight(h,true);r=it_CssUtils.getWidth(e,true);it_ComponentUtils.setSize(n,r,a);it_ComponentUtils.setSize(m,f,a);it_ComponentUtils.setSize(p,r,b);it_ComponentUtils.setSize(j,f,b)}var t=Math.max(0,it_CssUtils.getWidth(c,true)-r-f);var u=Math.max(0,it_CssUtils.getHeight(c,true)-a-b);if(d.content){d.content.setStyles({left:r,width:t});d.content.setStyle({top:a,height:u})}k.setStyles({width:t,left:r});m.setStyle("left",r+t);e.setStyles({top:a,height:u});s.setStyles({top:a,left:r+t,height:u});p.setStyle("top",a+u);h.setStyles({left:r,top:a+u,width:t});j.setStyles({left:r+t,top:a+u})};q()};