ac=document;ai=false;aj=true;ay=window;bm=top;cs=parseInt;function bs(){this.xmlHTTP=null;this.processHTTPResponse=null;if(!bs.prototype._initialized){bs.prototype._initialized=aj;bs.prototype.isCommunicating=function(){return this.xmlHTTP!=null};bs.prototype.READY_STATE={qe:0,qf:1,qg:2,qh:3,COMPLETED:4};bs.prototype.setProcessHTTPResponse=function(fn){this.processHTTPResponse=fn;};if(ay.XMLHttpRequest){bs.prototype._createXMLHTTP=function(){return new XMLHttpRequest();}}else if(ay.ActiveXObject){var ji=["Microsoft.XMLHTTP","MSXML2.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.7.0"];var hb;for(var i=ji.length-1;i>=0;--i){try{hb=ji[i];new ActiveXObject(hb);break;}catch(ft){}}bs.prototype._createXMLHTTP=function(){return new ActiveXObject(hb);}}else {throw new Error("XMLHTTP not available.");};bs.prototype.get=function(dk,query){return this._performRequest("GET",dk,query);};bs.prototype.post=function(dk,query,ct){return this._performRequest("POST",dk,query,ct);};bs.prototype._performRequest=function(method,dk,query,ct){this.xmlHTTP=this._createXMLHTTP();var xmlHTTP=this.xmlHTTP;if(method=="GET"&&query){dk+="?"+query;}var hc=Boolean(this.processHTTPResponse);if(hc){xmlHTTP.onreadystatechange=this._createOnReadyStateChangeCallback();}xmlHTTP.open(method,dk,hc);var jj=null;if(method=="POST"){if(ct){xmlHTTP.setRequestHeader("Content-Type",ct);}if(query){jj=query;}}try{xmlHTTP.send(jj);}catch(e){}if(!hc){this._reportResponse();return xmlHTTP;}};bs.prototype._createOnReadyStateChangeCallback=function(){var fu=this;return function(){if(fu.xmlHTTP&&fu.xmlHTTP.readyState==fu.READY_STATE.COMPLETED){fu._reportResponse();}}};bs.prototype._reportResponse=function(){if(this.xmlHTTP){var xmlHTTP=this.xmlHTTP;this.xmlHTTP=null;if(this.processHTTPResponse){this.processHTTPResponse(xmlHTTP);}}}}}function cu(dragSource,dl,dm){this.dragging=ai;this.dragSource=dragSource;this.initialMouseFixedPosition=new di(dl,dm);this.initialFixedPosition=bj.getElementFixedCoordinates(dragSource);this.initialOffsetPosition=new di(dragSource.offsetLeft,dragSource.offsetTop);this.initialPosition=null;this.mouseDeltaX=0;this.mouseDeltaY=0;this.minX=null;this.maxX=null;if(dragSource.style){var style=dragSource.style;this.dragCopy=style.position!="absolute"&&style.position!="fixed";}else {this.dragCopy=aj;}this.allowX=aj;this.allowY=aj;if(!cu.prototype._initialized){cu.prototype._initialized=aj;cu.prototype.beginDrag=function(dl,dm){this.element=this._getDragElement();this.drag(dl,dm);if(this.element!=this.dragSource){this.oldVisibility=this.dragSource.style.visibility;this.dragSource.style.visibility="hidden";ac.body.appendChild(this.element);}this.dragging=aj;an.globalmentor.js.EventManager.addEvent(ac,"mousemove",onDrag,ai);if(this.onDragBegin){this.onDragBegin(this.element);}};cu.prototype.drag=function(dl,dm){var jk=this.element.style.left;var jl=this.element.style.top;var he=jk?cs(jk):this.initialPosition.x;var hf=jl?cs(jl):this.initialPosition.y;var cj=he;var ck=hf;if(this.allowX){var mg=this.allowY||(dm>=this.initialFixedPosition.y&&dm<(this.initialFixedPosition.y+this.element.offsetHeight));if(mg){cj=dl-av.mouseDeltaX;}else {cj=this.initialPosition.x;}if(this.minX!=null&&cj<this.minX){cj=this.minX;}else if(this.maxX!=null&&cj>this.maxX){cj=this.maxX;}}if(this.allowY){var mh=this.allowX||(dl>=this.initialFixedPosition.x&&dl<(this.initialFixedPosition.x+this.element.offsetWidth));if(mh){ck=dm-av.mouseDeltaY;}else {ck=this.initialPosition.y;}if(this.minY!=null&&ck<this.minY){ck=this.minY;}else if(this.maxY!=null&&ck>this.maxY){ck=this.maxY;}}if(cj!=he||ck!=hf){if(cj!=he){this.element.style.left=cj.toString()+"px";}if(ck!=hf){this.element.style.top=ck.toString()+"px";}if(this.onDrag){this.onDrag(this.element,cj,ck);}}};cu.prototype.endDrag=function(){an.globalmentor.js.EventManager.removeEvent(ac,"mousemove",onDrag,ai);if(this.element!=this.dragSource){ac.body.removeChild(this.element);this.dragSource.style.visibility=this.oldVisibility;}this.dragging=ai;if(this.onDragEnd){this.onDragEnd(this.element);}};cu.prototype._getDragElement=function(){var element;if(this.dragCopy){this.initialPosition=bj.getElementCoordinates(this.dragSource);element=this.dragSource.cloneNode(aj);am.cleanNode(element);element.style.left=(this.initialPosition.x).toString()+"px";element.style.top=(this.initialPosition.y).toString()+"px";element.style.position="absolute";element.style.zIndex=9001;}else {element=this.dragSource;if(element.style&&element.style.position=="fixed"){this.initialPosition=this.initialFixedPosition;}else {this.initialPosition=this.initialOffsetPosition;}}this.mouseDeltaX=this.initialMouseFixedPosition.x-this.initialPosition.x;this.mouseDeltaY=this.initialMouseFixedPosition.y-this.initialPosition.y;return element;}}}