var w4util={};w4util._opacityModel=null;w4util.MARGIN_AREA=0;w4util.BORDER_AREA=1;w4util.PADDING_AREA=2;w4util.CONTENT_AREA=3;w4util.EXPAND_SP=0;w4util.FIXED_SP=1;w4util.CONTENT_SP=2;w4util._DFLT_OPACITY=1;w4util._MAX_OPACITY=1;w4util._MIN_OPACITY=0;w4util._DFLT_SHADOW_STREN=0.33;w4util._MAX_SHADOW_STREN=1;w4util._MIN_SHADOW_STREN_SURR=0.08;w4util._MIN_SHADOW_STREN_DROP=0.01;w4util._DFLT_SHADOW_WIDTH=2;w4util._MAX_SHADOW_WIDTH=10;w4util._MIN_SHADOW_WIDTH=0;w4util._DFLT_DROP_SHADOW_X=1;w4util._DFLT_DROP_SHADOW_Y=1;w4util.$checkArg=function(_1,_2,_3,_4,_5,_6){if(arguments.length<3){throw new Error("w4 Error: function w4util.$checkArg() requires at least 3 arguments.");}if(_2==="number"){if(typeof _1!==_2){return _3;}switch(arguments.length){case 3:_4=NaN;case 4:_5=NaN;case 5:_6=false;}if((!_6)&&(isNaN(_1))){return _3;}if(!isNaN(_4)){if(_1<_4){_1=_4;}}if(!isNaN(_5)){if(_1>_5){_1=_5;}}return _1;}else{if(_2==="string"){if(typeof _1!==_2){return _3;}switch(arguments.length){case 3:_4=NaN;case 4:_5=NaN;}if(!isNaN(_4)){if(_1.length<_4){_1=_3;}}if(!isNaN(_5)){if(_1.length>_5){_1=_1.substring(0,_5);}}return _1;}else{if(_2.indexOf("w4")===0){if(!_1.isTypeOf(_2)){return _3;}else{return _1;}}else{if(_2==="HTMLElement"){if(!_1.appendChild){return _3;}else{return _1;}}}}}};w4util.subclass=function(_7,_8){var _9,prop;if(!_8){_8=Object;}_9=new _8();for(prop in _9){if(_9.hasOwnProperty(prop)){delete _9[prop];}}_9.constructor=_7.prototype.constructor;_9._SUPERCLASS=_8;_7.prototype=_9;};w4util.w4Obj=function(){};w4util.w4Obj.prototype.getType=function(){return this._TYPE;};w4util.w4Obj.prototype.isTypeOf=function(_a){var _b;if((typeof _a!=="string")||(_a.indexOf("w4")!==0)){return false;}if(this._TYPE===_a){return true;}else{_b=this;while(_b._TYPE!==w4util.w4Obj.prototype._TYPE){_b=new _b._SUPERCLASS();if(_b._TYPE===_a){return true;}}return false;}};w4util.w4Obj.prototype._TYPE="w4Obj";w4util.w4Obj.prototype._SUPERCLASS=Object;w4util.Pos=function(_c,_d,_e,_f){var _10;this._l=0;this._t=0;this._r=NaN;this._b=NaN;if(arguments.length>0){if(typeof _c==="number"){switch(arguments.length){case 1:_d=NaN;case 2:_e=NaN;case 3:_f=NaN;}this.setLeft(_c);this.setTop(_d);this.setRight(_e);this.setBottom(_f);}else{if((_c)&&(_c.isTypeOf)&&(_c.isTypeOf(this._TYPE))){_10=_c;this._l=_10._l;this._t=_10._t;this._r=_10._r;this._b=_10._b;}}}};w4util.subclass(w4util.Pos,w4util.w4Obj);w4util.Pos.prototype.toString=function(){return "{left:\ufffd"+this._l+", top:\ufffd"+this._t+", right:\ufffd"+this._r+", bottom:\ufffd"+this._b+"}";};w4util.Pos.prototype.getLeft=function(){return this._l;};w4util.Pos.prototype.getTop=function(){return this._t;};w4util.Pos.prototype.getRight=function(){return this._r;};w4util.Pos.prototype.getBottom=function(){return this._b;};w4util.Pos.prototype.setLeft=function(pos){this._l=w4util.$checkArg(pos,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE,true);};w4util.Pos.prototype.setTop=function(pos){this._t=w4util.$checkArg(pos,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE,true);};w4util.Pos.prototype.setRight=function(pos){this._r=w4util.$checkArg(pos,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE,true);};w4util.Pos.prototype.setBottom=function(pos){this._b=w4util.$checkArg(pos,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE,true);};w4util.Pos.prototype.translate=function(_15,_16,_17,_18){_15=w4util.$checkArg(_15,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);_16=w4util.$checkArg(_16,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);_17=w4util.$checkArg(_17,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);_18=w4util.$checkArg(_18,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);if((_15!==0)&&(!isNaN(this._l))){this._l=w4util.$checkArg(this._l+_15,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);}if((_16!==0)&&(!isNaN(this._t))){this._t=w4util.$checkArg(this._t+_16,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);}if((_17!==0)&&(!isNaN(this._r))){this._r=w4util.$checkArg(this._r+_17,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);}if((_18!==0)&&(!isNaN(this._b))){this._b=w4util.$checkArg(this._b+_18,"number",0,this._MIN_POS_VALUE,this._MAX_POS_VALUE);}};w4util.Pos.prototype._TYPE="w4Pos";w4util.Pos.prototype._MIN_POS_VALUE=-99999;w4util.Pos.prototype._MAX_POS_VALUE=99999;w4util.Size=function(_19,_1a){var _1b;this._w=NaN;this._h=NaN;if(arguments.length>0){if(typeof _19==="number"){if(arguments.length===1){_1a=NaN;}this.setWidth(_19);this.setHeight(_1a);}else{if((_19)&&(_19.isTypeOf)&&(_19.isTypeOf(this._TYPE))){_1b=_19;this._w=_1b._w;this._h=_1b._h;}}}};w4util.subclass(w4util.Size,w4util.w4Obj);w4util.Size.prototype.toString=function(){return "{width:\ufffd"+this._w+", height:\ufffd"+this._h+"}";};w4util.Size.prototype.getWidth=function(){return this._w;};w4util.Size.prototype.getHeight=function(){return this._h;};w4util.Size.prototype.setWidth=function(len){this._w=w4util.$checkArg(len,"number",0,this._MIN_SIZE_VALUE,this._MAX_SIZE_VALUE,true);};w4util.Size.prototype.setHeight=function(len){this._h=w4util.$checkArg(len,"number",0,this._MIN_SIZE_VALUE,this._MAX_SIZE_VALUE,true);};w4util.Size.prototype.expand=function(_1e,_1f){_1e=w4util.$checkArg(_1e,"number",0,this._MIN_DELTA_VALUE,this._MAX_SIZE_VALUE);_1f=w4util.$checkArg(_1f,"number",0,this._MIN_DELTA_VALUE,this._MAX_SIZE_VALUE);if(_1e!==0){this._w=w4util.$checkArg(this._w+_1e,"number",0,this._MIN_SIZE_VALUE,this._MAX_SIZE_VALUE);}if(_1f!==0){this._h=w4util.$checkArg(this._h+_1f,"number",0,this._MIN_SIZE_VALUE,this._MAX_SIZE_VALUE);}};w4util.Size.prototype._TYPE="w4Size";w4util.Size.prototype._MIN_SIZE_VALUE=0;w4util.Size.prototype._MAX_SIZE_VALUE=99999;w4util.Size.prototype._MIN_DELTA_VALUE=-99999;w4util.PosSize=function(_20,_21){var _22;this._p=new w4util.Pos();this._s=new w4util.Size();if(arguments.length>0){if((_20)&&(_20.isTypeOf)&&(_20.isTypeOf(this._p.getType()))){this._p=_20;if(arguments.length===1){this._s=new w4util.Size(NaN,NaN);}else{this.setSize(_21);}}else{if((_20)&&(_20.isTypeOf)&&(_20.isTypeOf(this._TYPE))){_22=_20;this._p=new w4util.Pos(_22._p);this._s=new w4util.Size(_22._s);}}}};w4util.subclass(w4util.PosSize,w4util.w4Obj);w4util.PosSize.prototype.toString=function(){return "{Pos:\ufffd"+this._p.toString()+", Size:\ufffd"+this._s.toString()+"}";};w4util.PosSize.prototype.getPos=function(){return this._p;};w4util.PosSize.prototype.getSize=function(){return this._s;};w4util.PosSize.prototype.setPos=function(_23){this._p=w4util.$checkArg(_23,"w4Pos",new w4util.Pos());};w4util.PosSize.prototype.setSize=function(_24){this._s=w4util.$checkArg(_24,"w4Size",new w4util.Size());};w4util.PosSize.prototype._TYPE="w4PosSize";w4util.SizePolicy=function(_25,_26,_27){var _28;this._w=w4util.EXPAND_SP;this._h=w4util.EXPAND_SP;this._s=new w4util.Size(this._DFLT_WIDTH,this._DFLT_HEIGHT);if(arguments.length>0){if(typeof _25==="number"){switch(arguments.length){case 1:_26=w4util.EXPAND_SP;case 2:_27=new w4util.Size(this._DFLT_WIDTH,this._DFLT_HEIGHT);}this.setWSizePol(_25);this.setHSizePol(_26);this.setSize(_27);}else{if((_25)&&(_25.isTypeOf)&&(_25.isTypeOf(this._TYPE))){_28=_25;this._w=_28._w;this._h=_28._h;this._s=new w4util.Size(_28._s);}}}};w4util.subclass(w4util.SizePolicy,w4util.w4Obj);w4util.SizePolicy.prototype.toString=function(){return "{wSizePol:\ufffd"+this._w+", hSizePol:\ufffd"+this._h+", Size:\ufffd"+this._s.toString()+"}";};w4util.SizePolicy.prototype.getWSizePol=function(){return this._w;};w4util.SizePolicy.prototype.getHSizePol=function(){return this._h;};w4util.SizePolicy.prototype.getSize=function(){return this._s;};w4util.SizePolicy.prototype.setWSizePol=function(_29){this._w=w4util.$checkArg(_29,"number",w4util.EXPAND_SP,w4util.EXPAND_SP,w4util.FIXED_SP);};w4util.SizePolicy.prototype.setHSizePol=function(_2a){this._h=w4util.$checkArg(_2a,"number",w4util.EXPAND_SP,w4util.EXPAND_SP,w4util.FIXED_SP);};w4util.SizePolicy.prototype.setSize=function(_2b){this._s=w4util.$checkArg(_2b,"w4Size",new w4util.Size(this._DFLT_WIDTH,this._DFLT_HEIGHT));};w4util.SizePolicy.prototype._TYPE="w4SizePolicy";w4util.SizePolicy.prototype._DFLT_WIDTH=10;w4util.SizePolicy.prototype._DFLT_HEIGHT=10;w4util.Widget=function(_2c){var _2d;this._pe=document.body;this._sp=new w4util.SizePolicy();this._ce=null;this._cetn=this._DFLT_CONT_ELEM_TN;this._cecn=this._DFLT_CONT_ELEM_CN;this._cep=new w4util.Pos();if(arguments.length>0){if((_2c)&&(_2c.isTypeOf)&&(_2c.isTypeOf(this._sp.getType()))){this._sp=_2c;}else{if((_2c)&&(_2c.isTypeOf)&&(_2c.isTypeOf(this._TYPE))){_2d=_2c;this._pe=_2d._pe;this._sp=new w4util.SizePolicy(_2d._sp);this._ce=null;this._cetn=new String(_2d._cetn);this._cecn=new String(_2d._cecn);this._cep=new w4util.Pos(_2d._cep);}}}};w4util.subclass(w4util.Widget,w4util.w4Obj);w4util.Widget.prototype.toString=function(){return "{parentElem:\ufffd"+this._pe.toString()+", sizePolicy:\ufffd"+this._sp.toString()+", cePos:\ufffd"+this._cep.toString()+", containerElem:\ufffd"+(this._ce?this._ce.toString():"null")+", containerElemClassName:\ufffd"+this._cecn+"}";};w4util.Widget.prototype.getParentElem=function(){return this._pe;};w4util.Widget.prototype.getSizePolicy=function(){return this._sp;};w4util.Widget.prototype.getCE=function(){return this._ce;};w4util.Widget.prototype.getCEClassName=function(){return this._cecn;};w4util.Widget.prototype.getCETagName=function(){return this._cetn;};w4util.Widget.prototype.getCEPos=function(){return this._cep;};w4util.Widget.prototype.setParentElem=function(_2e){if(this._ce===null){this._pe=w4util.$checkArg(_2e,"HTMLElement",document.body);}};w4util.Widget.prototype.setSizePolicy=function(_2f){this._sp=w4util.$checkArg(_2f,"w4SizePolicy",new w4util.SizePolicy());if(this._ce!==null){this.reSize();}};w4util.Widget.prototype.setCEClassName=function(_30){this._cecn=w4util.$checkArg(_30,"string",this._DFLT_CONT_ELEM_CN,1);if(this._ce!==null){this._ce.className=this._cecn;}};w4util.Widget.prototype.setCETagName=function(_31){if(this._ce===null){this._cetn=w4util.$checkArg(_31,"string",this._DFLT_CONT_ELEM_TN,1);}};w4util.Widget.prototype.setCEPos=function(_32){this._cep=w4util.$checkArg(_32,"w4Pos",new w4util.Pos());if(this._ce!==null){this.rePos();}};w4util.Widget.prototype.build=function(_33){if(this._ce!==null){w4util.error("w4util.Widget.build(): this widget has already been builded...");return;}if(arguments.length===0){_33=false;}else{if(typeof _33!=="boolean"){_33=false;}}this._ce=document.createElement(this._cetn);this._ce.className=this._cecn;this._ce.style.visibility=(_33?"visible":"hidden");this._pe.appendChild(this._ce);this.rePos();this.reSize();};w4util.Widget.prototype.rePos=function(){var _34,parentStyles;if(this._ce===null){return;}_34=new w4util.Pos(this._cep);parentStyles=w4util.getAllCssProp(this._pe);if(parentStyles!==null){_34.translate(w4util._getPixelValue(parentStyles.paddingLeft),w4util._getPixelValue(parentStyles.paddingTop),w4util._getPixelValue(parentStyles.paddingRight),w4util._getPixelValue(parentStyles.paddingBottom));}w4util.setElemPos(this._ce,_34,w4util.BORDER_AREA);};w4util.Widget.prototype.reSize=function(){var _35,sizePolSize,parentSize;if(this._ce===null){return;}_35=new w4util.Size();sizePolSize=this._sp.getSize();parentSize=w4util.getElemSize(this._pe,w4util.CONTENT_AREA);switch(this._sp.getWSizePol()){case w4util.EXPAND_SP:_35.setWidth(parentSize.getWidth());break;case w4util.FIXED_SP:_35.setWidth(sizePolSize.getWidth());break;}switch(this._sp.getWSizePol()){case w4util.EXPAND_SP:_35.setHeight(parentSize.getHeight());break;case w4util.FIXED_SP:_35.setHeight(sizePolSize.getHeight());break;}w4util.setElemSize(this._ce,_35,w4util.BORDER_AREA);};w4util.Widget.prototype.show=function(_36){if(this._ce===null){return;}if(arguments.length===0){_36=true;}else{if(typeof _36!=="boolean"){_36=true;}}this._ce.style.visibility=(_36?"visible":"hidden");};w4util.Widget.prototype._TYPE="w4Widget";w4util.Widget.prototype._DFLT_CONT_ELEM_CN="w4Widget";w4util.Widget.prototype._DFLT_CONT_ELEM_TN="div";w4util.ContWidget=function(_37,_38){var _39;if(arguments.length===0){this._SUPERCLASS();}else{this._SUPERCLASS(_37);}this._cw=null;this._ssb=false;this._dce=false;this._cce=null;this._ccecn=this._DFLT_CONTENT_ELEM_CN;this._ccem=new w4util.Pos(this._DFLT_CONTENT_ELEM_MARGIN);if(arguments.length>1){if((_37)&&(_37.isTypeOf)&&(_37.isTypeOf(this._sp.getType()))){this.setChildWidget(_38);}else{if((_37)&&(_37.isTypeOf)&&(_37.isTypeOf(this._TYPE))){_39=_37;this._cw=null;this._ssb=_39._ssb;this._dce=_39._dce;this._cce=null;this._ccecn=new String(_39._ccecn);this._ccem=new w4util.Pos(_39._ccem);}}}};w4util.subclass(w4util.ContWidget,w4util.Widget);w4util.ContWidget.prototype.toString=function(){return "{superclass Widget:\ufffd"+this._SUPERCLASS.prototype.toString.call(this)+", showScrollBars:\ufffd"+this._ssb.toString()+", distinctContentElem:\ufffd"+this._dce.toString()+", contentContainerElem:\ufffd"+(this._cce?this._cce.toString():"null")+", contentContainerElemClassName:\ufffd"+this._ccecn+", contentContainerElemMargin:\ufffd"+this._ccem.toString()+"}";};w4util.ContWidget.prototype.getChildWidget=function(){return this._cw;};w4util.ContWidget.prototype.getShowScrollBars=function(){return this._ssb;};w4util.ContWidget.prototype.getDistinctContentElem=function(){return this._dce;};w4util.ContWidget.prototype.getCCE=function(){return this._cce;};w4util.ContWidget.prototype.getCCEClassName=function(){return this._ccecn;};w4util.ContWidget.prototype.getCCEMargin=function(){return this._ccem;};w4util.ContWidget.prototype.setShowScrollBars=function(ssb){this._ssb=(typeof ssb==="boolean"?ssb:false);if(this._cce!==null){this._cce.style.overflow=(this._ssb?"auto":"hidden");}};w4util.ContWidget.prototype.setDistinctContentElem=function(dce){if(this._ce===null){this._dce=(typeof dce==="boolean"?dce:false);}};w4util.ContWidget.prototype.setCCEClassName=function(_3c){this._ccecn=w4util.$checkArg(_3c,"string",this._DFLT_CONTENT_ELEM_CN,1);if(this._cce!==null){this._cce.className=this._ccecn;}};w4util.ContWidget.prototype.setCCEMargin=function(_3d){this._ccem=w4util.$checkArg(_3d,"w4Pos",new w4util.Pos(this._DFLT_CONTENT_ELEM_MARGIN));if(this._ce!==null){this.rePosSizeContent();}};w4util.ContWidget.prototype.setChildWidget=function(_3e){if((!_3e)||(!_3e.isTypeOf)||(!_3e.isTypeOf("w4Widget"))){w4util.error("w4util.ContWidget.setChildWidget(): you have to specify a w4 widget object as argument for this method...");return;}if(_3e.getCE()!==null){w4util.error("w4util.ContWidget.setChildWidget(): you have to specify an UNBUILDED w4 widget object as argument for this method...");return;}if((this._cw!==null)&&(this._cw.getCE()!==null)){w4util.error("w4util.ContWidget.setChildWidget(): this container widget already contains a builded child widget...");return;}this._cw=_3e;if(this._cce!==null){this._cw.setParentElem(this._cce);this._cw.build();this._cw.show();}};w4util.ContWidget.prototype.build=function(_3f){var _40,cceSize,parentSize,parentStyles;if(this._ce!==null){w4util.error("w4util.ContWidget.build(): this container widget has already been builded...");return;}if(arguments.length===0){_3f=false;}else{if(typeof _3f!=="boolean"){_3f=false;}}this._SUPERCLASS.prototype.build.call(this,_3f);if(this._dce){this._cce=document.createElement("div");this._cce.className=this._ccecn;this._ce.appendChild(this._cce);this.rePosSizeContent();}else{this._cce=this._ce;}this._cce.style.overflow=(this._ssb?"auto":"hidden");if(this._cw!==null){this._cw.setParentElem(this._cce);this._cw.build(true);}};w4util.ContWidget.prototype.reSize=function(){var _41,cceSize,parentSize,parentStyles;if(this._ce===null){return;}this._SUPERCLASS.prototype.reSize.call(this);this.rePosSizeContent();};w4util.ContWidget.prototype.rePosSizeContent=function(){var _42,cceSize,parentSize,parentStyles;if((this._ce===null)||(!this._dce)){return;}parentSize=w4util.getElemSize(this._ce,w4util.CONTENT_AREA);_42=new w4util.Pos(this._ccem.getLeft(),this._ccem.getTop());parentStyles=w4util.getAllCssProp(this._ce);if(parentStyles!==null){_42.translate(w4util._getPixelValue(parentStyles.paddingLeft),w4util._getPixelValue(parentStyles.paddingTop),0,0);}cceSize=new w4util.Size(parentSize.getWidth()-this._ccem.getLeft()-this._ccem.getRight(),parentSize.getHeight()-this._ccem.getTop()-this._ccem.getBottom());w4util.setElemPos(this._cce,_42,w4util.BORDER_AREA);w4util.setElemSize(this._cce,cceSize,w4util.BORDER_AREA);};w4util.ContWidget.prototype._TYPE="w4ContWidget";w4util.ContWidget.prototype._DFLT_CONTENT_ELEM_CN="w4Content";w4util.ContWidget.prototype._DFLT_CONTENT_ELEM_MARGIN=new w4util.Pos(4,4,4,4);w4util.Image=function(url,_44){var _45;if((url)&&(url.isTypeOf)&&(url.isTypeOf(this._TYPE))){this._SUPERCLASS(url);}else{this._SUPERCLASS(new w4util.SizePolicy(w4util.CONTENT_SP,w4util.CONTENT_SP));this._cetn="img";this._cecn=this._DFLT_CONT_ELEM_CN;}this._url="";this._at="";this._sf=1;if(arguments.length>1){if(typeof url==="string"){this.setURL(url);this.setAltTxt(_44);}else{if((url)&&(url.isTypeOf)&&(url.isTypeOf(this._TYPE))){_45=url;this._url=new String(_45._url);this._at=new String(_45._at);this._sf=_45._sf;}}}};w4util.subclass(w4util.Image,w4util.Widget);w4util.Image.prototype.toString=function(){return "{superclass Widget:\ufffd"+this._SUPERCLASS.prototype.toString.call(this)+", URL:\ufffd"+this._url+", alternate text:\ufffd"+this._at+"}";};w4util.Image.prototype.getURL=function(){return this._url;};w4util.Image.prototype.getAltText=function(){return this._at;};w4util.Image.prototype.getScale=function(){return this._sf;};w4util.Image.prototype.setURL=function(url){this._url=w4util.$checkArg(url,"string",this._DFLT_IMAGE_URL);if(this._ce!==null){this._ce.src=url;this.reSize();}};w4util.Image.prototype.setAltTxt=function(_47){this._at=w4util.$checkArg(_47,"string","");if(this._ce!==null){this._ce.alt=_47;}};w4util.Image.prototype.setScale=function(_48){this._sf=w4util.$checkArg(_48,"number",1,0);if(this._ce!==null){this.reSize();}};w4util.Image.prototype.build=function(_49){if(this._ce!==null){w4util.error("w4util.Image.build(): this image widget has already been builded...");return;}if(arguments.length===0){_49=false;}else{if(typeof _49!=="boolean"){_49=false;}}this._SUPERCLASS.prototype.build.call(this,_49);this._ce.src=this._url;this._ce.alt=this._altTxt;this.reSize();};w4util.Image.prototype.reSize=function(){var _4a,sizePolSize,parentSize;if(this._ce===null){return;}_4a=new w4util.Size();sizePolSize=this._sp.getSize();parentSize=w4util.getElemSize(this._pe,w4util.CONTENT_AREA);switch(this._sp.getWSizePol()){case w4util.EXPAND_SP:_4a.setWidth(parentSize.getWidth());break;case w4util.FIXED_SP:_4a.setWidth(sizePolSize.getWidth());break;}switch(this._sp.getWSizePol()){case w4util.EXPAND_SP:_4a.setHeight(parentSize.getHeight());break;case w4util.FIXED_SP:_4a.setHeight(sizePolSize.getHeight());break;}w4util.setElemSize(this._ce,_4a,w4util.BORDER_AREA);};w4util.Image.prototype._TYPE="w4Image";w4util.Image.prototype._DFLT_CONTENT_ELEM_CN="w4Image";w4util.Image.prototype._DFLT_IMAGE_URL="../img/default.gif";w4util.getElemPos=function(_4b,_4c){var _4d,currStyle;if((!_4b)||(!_4b.appendChild)){return null;}if(arguments.length===1){_4c=w4util.MARGIN_AREA;}else{_4c=w4util.$checkArg(_4c,"number",w4util.MARGIN_AREA,w4util.MARGIN_AREA,w4util.CONTENT_AREA);}currStyle=w4util.getAllCssProp(_4b);if(currStyle===null){return new w4util.Pos(_4b.offsetLeft,_4b.offsetTop);}_4d=new w4util.Pos(w4util._getPixelValue(currStyle.left,NaN),w4util._getPixelValue(currStyle.top,NaN),w4util._getPixelValue(currStyle.right,NaN),w4util._getPixelValue(currStyle.bottom,NaN));if(_4c!==w4util.MARGIN_AREA){switch(_4c){case w4util.CONTENT_AREA:_4d.translate(w4util._getPixelValue(currStyle.paddingLeft),w4util._getPixelValue(currStyle.paddingTop),w4util._getPixelValue(currStyle.paddingRight),w4util._getPixelValue(currStyle.paddingBottom));case w4util.PADDING_AREA:_4d.translate(w4util._getPixelValue(currStyle.borderLeftWidth),w4util._getPixelValue(currStyle.borderTopWidth),w4util._getPixelValue(currStyle.borderRightWidth),w4util._getPixelValue(currStyle.borderBottomWidth));case w4util.BORDER_AREA:_4d.translate(w4util._getPixelValue(currStyle.marginLeft),w4util._getPixelValue(currStyle.marginTop),w4util._getPixelValue(currStyle.marginRight),w4util._getPixelValue(currStyle.marginBottom));}}return _4d;};w4util.getElemSize=function(_4e,_4f){var _50,currStyle;if((!_4e)||(!_4e.appendChild)){return null;}if(arguments.length===1){_4f=w4util.BORDER_AREA;}else{_4f=w4util.$checkArg(_4f,"number",w4util.BORDER_AREA,w4util.MARGIN_AREA,w4util.CONTENT_AREA);}if(_4e===document.body){_50=w4util.getViewPortSize();}else{_50=new w4util.Size(_4e.offsetWidth,_4e.offsetHeight);}if(_4f!==w4util.BORDER_AREA){currStyle=w4util.getAllCssProp(_4e);if(currStyle!==null){if(_4f===w4util.MARGIN_AREA){_50.expand(w4util._getPixelValue(currStyle.marginLeft)+w4util._getPixelValue(currStyle.marginRight),w4util._getPixelValue(currStyle.marginTop)+w4util._getPixelValue(currStyle.marginBottom));}else{switch(_4f){case w4util.CONTENT_AREA:_50.expand(-w4util._getPixelValue(currStyle.paddingLeft)-w4util._getPixelValue(currStyle.paddingRight),-w4util._getPixelValue(currStyle.paddingTop)-w4util._getPixelValue(currStyle.paddingBottom));case w4util.PADDING_AREA:_50.expand(-w4util._getPixelValue(currStyle.borderLeftWidth)-w4util._getPixelValue(currStyle.borderRightWidth),-w4util._getPixelValue(currStyle.borderTopWidth)-w4util._getPixelValue(currStyle.borderBottomWidth));}}}}return _50;};w4util.getElemPosSize=function(_51,_52,_53){var _54;if((!_51)||(!_51.appendChild)){return null;}switch(arguments.length){case 1:_52=w4util.MARGIN_AREA;case 2:_53=w4util.BORDER_AREA;}return new w4util.PosSize(w4util.getElemPos(_51,_52),w4util.getElemSize(_51,_53));};w4util.setElemPos=function(_55,_56,_57){var _58;if((!_55)||(!_55.appendChild)){return;}if((!_56)||(!_56.isTypeOf)||(!_56.isTypeOf("w4Pos"))){return;}if(arguments.length===2){_57=w4util.MARGIN_AREA;}else{_57=w4util.$checkArg(_57,"number",w4util.MARGIN_AREA,w4util.MARGIN_AREA,w4util.CONTENT_AREA);}boxPos=new w4util.Pos(_56);if(_57!==w4util.MARGIN_AREA){_58=w4util.getAllCssProp(_55);if(_58!==null){switch(_57){case w4util.CONTENT_AREA:boxPos.translate(-w4util._getPixelValue(_58.paddingLeft),-w4util._getPixelValue(_58.paddingTop),-w4util._getPixelValue(_58.paddingRight),-w4util._getPixelValue(_58.paddingBottom));case w4util.PADDING_AREA:boxPos.translate(-w4util._getPixelValue(_58.borderLeftWidth),-w4util._getPixelValue(_58.borderTopWidth),-w4util._getPixelValue(_58.borderRightWidth),-w4util._getPixelValue(_58.borderBottomWidth));case w4util.BORDER_AREA:boxPos.translate(-w4util._getPixelValue(_58.marginLeft),-w4util._getPixelValue(_58.marginTop),-w4util._getPixelValue(_58.marginRight),-w4util._getPixelValue(_58.marginBottom));}}}_55.style.left=w4util._getPixelString(boxPos.getLeft());_55.style.top=w4util._getPixelString(boxPos.getTop());_55.style.right=w4util._getPixelString(boxPos.getRight());_55.style.bottom=w4util._getPixelString(boxPos.getBottom());};w4util.setElemSize=function(_59,_5a,_5b){var _5c;if((!_59)||(!_59.appendChild)||(_59===document.body)){return;}if((!_5a)||(!_5a.isTypeOf)||(!_5a.isTypeOf("w4Size"))){return;}if(arguments.length===2){_5b=w4util.CONTENT_AREA;}else{_5b=w4util.$checkArg(_5b,"number",w4util.CONTENT_AREA,w4util.MARGIN_AREA,w4util.CONTENT_AREA);}boxSize=new w4util.Size(_5a);if(_5b!==w4util.CONTENT_AREA){_5c=w4util.getAllCssProp(_59);if(_5c!==null){switch(_5b){case w4util.MARGIN_AREA:boxSize.expand(-w4util._getPixelValue(_5c.marginLeft)-w4util._getPixelValue(_5c.marginRight),-w4util._getPixelValue(_5c.marginTop)-w4util._getPixelValue(_5c.marginBottom));case w4util.BORDER_AREA:boxSize.expand(-w4util._getPixelValue(_5c.borderLeftWidth)-w4util._getPixelValue(_5c.borderRightWidth),-w4util._getPixelValue(_5c.borderTopWidth)-w4util._getPixelValue(_5c.borderBottomWidth));case w4util.PADDING_AREA:boxSize.expand(-w4util._getPixelValue(_5c.paddingLeft)-w4util._getPixelValue(_5c.paddingRight),-w4util._getPixelValue(_5c.paddingTop)-w4util._getPixelValue(_5c.paddingBottom));}}}_59.style.width=w4util._getPixelString(boxSize.getWidth());_59.style.height=w4util._getPixelString(boxSize.getHeight());};w4util.setElemPosSize=function(_5d,_5e,_5f,_60){if((!_5d)||(!_5d.appendChild)){return null;}if((!_5e)||(!_5e.isTypeOf)||(!_5e.isTypeOf("w4PosSize"))){return;}switch(arguments.length){case 2:_5f=w4util.MARGIN_AREA;case 3:_60=w4util.CONTENT_AREA;}w4util.setElemPos(_5d,_5e.getPos(),_5f);w4util.setElemSize(_5d,_5e.getSize(),_60);};w4util.getViewPortSize=function(){var _61;if(window.innerWidth){_61=new w4util.Size(window.innerWidth,window.innerHeight);}else{if(document.documentElement&&document.documentElement.clientWidth){_61=new w4util.Size(document.documentElement.clientWidth,document.documentElement.clientHeight);}else{if(document.body.clientWidth){_61=new w4util.Size(document.body.clientWidth,document.body.clientHeight);}}}return _61;};w4util.appendSurroundShadow=function(_62,_63,_64,_65){var _66,currOpacity,currPosSize,i,shadowDiv;if((!_62)||(!_62.appendChild)){return;}switch(arguments.length){case 1:_63=w4util.getElemSize(_62);case 2:_64=w4util._DFLT_SHADOW_STREN;case 3:_65=w4util._DFLT_SHADOW_WIDTH;}if((!_63.isTypeOf)||(!_63.isTypeOf("w4Size"))){_63=w4util.getElemSize(_62);}_64=w4util.$checkArg(_64,"number",w4util._DFLT_SHADOW_STREN,w4util._MIN_SHADOW_STREN_SURR,w4util._MAX_SHADOW_STREN);_65=w4util.$checkArg(_65,"number",w4util._DFLT_SHADOW_WIDTH,w4util._MIN_SHADOW_WIDTH,w4util._MAX_SHADOW_WIDTH);if(_65===0){return;}_66=((_65>1)?(_64-w4util._MIN_SHADOW_STREN_SURR)/(_65-1):0);currPosSize=new w4util.PosSize(new w4util.Pos(-1,-1),new w4util.Size(_63));for(i=0,currOpacity=_64;i<_65;i++,currOpacity-=_66,currPosSize.getPos().translate(-1,-1),currPosSize.getSize().expand(2,2)){shadowDiv=document.createElement("div");shadowDiv.className="w4SurroundShadow";w4util.setOpacity(shadowDiv,currOpacity);w4util.setElemPosSize(shadowDiv,currPosSize);_62.appendChild(shadowDiv);}};w4util.appendDropShadow=function(_67,_68,_69,_6a){var _6b,currPosSize,i,shadowDiv;if((!_67)||(!_67.appendChild)){return;}switch(arguments.length){case 1:_68=w4util.getElemSize(_67);case 2:_69=w4util._DFLT_SHADOW_STREN;case 3:_6a=w4util._DFLT_SHADOW_WIDTH;}if((!_68.isTypeOf)||(!_68.isTypeOf("w4Size"))){_68=w4util.getElemSize(_67);}_69=w4util.$checkArg(_69,"number",w4util._DFLT_SHADOW_STREN,w4util._MIN_SHADOW_STREN_DROP,w4util._MAX_SHADOW_STREN);_6a=w4util.$checkArg(_6a,"number",w4util._DFLT_SHADOW_WIDTH,w4util._MIN_SHADOW_WIDTH,w4util._MAX_SHADOW_WIDTH);if(_6a===0){return;}_6b=_69/_6a;if(_6b<w4util._MIN_SHADOW_STREN_DROP){_6b=w4util._MIN_SHADOW_STREN_DROP;}currPosSize=new w4util.PosSize(new w4util.Pos(w4util._DFLT_DROP_SHADOW_X,w4util._DFLT_DROP_SHADOW_Y),_68);for(i=0;i<_6a;i++,currPosSize.getPos().translate(w4util._DFLT_DROP_SHADOW_X,w4util._DFLT_DROP_SHADOW_Y)){shadowDiv=document.createElement("div");shadowDiv.className="w4DropShadow";w4util.setOpacity(shadowDiv,_6b);w4util.setElemPosSize(shadowDiv,currPosSize);_67.appendChild(shadowDiv);}};w4util.setOpacity=function(_6c,_6d){var _6e;if((!_6c)||(!_6c.style)||(w4util._opacityModel===-1)){return;}if(arguments.length===1){_6d=w4util._DFLT_OPACITY;}else{if(typeof _6d!=="number"){_6d=w4util._DFLT_OPACITY;}else{if(_6d<w4util._MIN_OPACITY){_6d=w4util._MIN_OPACITY;}else{if(_6d>w4util._MAX_OPACITY){_6d=w4util._MAX_OPACITY;}}}}if(w4util._opacityModel===null){if((_6c.style.opacity)||(_6c.style.opacity==="")){w4util._opacityModel=0;}else{if((_6c.style.filter)||(_6c.style.filter==="")){w4util._opacityModel=1;}else{if((_6c.style.MozOpacity)||(_6c.style.MozOpacity==="")){w4util._opacityModel=2;}else{w4util._opacityModel=-1;}}}}_6e=[function(){_6c.style.opacity=_6d.toFixed(2);},function(){_6c.style.filter="alpha(opacity="+(_6d*100).toFixed(0)+")";},function(){_6c.style.MozOpacity=_6d.toFixed(2);}];if(w4util._opacityModel!==-1){_6e[w4util._opacityModel]();}};w4util.getAllCssProp=function(_6f){if((!_6f)||(!_6f.style)){return null;}if(window.getComputedStyle){return getComputedStyle(_6f,null);}else{if(_6f.currentStyle){return _6f.currentStyle;}else{return null;}}};w4util.cuStrArraySort=function(_70,_71){var _72,strb,isAStr,isBStr;isAStr=(_70.toLowerCase);isBStr=(_71.toLowerCase);if((!isAStr)&&(isAStr.toString)){_70=_70.toString();isAStr=(_70.toLowerCase);}if((!isBStr)&&(isBStr.toString)){_71=_71.toString();isBStr=(_71.toLowerCase);}if((isAStr)&&(isBStr)){_72=_70.toLowerCase();strb=_71.toLowerCase();if(_72<strb){return -1;}else{if(_72===strb){return 0;}else{return 1;}}}else{if((isAStr)&&(!isBStr)){return -1;}else{if((!isAStr)&&(isBStr)){return 1;}else{return 0;}}}};w4util._getPixelValue=function(_73,_74){if(arguments.length===1){_74=0;}var _75=_73.indexOf("px");if((_75===-1)||(_75!==_73.length-2)){return _74;}return parseFloat(_73);};w4util._getPixelString=function(_76){if(isNaN(_76)){return "";}return _76.toFixed(0)+"px";};w4util.$cuStrArraySort=function(_77,_78){var _79=_77.toLowerCase();var _7a=_78.toLowerCase();if(_79<_7a){return -1;}else{if(_79===_7a){return 0;}else{return 1;}}};