function grip_insertAdjacentHTML(_1,_2,_3){var _4,docFrag;if(document.all){_4=document.all[_2];if(_4.insertAdjacentHTML){_4.insertAdjacentHTML(_1,_3);}}else{if(document.getElementById&&document.createRange){var _5=document.createRange();_4=document.getElementById(_2);if(_1=="beforeEnd"){_5.setStartAfter(_4.lastChild);docFrag=_5.createContextualFragment(_3);_4.appendChild(docFrag);}else{if(_1=="afterBegin"){_5.setStartBefore(_4.firstChild);docFrag=_5.createContextualFragment(_3);_4.insertBefore(docFrag,_4.firstChild);}}}}}function grip_addLoadEvent(_6){var _7=window.onload;if(typeof window.onload!="function"){window.onload=_6;}else{window.onload=function(){_7();_6();};}}var grip_isLoaded=false;grip_addLoadEvent(function(){grip_isLoaded=true;});var g_currentGrip;this.grip_onmousemove=function(ev){return g_currentGrip._img_onmousemove(ev);};this.grip_onmouseup=function(ev){return g_currentGrip._img_onmouseup(ev);};if(!g_resizeGrips){var g_resizeGrips=[];}function ResizeGrip(_a,_b){this.BOTH=0;this.VERTICAL=1;this.HORIZONTAL=2;this.gripImage="include/js/resizegrip/resizegrip.gif";this.gripImageWidth=16;this.gripImageHeight=16;this.gripImageLeft="include/js/resizegrip/se-left.gif";this.gripImageRight="include/js/resizegrip/se-right.gif";this.gripImageTop="include/js/resizegrip/se-top.gif";this.gripImageBottom="include/js/resizegrip/se-bottom.gif";this.gripImageCorner="include/js/resizegrip/se-corner.gif";this.gripImageSize=5;this.gripSize=15;this.minWidth=64;this.minHeight=32;this.maxWidth=-1;this.maxHeight=-1;var _c;var _d;var _e;var _f;var _10;var _11;var _id;var _13=this.BOTH;var _14=[];function _offsetWidth(obj){if(obj.offsetWidth){return obj.offsetWidth;}else{return obj.clientWidth;}}function _offsetHeight(obj){if(obj.offsetHeight){return obj.offsetHeight;}else{return obj.clientHeight;}}function _width(obj){if(obj.style.width){return parseInt(obj.style.width,10);}else{return _offsetWidth(obj);}}function _height(obj){if(obj.style.height){return parseInt(obj.style.height,10);}else{return _offsetHeight(obj);}}this.constructor=function(){_id=g_resizeGrips.length;g_resizeGrips[_id]=this;};this._repositionElements=function(_19,_1a,_1b){if((this.maxWidth!=-1)&&(_19>this.maxWidth)){_19=this.maxWidth;}if((this.maxHeight!=-1)&&(_1a>this.maxHeight)){_1a=this.maxHeight;}if(_19<this.minWidth){_19=this.minWidth;}if(_1a<this.minHeight){_1a=this.minHeight;}if((_13==this.HORIZONTAL)||(_13==this.BOTH)){_c.style.width=_19+"px";}if((_13==this.VERTICAL)||(_13==this.BOTH)){_c.style.height=_1a+"px";}if((_13==this.HORIZONTAL)||(_13==this.BOTH)){if(false){_d.style.left=(_offsetWidth(_c)-this.gripImageWidth)+"px";}else{_d[0].style.left=(_offsetWidth(_c))+"px";_d[1].style.left=(_offsetWidth(_c)-this.gripSize+this.gripImageSize)+"px";_d[2].style.left=(_offsetWidth(_c))+"px";_d[3].style.left=(_offsetWidth(_c))+"px";_d[4].style.left=(_offsetWidth(_c)-this.gripSize+this.gripImageSize*2)+"px";}}if((_13==this.VERTICAL)||(_13==this.BOTH)){var _1c=1;if(navigator.userAgent.search("Opera")!=-1){_1c=0;}if(false){_d.style.top=(_offsetHeight(_c)-this.gripImageHeight+_1c)+"px";}else{_d[0].style.top=(_offsetHeight(_c)+_1c)+"px";_d[1].style.top=(_offsetHeight(_c)+_1c)+"px";_d[2].style.top=(_offsetHeight(_c)-this.gripSize+this.gripImageSize*2+_1c)+"px";_d[3].style.top=(_offsetHeight(_c)-this.gripSize+this.gripImageSize+_1c)+"px";_d[4].style.top=(_offsetHeight(_c)+_1c)+"px";}}_1b[_b]=true;var idx;for(idx in _14){if(_1b[_14[idx]]){continue;}var _1e=document.getElementById(_14[idx]+"_grip");if(_1e){_1e._grip._repositionElements(_19,_1a,_1b);}else{var box=document.getElementById(_14[idx]);if(box){box.style.width=_c.style.width;box.style.height=_c.style.height;}}}};this._updateSize=function(ev){var _21=(_10+ev.clientX-_e);var _22=(_11+ev.clientY-_f);this._repositionElements(_21,_22,[]);};this.show=function(){var _23=this;if(grip_isLoaded){_23._setup();}else{grip_addLoadEvent(function(){_23._setup();});}};this.resize=function(_24,_25,_26){var _27=_26?(_width(_c)+_24):_24;var _28=_26?(_height(_c)+_25):_25;this._repositionElements(_27,_28,[]);};this.linkWith=function(_29){_14[_14.length]=_29;};this.restrictMovement=function(_2a){_13=_2a;};this._setup=function(){var _2b=document.getElementById(_a);_c=document.getElementById(_b);var _2c=1;if(navigator.userAgent.search("Opera")!=-1){_2c=0;}var _2d="";if(false){_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c)-this.gripImageWidth)+"px;";_2d+=" top: "+(_offsetHeight(_c)-this.gripImageHeight+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImage+"\"";_2d+=" width=\""+this.gripImageWidth+"\" height=\""+this.gripImageHeight+"\" />";grip_insertAdjacentHTML("beforeEnd",_a,_2d);_d=document.getElementById(_b+"_grip");_d._grip=this;_d.onmousedown=this._img_onmousedown;}else{_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c))+"px;";_2d+=" top: "+(_offsetHeight(_c)+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImageCorner+"\"";_2d+=" width=\""+this.gripImageSize+"\" height=\""+this.gripImageSize+"\" />";_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c)-this.gripSize+this.gripImageSize)+"px;";_2d+=" top: "+(_offsetHeight(_c)+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip_left\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImageLeft+"\"";_2d+=" width=\""+this.gripImageSize+"\" height=\""+this.gripImageSize+"\" />";_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c))+"px;";_2d+=" top: "+(_offsetHeight(_c)-this.gripSize+this.gripImageSize*2+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip_right\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImageRight+"\"";_2d+=" width=\""+this.gripImageSize+"\" height=\""+(this.gripSize-this.gripImageSize*2)+"\" />";_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c))+"px;";_2d+=" top: "+(_offsetHeight(_c)-this.gripSize+this.gripImageSize+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip_top\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImageTop+"\"";_2d+=" width=\""+this.gripImageSize+"\" height=\""+this.gripImageSize+"\" />";_2d+="<img style=\"position: absolute;";_2d+=" left: "+(_offsetWidth(_c)-this.gripSize+this.gripImageSize*2)+"px;";_2d+=" top: "+(_offsetHeight(_c)+_2c)+"px;";_2d+=" cursor: se-resize; z-index: 1;\"";_2d+=" id=\""+_b+"_grip_bottom\"";_2d+=" onmousedown=\"return g_resizeGrips["+_id+"]._img_onmousedown(event);\"";_2d+=" ondragstart=\"return false;\"";_2d+=" src=\""+this.gripImageBottom+"\"";_2d+=" width=\""+(this.gripSize-this.gripImageSize*2)+"\" height=\""+this.gripImageSize+"\" />";grip_insertAdjacentHTML("beforeEnd",_a,_2d);_d=[];_d[0]=document.getElementById(_b+"_grip");_d[1]=document.getElementById(_b+"_grip_left");_d[2]=document.getElementById(_b+"_grip_right");_d[3]=document.getElementById(_b+"_grip_top");_d[4]=document.getElementById(_b+"_grip_bottom");_d[0]._grip=this;_d[1]._grip=this;_d[2]._grip=this;_d[3]._grip=this;_d[4]._grip=this;_d[0].onmousedown=this._img_onmousedown;_d[1].onmousedown=this._img_onmousedown;_d[2].onmousedown=this._img_onmousedown;_d[3].onmousedown=this._img_onmousedown;_d[4].onmousedown=this._img_onmousedown;}var w,dw;if(!_c.style.width){w=_c.offsetWidth;_c.style.width=w+"px";dw=_c.offsetWidth-w;w-=dw;_c.style.width=w+"px";}if(!_c.style.height){w=_c.offsetHeight;_c.style.height=w+"px";dw=_c.offsetHeight-w;w-=dw;_c.style.height=w+"px";}};this._img_onmousedown=function(ev){if(!ev){ev=event;}var _30=false;if(navigator.userAgent.search("Opera")!=-1){_30=(ev.button===0);}else{if(navigator.appName=="Konqueror"){_30=(ev.button==1);}else{if(navigator.appName=="Netscape"){_30=(ev.button===0);}else{if(navigator.appName=="Microsoft Internet Explorer"){_30=((ev.button&1)==1);}else{_30=(ev.button==1);}}}}if(_30){g_currentGrip=this._grip;_e=ev.clientX;_f=ev.clientY;_10=_width(_c);_11=_height(_c);if(document.all){document.body.attachEvent("onmouseup",grip_onmouseup);document.body.attachEvent("onmousemove",grip_onmousemove);}else{document.addEventListener("mouseup",grip_onmouseup,false);document.addEventListener("mousemove",grip_onmousemove,false);}return false;}return true;};this._img_onmouseup=function(ev){if(!ev){ev=event;}if(g_currentGrip){g_currentGrip._updateSize(ev);if(document.all){document.body.detachEvent("onmouseup",grip_onmouseup);document.body.detachEvent("onmousemove",grip_onmousemove);}else{document.removeEventListener("mouseup",grip_onmouseup,false);document.removeEventListener("mousemove",grip_onmousemove,false);}g_currentGrip=null;}return true;};this._img_onmousemove=function(ev){if(!ev){ev=event;}if(g_currentGrip){g_currentGrip._updateSize(ev);}return true;};this.constructor();}