void(function(){var W=window["gapjumper.com"]={};W.version="1.2.19.11.2008.08.18";W.globals={};var $=document;var controls=W.controls={};var controller=[];var contentStack=[];var controlMap={};var aHandlers=[];var aDropGroups=[];var controlIdMap={};var layoutManager=W.layoutManager={interval:200,callbacks:[],index:0,addCallback:function(B,A){layoutManager.callbacks.push({callback:B,context:A});if(layoutManager.callbacks.length==1){layoutManager.start()}return layoutManager.callbacks.length},removeCallback:function(B){for(var C=B,A=layoutManager.callbacks.length;C<A;C++){layoutManager.callbacks[C]=layoutManager.callbacks[C+1]}layoutManager.callbacks.pop();if(layoutManager.callbacks.length==0){layoutManager.stop()}},start:function(){layoutManager.index=setInterval(layoutManager.process,layoutManager.interval)},stop:function(){clearInterval(layoutManager.index)},process:function(){for(var B=0,A=layoutManager.callbacks.length;B<A;B++){layoutManager.callbacks[B].callback.apply(layoutManager.callbacks[B].context||window)}}};var _xpath={parse:function(F,E){var A=[];F=F.replace(/\/\//g,"/descendant-or-self::");F=F.replace(/\(((\w)([\.-\:\/]|\w)*)\)\[/g,"$1/.[");if(F.charAt(0)=="/"){E=[$.documentElement];F=F.slice(1);if(F==""){F="self::*"}}F=F.split(/\//);for(var D=0,B=F.length;D<B;D++){A[D]={};if(/^((\*)|(\w)([\.-]|\w)*(\(\))?)(\[.+\])*$/.test(F[D])){A[D].axis="child"}else{if(/^child\:\:/.test(F[D])){F[D]=F[D].replace(/^child\:\:/,"");A[D].axis="child"}else{if(/^preceding-sibling\:\:/.test(F[D])){F[D]=F[D].replace(/^preceding-sibling\:\:/,"");A[D].axis="preceding-sibling"}else{if(/^following-sibling\:\:/.test(F[D])){F[D]=F[D].replace(/^following-sibling\:\:/,"");A[D].axis="following-sibling"}else{if(/^descendant\:\:/.test(F[D])){F[D]=F[D].replace(/^descendant\:\:/,"");A[D].axis="descendant"}else{if(/^descendant-or-self\:\:/.test(F[D])){F[D]=F[D].replace(/^descendant-or-self\:\:/,"");A[D].axis="descendant-or-self"}else{if(/^attribute\:\:/.test(F[D])){F[D]=F[D].replace(/^attribute\:\:/,"");A[D].axis="attribute"}else{if(/^@/.test(F[D])){F[D]=F[D].slice(1);A[D].axis="attribute"}else{if(/^parent\:\:/.test(F[D])){F[D]=F[D].replace(/^parent\:\:/,"");A[D].axis="parent"}else{if(/^\.\./.test(F[D])){F[D]=F[D].replace(/^\.\./,"node()");A[D].axis="parent"}else{if(/^self\:\:/.test(F[D])){F[D]=F[D].replace(/^self\:\:/,"");A[D].axis="self"}else{if(/^\./.test(F[D])){F[D]=F[D].replace(/^\./,"node()");A[D].axis="self"}else{if(/^ancestor\:\:/.test(F[D])){F[D]=F[D].replace(/^ancestor\:\:/,"");A[D].axis="ancestor"}else{if(/^ancestor-or-self\:\:/.test(F[D])){F[D]=F[D].replace(/^ancestor-or-self\:\:/,"");A[D].axis="ancestor-or-self"}else{if(/^following\:\:/.test(F[D])){F[D]=F[D].replace(/^following\:\:/,"");A[D].axis="following"}else{if(/^preceding\:\:/.test(F[D])){F[D]=F[D].replace(/^preceding\:\:/,"");A[D].axis="preceding"}}}}}}}}}}}}}}}}var C=F[D].match(/^(\*)|((\w)([\.-]|\w)*(\(\))?)/);A[D].test=C?C[0]:"";F[D]=F[D].replace(/^((\*)|(\w)([\.-]|\w)*(\(\))?)/,"");A[D].predicate=[];if(F[D]){F[D]=F[D].slice(1,-1);A[D].predicate=F[D].split("][")}}return{steps:A,context:E}},processSteps:function(A,D){for(var C=0,B=A.length;C<B;C++){D=_xpath.processStep(A[C],D)}return D},processStep:function(I,H){var J=[];if(I.axis=="self"){if(H.length){J=H;for(var D=0,C=I.predicate.length;D<C;D++){J=_xpath.processPredicate(I.predicate[D],J)}}}else{for(var G=0,E=H.length;G<E;G++){var F=[];var B=_xpath.processAxis(I.axis,H[G]);for(var D=0,C=B.length;D<C;D++){var A=_xpath.processTest(I.axis,I.test,B[D]);if(A){F.push(A)}}if(F.length){for(var D=0,C=I.predicate.length;D<C;D++){F=_xpath.processPredicate(I.predicate[D],F)}}if(F&&F.length){J=J.concat(F)}}}return J},processAxis:function(D,C){var E=[];switch(D){case"child":E=dom.getChildNodes(C);break;case"parent":E=[C.parentNode];break;case"self":E=[C];break;case"descendant":E=dom.getDescendants(C);break;case"descendant-or-self":E=dom.getDescendantsOrSelf(C);break;case"ancestor":E=dom.getAncestors(C);break;case"ancestor-or-self":E=[C].concat(dom.getAncestors(C));break;case"preceding-sibling":E=dom.getPrecedingSiblings(C);break;case"following-sibling":E=dom.getFollowingSiblings(C);break;case"following":E=dom.getFollowingNodes(C);break;case"preceding":E=dom.getPrecedingNodes(C);break;case"attribute":if(main.browser.ie){for(var B=0,A=C.attributes.length;B<A;B++){if(C.attributes[B].specified){E.push(C.attributes[B])}}}else{E=C.attributes}break}return E},processTest:function(B,D,A){var C;if(B=="attribute"){switch(D){case"*":C=A;break;default:if(A.name==D){C=A}}}else{switch(D){case"node()":C=A;break;case"*":if(A.nodeType==1){C=A}break;case"text()":if(A.nodeType==3){C=A}break;default:if(A.nodeType==1&&A.tagName.toLowerCase()==D){C=A}}}return C},processPredicate:function(predicate,oContext){var nodeSet=[];predicate=predicate.replace(/"/g,"'");predicate=predicate.replace(/last\(\)/,oContext.length);predicate=predicate.replace(/\=/g,"==");for(var i=0,j=oContext.length;i<j;i++){var sPredicate=predicate.replace(/\.\s*\=\=/g,"'"+oContext[i].innerHTML+"' ==");sPredicate=predicate.replace(/@(\w)([\.-]|\w)*\s*\=\=/g,function(attribute){attribute=attribute.replace(/\s*==/,"");var value=oContext[i][attribute.slice(1)];return(value)?"'"+value+"' ==":null+" =="});sPredicate=sPredicate.replace(/@(\w)([\.-]|\w)*/g,function(attribute){var value=oContext[i][attribute.slice(1)];return(value)?true:false});sPredicate=sPredicate.replace(/position\(\)/,i+1);var iPredicate=eval(sPredicate);if(iPredicate===true||parseInt(iPredicate)==i+1){nodeSet.push(oContext[i])}}return nodeSet},evaluate:function(B,D){if(/^id\((('(\w)([\.-]|\w)*')|("(\w)([\.-]|\w)*"))\)/.test(B)){var C=B.match(/[',"].+[',"]/)[0].slice(1,-1);D=document.getElementById(C);B=B.replace(/^id\((('(\w)([\.-]|\w)*')|("(\w)([\.-]|\w)*"))\)/,".")}if(!D){D=[$.documentElement]}else{D=[D]}var E=_xpath.parse(B,D);var A=E.steps;D=E.context;return _xpath.processSteps(A,D)}};function _preventDefault(A){if(A.preventDefault){A.preventDefault()}return(A.returnValue=false)}function _getBaseEvent(B){var A;switch(B){case"mouseleave":A="mouseout";break;case"mouseenter":A="mouseover";break;default:A=B}return A}function _lookupHandler(D,C,F){for(var B=0,A=aHandlers.length;B<A;B++){var E=aHandlers[B];if(E.element==D&&E.event==C&&E.handler==F){aHandlers.splice(B,1);return E.customHandler}}}function _getEventObject(C,D,B){var A={type:D,currentTarget:C,clientX:B.clientX,clientY:B.clientY,altKey:B.altKey,ctrlKey:B.ctrlKey,shiftKey:B.shiftKey};if(C.attachEvent){A.target=B.srcElement;A.stopPropagation=function(){B.cancelBubble=true};A.preventDefault=function(){B.returnValue=false};A.relatedTarget=(D=="mouseout"||D=="mouseleave")?B.toElement:(D=="mouseover"||D=="mouseenter")?B.fromElement:null;A.button={left:1&B.button,right:2&B.button,middle:4&B.button}}else{if(C.addEventListener){A.target=B.target;A.stopPropagation=function(){B.stopPropagation()};A.preventDefault=function(){B.preventDefault()};A.relatedTarget=B.relatedTarget;A.button={left:B.button==0,middle:B.button==1,right:B.button==2}}}return A}function _getParentControl(B){var A=B.parentNode;while((A!=$.body)&&!A.controlType){A=A.parentNode}return A.controlType?A:null}function _getChildControls(E){var D=[];var C=E.childNodes;for(var B=0,A=C.length;B<A;B++){if(C[B].controlType){D.push(C[B])}else{D=D.concat(_getChildControls(C[B]))}}return D}function _getPreConstructedParent(B){var A=B.parentNode;while((A!=$.body)&&(A.className.indexOf("gapjumper-control")<0)){A=A.parentNode}return(A!=$.body)?A:null}function _finalize(B){var A=B.controlClass;if(A.finalizer){A.finalizer.call(B)}}function _finalizeBranch(D){_finalize(D);if(D.childControls){var A=[];for(var B=D.childControls.length;B-->0;){A[A.length]=D.childControls[B]}while(A&&A.length){var C=A.pop();_finalize(C);if(C.childControls){for(var B=C.childControls.length;B-->0;){A[A.length]=C.childControls[B]}}}}}function getXHRObj(){if(window.XMLHttpRequest){return new XMLHttpRequest()}if(window.ActiveXObject){return new ActiveXObject("MSXML2.XMLHTTP.3.0")}}function readyStateXHR(B,A){if(B.readyState==4){A((B.status==200)?B.responseText:null)}}function getFinalScriptTag(){var A=$.getElementsByTagName("script");return script=A[A.length-1]}function objectToString(C){var A=[];for(var B in C){A.push(" "+B+'="'+C[B]+'"')}return A.join("")}function extendObject(D,C,A){if(!D[A]){D[A]=C[A]}else{for(var B in C[A]){if(D[A][B]){if(!D[A][B].hasOwnProperty("default")&&C[A][B].hasOwnProperty("default")){D[A][B]["default"]=C[A][B]["default"]}D[A][B].set=D[A][B].set||C[A][B].set;D[A][B].get=D[A][B].get||C[A][B].get}else{D[A][B]=C[A][B]}}}}function extendControl(B,A){var B=controls[B];var A=controls[A];B.template=B.template||A.template;B.initializer=B.initializer||A.initializer;B.destructor=B.destructor||A.destructor;B.finalizer=B.finalizer||A.finalizer;extendObject(B,A,"properties");extendObject(B,A,"methods");extendObject(B,A,"handlers")}function buildControlObject(A){var E=controls[A];var D=E["extends"]||{};for(var C=D.length;C-->0;){var B=D[C];if(!controls[B].built&&controls[B]["extends"]){buildControlObject(B)}extendControl(A,B)}if(!E.properties){E.properties={}}E.properties.parentControl={get:function(){return _getParentControl(this)}};E.properties.childControls={get:function(){return _getChildControls(this)}};E.properties.disabled={"default":false,set:function(F){this.properties.disabled=F;if(F){utils.addClass(this,"gapjumper-disabled")}else{utils.removeClass(this,"gapjumper-disabled")}}};if(E.initializer){if(!E.methods){E.methods={}}E.methods.initializer=E.initializer}if(E.destructor){if(!E.methods){E.methods={}}E.methods.destructor=E.destructor}controls[A].built=true;if(E.finalizer){if(!E.methods){E.methods={}}E.methods.finalizer=E.finalizer}controls[A].built=true}function renderControl(name,$attributes,$content){var result;if(controls[name]){if(!controls[name].built){buildControlObject(name)}var index=controller.length;var script;if(!main.createFragment){script="{'script':{'type':'text/javascript'}},['window[\"gapjumper.com\"].main.initControl("+index+")']"}else{script="{'code':{'class':'gapjumper.com.marker'}},['"+index+"']"}controller.push({control:controls[name],tag:name,attribute:$attributes});contentStack.push($content);var template=controller[index].control.template;var oTemplateAttribute;var element;for(element in template[0]){}var templateStr="[{'"+element+"':{";var classStr="";for(var key in template[0][element]){if(key.toLowerCase()=="class"){classStr=" "+template[0][element][key]}else{templateStr+="'"+key+"':'"+template[0][element][key]+"', "}}templateStr+="'class':'gapjumper-control"+classStr+"'";templateStr+="}},[],"+script+"]";var newTemplate=eval(templateStr);for(var i=0,j=template[1].length;i<j;i++){newTemplate[1][i]=template[1][i]}oTemplateAttribute=newTemplate[0][element];var oTemplateProperty=controller[index].control.properties||{};for(var attrib in $attributes){if((attrib!="style")&&!oTemplateProperty.hasOwnProperty(attrib)){oTemplateAttribute[attrib]=$attributes[attrib]}}if($attributes.hasOwnProperty("style")&&!oTemplateProperty.hasOwnProperty("style")){if((oTemplateAttribute.style!=undefined)&&(oTemplateAttribute.style!="")){oTemplateAttribute.style+=";"}else{oTemplateAttribute.style=""}oTemplateAttribute.style+=$attributes.style}result=transform(newTemplate)}return result.join("")}function transform(G){var A=[];for(var D=0,B=G.length;D<B;D++){var F=G[D];if(typeof (F)=="string"){A.push(F)}else{var C;for(C in F){if(C=="content"){A.push(contentStack.pop())}else{if(controlMap[C]){var E=[];if((D+1<B)&&(G[D+1].constructor==Array)){E=transform(G[++D])}A.push(renderControl(controlMap[C],F[C],E.join("")))}else{A.push("<"+C+objectToString(F[C])+">");if((D+1<B)&&(G[D+1].constructor==Array)){A.push(transform(G[++D]).join(""))}A.push("</"+C+">")}}}}}return A}W.write=function(D){main.initialize();var C=transform(D);if(!main.browser.ie){for(var B=0,A=C.length;B<A;B++){$.write(C[B])}}else{$.write(C.join(""))}utils.removeNode(getFinalScriptTag())};W.create=function(K,I,C){if(!main.initialized){main.initialize()}main.createFragment=true;if(I=="replaceChildren"){K.innerHTML=transform(C).join("");var B=dom.getElementDescendants(K)}else{var G=$.createDocumentFragment();var A=$.createElement("div");A.innerHTML=transform(C).join("");var B=dom.getElementDescendants(A);var H=A.childNodes;for(var E=0,D=H.length;E<D;E++){G.appendChild(H[0])}A=null;if(I=="insertAfter"){if(K.nextSibling){K.nextSibling.insertBefore(G)}else{K.parentNode.appendChild(G)}}else{if(I=="insertBefore"){K.insertBefore(G)}else{if(I=="append"){K.appendChild(G)}}}}for(var E=0,D=B.length;E<D;E++){if((B[E].tagName.toLowerCase()=="code")&&(B[E].className=="gapjumper.com.marker")){var J=B[E];var F=parseInt(J.innerHTML);window["gapjumper.com"].main.initControl(F,J.previousSibling);J.parentNode.removeChild(J)}}};W.cast=function(D,C){if(!main.initialized){main.initialize()}D=controlMap[D];if(!controls[D].built){buildControlObject(D)}var A;var B=getFinalScriptTag();A=xpath.evaluate("preceding-sibling::*[1]",B)[0];utils.addClass(A,"gapjumper-control");utils.removeNode(B);main.initControlNode(A,controls[D],D,C);_initControl(A,controls[D],D,C)};_initControl=function(A,D,E,B){if(D.initializer){D.initializer.call(A,B)}utils.removeClass(A,"gapjumper-control");if(A.childControls||D.finalizer){var C=_getPreConstructedParent(A);if(C){if(C.childControls){C.childControls.push(A)}else{C.childControls=[A]}}else{_finalizeBranch(A);if(A.childControls){A.childControls=null}}}};var main=W.main={initialized:false,createFragment:false,initialize:function(){for(var A in controls){controlMap[A]=A}main.initialized=true},init:function(C,B,A){if(!controls[B].built){buildControlObject(B)}A=A?A:[];main.initControlNode(C,controls[B],B,A);_initControl(C,controls[B],B,A)},initControlNode:function(A,E,F,B){A.controlClass=E;A.controlType=F;if(A.id){controlIdMap[A.id]=A}A.destroy=function(){var I=A.getProperty("childControls");for(var H=0,G=I.length;H<G;H++){I[H].destroy()}for(var J in E.handlers){switch(J){case"load":case"resize":events.removeHandler(window,J,E.handlers[J]);break;case"mousemove":events.removeHandler($.documentElement,J,E.handlers[J]);break;default:events.removeHandler(A,J,E.handlers[J])}}if(E.destructor){E.destructor.apply(A)}if(controlIdMap[A.id]){delete controlIdMap[A.id]}utils.removeNode(A);A=null};A.applyMethod=function(J,H){if(A){var K=[];for(var I=2,G=arguments.length;I<G;I++){K.push(arguments[I])}controls[J].methods[H].apply(A,K)}};if(E.methods){A.callMethod=function(I){if(A&&!A.getProperty("disabled")){var H=[];for(var J=1,G=arguments.length;J<G;J++){H.push(arguments[J])}return E.methods[I].apply(A,H)}}}if(E.properties){if(!A.properties){A.properties={}}for(var D in E.properties){if(B&&B.hasOwnProperty(D)){A.properties[D]=B[D]}else{if(E.properties[D].hasOwnProperty("default")){A.properties[D]=E.properties[D]["default"]}}}A.getProperty=function(G){var H=null;if(A){var I=E.properties[G];if(I){if(I.get){H=I.get.call(A)}else{H=A.properties[G]}}}return H};A.setProperty=function(G,H){if(A){var I=E.properties[G];if(I){A.properties[G]=H;if(I.set){I.set.call(A,H)}}}};for(var D in A.properties){if(E.properties[D].set){E.properties[D].set.call(A,A.properties[D])}}}if(E.handlers){for(var C in E.handlers){switch(C){case"load":case"resize":events.addHandler(window,C,E.handlers[C],A);break;case"mousemove":events.addHandler($.documentElement,C,E.handlers[C],A);break;default:events.addHandler(A,C,E.handlers[C])}}}},initControl:function(D,A){if(controller[D]){if(!A){var C=getFinalScriptTag();var A=C.previousSibling;utils.removeNode(C)}var E=controller[D].control;var B=controller[D].attribute;main.initControlNode(A,E,controller[D].tag,B);_initControl(A,E,controller[D].tag,B)}},browser:{ie:navigator.userAgent.indexOf("IE")>-1,ie6:navigator.userAgent.indexOf("IE 6")>-1,ie7:navigator.userAgent.indexOf("IE 7")>-1,gecko:(navigator.userAgent.indexOf("Gecko")>-1)&&(navigator.userAgent.indexOf("WebKit")==-1),opera:navigator.userAgent.indexOf("Opera")>-1,safari:navigator.userAgent.indexOf("WebKit")>-1,quirks:($.compatMode=="BackCompat")||($.compatMode=="QuirksMode")},setBrowserClass:function(){var B="gapjumper";var A="";if(main.browser.ie){A+=B+"-ie";if(main.browser.ie6){A+=" "+B+"-ie6 ";if(main.browser.quirks){A+=B+"-ie6quirks"}else{A+=B+"-ie6strict"}}else{if(main.browser.ie7){A+=" "+B+"-ie7 ";if(main.browser.quirks){A+=B+"-ie7quirks"}else{A+=B+"-ie7strict"}}}}else{if(main.browser.gecko){A+=B+"-gecko"}else{if(main.browser.opera){A+=B+"-opera"}else{if(main.browser.safari){A+=B+"-safari"}}}if(main.browser.quirks){A+=" "+B+"-quirks"}}if($.documentElement.className){$.documentElement.className+=" "+A}else{$.documentElement.className=A}},mapControlNamespace:function(B,C){if(B&&C){var A=C.length;for(var D in controls){if(D.indexOf(C)==0){controlMap[B+D.slice(A)]=D}}}},getControlById:function(A){return controlIdMap[A]||null},getDisabledState:function(A){var B=A;while(B){if(B.controlClass&&B.getProperty("disabled")){return true}B=B.parentNode}return false},registerRepeater:function(){},unregsiterRepeater:function(){}};var xpath=W.xpath={evaluate:function(B,A){return _xpath.evaluate(B,A)}};var events=W.events={addHandler:function(C,B,E,A){var D=function(G){var F=_getEventObject(C,B,G||event);events.preProcessEvent(C,F,E,A);if(B=="load"){events.removeHandler(C,B,E)}};aHandlers.push({element:C,event:B,handler:E,customHandler:D});if(C.attachEvent){C.attachEvent("on"+_getBaseEvent(B),D)}else{if(C.addEventListener){C.addEventListener(_getBaseEvent(B),D,false)}}},removeHandler:function(B,A,D){var C=_lookupHandler(B,A,D);if(C){if(B.attachEvent){B.detachEvent("on"+_getBaseEvent(A),C)}else{if(B.removeEventListener){B.removeEventListener(_getBaseEvent(A),C,false)}}}},preProcessEvent:function(C,A,D,B){if(!C.getProperty||!main.getDisabledState(C)){switch(A.type){case"mouseleave":case"mouseenter":if((C!=A.relatedTarget)&&!dom.isDescendant(A.relatedTarget,C)||!A.relatedTarget){D.call(C,A)}break;default:D.call(B||C,A)}}}};var dom=W.dom={getChildNodes:function(E){var D=[];var A=E.childNodes;for(var C=0,B=A.length;C<B;C++){if(A[C].nodeType==1||A[C].nodeType==3){D.push(A[C])}}return D},getPrecedingSiblings:function(B){var C=[];var A=B.previousSibling;while(A){if(A.nodeType==1||A.nodeType==3){C.push(A)}A=A.previousSibling}return C},getFollowingSiblings:function(B){var C=[];var A=B.nextSibling;while(A){if(A.nodeType==1||A.nodeType==3){C.push(A)}A=A.nextSibling}return C},getDescendants:function(E){var D=[];if(E){var C=dom.getChildNodes(E);while(C.length){var B=C.shift();D.push(B);var A=dom.getChildNodes(B)||[];if(A.length){A.push.apply(A,C);C=A}}}return D},getDescendantsOrSelf:function(A){return[A].concat(dom.getDescendants(A))},getAncestors:function(B){var A=[];while(B!=$.documentElement){B=B.parentNode;A.push(B)}return A},getPrecedingNodes:function(){var F;var G=dom.getPrecedingSiblings(oNode);for(var D=0,C=G.length;D<C;D++){F=F.concat(dom.getDescendantsOrSelf(aFollowingSiblings[D]).reverse())}var E=dom.getAncestors(oNode);for(var D=0,C=E.length;D<C;D++){F.push(E[D]);G=dom.getPrecedingSiblings(E[D]);for(var B=0,A=G.length;B<A;B++){F=F.concat(dom.getDescendantsOrSelf(G[B]).reverse())}}return F},getFollowingNodes:function(H){var G=dom.getDescendants(H);var E=dom.getFollowingSiblings(H);for(var D=0,C=E.length;D<C;D++){G=G.concat(dom.getDescendantsOrSelf(E[D]))}var F=dom.getAncestors(H);for(var D=0,C=F.length;D<C;D++){E=dom.getFollowingSiblings(F[D]);for(var B=0,A=E.length;B<A;B++){G=G.concat(dom.getDescendantsOrSelf(E[B]))}}return G},getTextContent:function(B){var A;if(B.textContent!=undefined){A=B.textContent}else{(B.nodeType==3)?A=B.data:A=B.innerText}return A},getElementChildNodes:function(A){return xpath.evaluate("*",A)},getPrecedingElementSiblings:function(A){return xpath.evaluate("preceding-sibling::*",A)},getFollowingElementSiblings:function(A){return xpath.evaluate("following-sibling::*",A)},getElementDescendants:function(A){return xpath.evaluate("descendant::*",A)},getElementDescendantsOrSelf:function(A){return xpath.evaluate("descendant-or-self::*",A)},isDescendant:function(B,A){if(B==A){return false}while(B&&(B!=A)&&(B!=$.documentElement)){B=B.parentNode}return B==A},isDescendantOrSelf:function(B,A){if(B==A||W.dom.isDescendant(B,A)){return true}else{return false}}};var utils=W.utils={disableSelection:function(A){if(A.style.MozUserSelect!==undefined){A.style.MozUserSelect="none"}if(A.style.WebkitUserSelect!==undefined){A.style.WebkitUserSelect="none"}if(main.browser.opera){events.addHandler(A,"mousedown",_preventDefault)}if(main.browser.ie){events.addHandler(A,"selectstart",_preventDefault)}},enableSelection:function(A){if(A.style.MozUserSelect){A.style.MozUserSelect=""}if(A.style.WebkitUserSelect){A.style.WebkitUserSelect=""}if(main.browser.opera){events.removeHandler(A,"mousedown",_preventDefault)}if(main.browser.ie){events.removeHandler(A,"selectstart",_preventDefault)}},removeNode:function(A){A.parentNode.removeChild(A)},deepRemoveNode:function(D){if(D.controlType&&D.destroy){D.destroy()}else{var A=D.childNodes;for(var C=0,B=A.length;C<B;C++){arguments.callee(A[0])}W.utils.removeNode(D)}},sort:function(A,M,E,L,K){if(typeof (A)=="string"){A=xpath.evaluate(A)}if(typeof (M)=="string"){M=xpath.evaluate(M);for(var I=0,H=M.length;I<H;I++){M[I]=dom.getTextContent(M[I])}}if(A.length==M.length){var G,C=[],F=[],N=[];for(var I=0,H=A.length;I<H;I++){C[I]=F[I]=N[I]=I}if(L&&!K){G=function(P,O){return parseFloat(M[P])-parseFloat(M[O])}}else{if(!K){G=function(Q,P){var O=0;if(M[Q]>M[P]){O=1}else{if(M[Q]<M[P]){O=-1}}return O}}else{G=function(P,O){return K(M[P],M[O])}}}C.sort(G);if(E){C.reverse()}for(var I=0,H=C.length-1;I<H;I++){if(F[C[I]]!=I){var B=A[C[I]].parentNode;var D=A[C[I]].nextSibling;var J=A[N[I]];J.parentNode.insertBefore(A[C[I]],J);B.insertBefore(J,D);F[N[I]]=F[C[I]];N[F[C[I]]]=N[I];F[C[I]]=I;N[I]=C[I]}}}},addClass:function(B,A){if(!B.className){B.className=A}else{if(!(new RegExp("\\b"+A+"\\b")).test(B.className)){B.className+=" "+A}}},removeClass:function(B,A){var C=new RegExp("\\b"+A+"\\b","g");if(B.className){B.className=B.className.replace(C,"").replace(/^\s*/,"").replace(/\s*$/,"").replace(/\s{2,}/g," ");if(!B.className){main.browser.ie?B.removeAttribute("className"):B.removeAttribute("class")}}},getChildControls:function(G,F,E){var D=[];var C=G.childNodes;for(var B=0,A=C.length;B<A;B++){if(C[B].controlType&&(!F||(F==C[B].controlType))&&(!E||(C[B].className.indexOf(E)>-1))){D.push(C[B])}}return D},getClientOffset:function(D,B){var A=y=0;var C=D;if(C&&C.offsetParent){A=D.offsetLeft;y=D.offsetTop;while(C=C.offsetParent){A+=C.offsetLeft;y+=C.offsetTop;if(B){A+=parseInt(utils.getStyleProperty(C,"borderLeftWidth"))||0;y+=parseInt(utils.getStyleProperty(C,"borderTopWidth"))||0}}}return{X:A,Y:y}},getBoxObject:function(C){var B=left=0;var A;if(C.getBoundingClientRect){A=C.getBoundingClientRect();B=A.top;left=A.left}else{A=utils.getClientOffset(C,!main.browser.opera);B=A.Y;left=A.X}return{top:B,left:left,width:C.offsetWidth,height:C.offsetHeight}},getRelativeOffset:function(A,D){var B=utils.getClientOffset(D);var C=utils.getClientOffset(A);return{X:C.X-B.X,Y:C.Y-B.Y}},getClientDimensions:function(){return{width:window.innerWidth||$.documentElement.offsetWidth,height:window.innerHeight||$.documentElement.offsetHeight}},sendXHR:function(D,A,E,B){var C=getXHRObj();if(C){if(E){C.onreadystatechange=function(){readyStateXHR(C,B)}}C.open("GET",D,!!E);C.send(A||"");if(!E&&((C.status==200)||(C.status==0))){if(B){B(C.responseText)}return C.responseText}}},setStyleProperty:function(B,A,C){switch(A){case"float":if(typeof (B.style.styleFloat)=="string"){B.style.styleFloat=C}else{B.style.cssFloat=C}break;case"opacity":if(typeof (B.style.opacity)!="undefined"){B.style.opacity=C}else{if(typeof (B.style.filter)!="undefined"){B.style.filter="alpha(opacity="+100*C+")"}}break;default:B.style[A]=C}},getStyleProperty:function(B,A){var C="";if($.defaultView){C=$.defaultView.getComputedStyle(B,null)[A]}else{if(B.currentStyle){switch(A){case"backgroundPosition":C=B.currentStyle.backgroundPositionX+" "+B.currentStyle.backgroundPositionY;break;default:C=B.currentStyle[A]}}}return C},parseRectangleString:function(A){var B,C=A.split(" ");switch(C.length){case 1:B={top:C[0],right:C[0],bottom:C[0],left:C[0]};break;case 2:B={top:C[0],right:C[1],bottom:C[0],left:C[1]};break;case 3:B={top:C[0],right:C[1],bottom:C[2],left:C[1]};break;case 4:B={top:C[0],right:C[1],bottom:C[2],left:C[3]};break}return B},interpolateColor:function(D,B,H){var F=[];for(var E=0;E<2;E++){if(/^rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\)$/.test(arguments[E])){F[E]=arguments[E].slice(4,-1).split(",");for(var C=0;C<3;C++){F[E][C]=parseInt(F[E][C])}}else{if(/^#[0-9a-fA-F]{6}/.test(arguments[E])){F[E]=arguments[E].match(/[0-9a-fA-F]{2}/g);for(var C=0;C<3;C++){F[E][C]=parseInt(F[E][C],16)}}else{if(/^#[0-9a-fA-F]{3}/.test(arguments[E])){F[E]=arguments[E].match(/[0-9a-fA-F]/g);for(var C=0;C<3;C++){F[E][C]=parseInt(F[E][C]+F[E][C],16)}}}}}var A=[];for(var E=0;E<3;E++){var G=Math.round(H*(F[1][E]-F[0][E])+F[0][E]);(G<16)?A.push("0"+G.toString(16)):A.push(G.toString(16))}return"#"+A[0]+A[1]+A[2]},incrementProperty:function(H,F){var A="";var D=H.split(" ");var E=F.split(" ");if(D.length!=E.length){D=utils.expandDimensionProperty(H).split(" ");E=utils.expandDimensionProperty(F).split(" ")}var G=[];for(var B=0;B<D.length;B++){var C=D[B].match(/(%|px|pt|em|en)$/);C=C?C[0]:"";G[B]=parseFloat(D[B])+parseFloat(E[B]);if(C=="px"){G[B]=Math.round(G[B])}G[B]+=C}for(var B=0;B<G.length;B++){A+=G[B]+" "}return A.slice(0,-1)},interpolateProperty:function(J,I,B){var D="";var G=J.split(" ");var E=I.split(" ");if(G.length!=E.length){G=utils.expandDimensionProperty(J).split(" ");E=utils.expandDimensionProperty(I).split(" ")}var A=[];for(var C=0;C<G.length;C++){var F=G[C].match(/(%|px|pt|em|en)/);F=F?F[0]:"";var H=(parseFloat(E[C])-parseFloat(G[C]))*B;if(F=="px"){A[C]=(parseInt(G[C])+Math.round(H))+F}else{A[C]=(parseFloat(G[C])+H)+F}}for(var C=0;C<A.length;C++){D+=A[C]+" "}return D.slice(0,-1)},expandDimensionProperty:function(B){var A=B.split(" ");switch(A.length){case 1:B=A[0]+" "+A[0]+" "+A[0]+" "+A[0];break;case 2:B=A[0]+" "+A[1]+" "+A[0]+" "+A[1];break;case 3:B=A[0]+" "+A[1]+" "+A[2]+" "+A[1];break}return B},preventDefault:function(A){_preventDefault(A)}};var animation=W.animation={callbacks:[],curve:{linear:null,step:function(A){return Math.round(A)},sine:function(A){return 0.5*(1+Math.sin((A-0.5)*Math.PI))},sine_accel:function(A){return 1+Math.sin(0.5*(A-1)*Math.PI)},sine_decel:function(A){return Math.sin(0.5*A*Math.PI)},sinesquare:function(B){var A=Math.sin(0.5*B*Math.PI);return A*A},logistic:function(A){return 1/(1+Math.exp(6-12*A))},quadratic_accel:function(A){return A*A},quadratic_decel:function(A){return A*(2-A)},quadratic:function(A){if(A<0.5){return 2*A*A}else{return 1-2*(A-1)*(A-1)}},cubic_accel:function(A){return A*A*A},cubic_decel:function(A){return 1+(A-1)*(A-1)*(A-1)},cubic:function(A){if(A<0.5){return 4*A*A*A}else{return 1+4*(A-1)*(A-1)*(A-1)}},circle_accel:function(A){return 1-Math.sqrt(1-A*A)},circle_decel:function(A){return Math.sqrt(A*(2-A))},circle:function(A){return(A<0.5)?(0.5-Math.sqrt(0.25-A*A)):(0.5+Math.sqrt(2*A-A*A-0.75))},bounce:function(A){var B=2*(1+1/Math.sqrt(2));B=B*B;var E=1/Math.sqrt(B),C=E;var D=2/Math.sqrt(2*B);if(A<E){return B*A*A}else{if(A<(E+D)){return B*(A-(E+0.5*D))*(A-(E+0.5*D))+0.5}else{return B*(A-(E+D+0.5*C))*(A-(E+D+0.5*C))+0.75}}},bounceB:function(A){var B=(5/3+2/Math.sqrt(3));B=B*B;var E=1/Math.sqrt(B);var D=2/Math.sqrt(3*B);var C=2/(3*Math.sqrt(B));if(A<E){return B*A*A}else{if(A<(E+D)){return B*(A-(E+0.5*D))*(A-(E+0.5*D))+2/3}else{return B*(A-(E+D+0.5*C))*(A-(E+D+0.5*C))+8/9}}},exponential_accel:function(A){return Math.pow(2,10*(A-1))},exponential_decel:function(A){return 1-Math.pow(2,-10*A)},exponential:function(A){if(A<0.5){return 0.5*Math.pow(2,10*(2*A-1))}else{return 1-0.5*Math.pow(2,10*(1-2*A))}},overshoot:function(A){if(A<0.6){return 0.55*(1+Math.sin((5*A/3-0.5)*Math.PI))}else{return 0.1*(1-0.5*(1+Math.sin((2.5*(A-0.6)-0.5)*Math.PI)))+1}},elastic:function(A){if(A<0.25){return 4*A}else{if(A<(0.25+3/64)){return 1+3*Math.sin(32*Math.PI*(A-0.25)/3)/(8*Math.PI)}else{var B=Math.log(2)/(0.75-3/64);return 1+(Math.exp(B*(1-A))-1)*3*Math.sin(32*Math.PI*(A-0.25)/3)/(8*Math.PI)}}},elasticB:function(A){if(A<0.25){return 4*A}else{if(A<(0.25+1/16)){return 1+Math.sin(8*Math.PI*(A-0.25))/(2*Math.PI)}else{var B=Math.log(2)/(0.75-1/16);return 1+(Math.exp(B*(1-A))-1)*Math.sin(8*Math.PI*(A-0.25))/(2*Math.PI)}}}},active:false,items:[],remove:function(A){animation.items[A]=null},process:function(E,F){var A=animation.items[E];if(A){var G;var B=false;if(!A.startTime){A.startTime=F;if(A.hasOwnProperty("offset")&&A.offset>0){A.startTime+=A.offset}G=A.from;if(A.hasOwnProperty("onstart")){A.onstart.call(A.element||A.object||A.func)}}if(F<A.startTime){return 1}else{if(F-A.startTime<A.duration){var D=(F-A.startTime)/A.nominalDuration;if(A.curve){if(A.loop&&A.loopComplete){D=1-A.curve(1-D)}else{D=A.curve(D)}}if(A.hasOwnProperty("property")&&((A.property=="backgroundColor")||(A.property=="color"))){G=utils.interpolateColor(A.from,A.to,D)}else{G=utils.interpolateProperty(A.from,A.to,D)}}else{if(!A.speed){G=A.to}else{var D=A.duration/A.nominalDuration;if(A.curve){D=A.curve(D)}if(A.hasOwnProperty("property")&&((A.property=="backgroundColor")||(A.property=="color"))){G=utils.interpolateColor(A.from,A.to,D)}else{G=utils.interpolateProperty(A.from,A.to,D)}}if(A.loop&&(A.loopComplete=!A.loopComplete)){A.startTime=A.startTime+A.duration;A.offset=null;var C=A.to;A.to=A.from;A.from=C}else{if(--A.repeat){A.startTime=A.startTime+A.duration;A.offset=null;if(A.loop){var C=A.to;A.to=A.from;A.from=C}}else{B=true}}}}if(A.func){A.func(G)}else{if(A.object&&A.hasOwnProperty("property")){A.object[A.property]=G}else{if(A.element&&A.hasOwnProperty("property")){utils.setStyleProperty(A.element,A.property,G)}else{if(A.element&&A.element.controlType&&A.hasOwnProperty("property")){A.element.setProperty(A.property,G)}}}}if(B&&A.callback){animation.callbacks.push({callback:A.callback,startTime:A.startTime+A.duration,context:A.element||A.object||A.func})}if(B){animation.remove(E);return 0}else{return 1}}else{return 0}},runSequence:function(){animation.callbacks=[];var C=(new Date()).getTime();var D=0;for(var B=0,A=animation.items.length;B<A;B++){D+=animation.process(B,C)}if(D){animation.run()}else{animation.stop()}for(var B=0,A=animation.callbacks.length;B<A;B++){animation.callbacks[B].callback.call(animation.callbacks[B].context,animation.callbacks[B].startTime)}},run:function(){setTimeout(function(){animation.runSequence()},0)},start:function(){animation.active=true;animation.run()},stop:function(A){if(A==undefined){animation.active=false;animation.items=[]}else{animation.remove(A)}},parseParams:function(A){if(!A.hasOwnProperty("from")){if(A.hasOwnProperty("element")){A.from=utils.getStyleProperty(A.element,A.property)}else{A.from=A.object.property}}if(A.hasOwnProperty("by")){A.to=utils.incrementProperty(A.from,A.by)}if(A.speed){A.nominalDuration=Math.abs(Math.round(1000*(parseFloat(A.to)-parseFloat(A.from))/A.speed));if(!A.duration){A.duration=A.nominalDuration}}if(A.loop){A.duration=A.duration/2;if(!A.nominalDuration){A.nominalDuration=A.duration}A.loopComplete=false}if(!A.nominalDuration){A.nominalDuration=A.duration}if(A.id){A.element=$.getElementById(A.id)}},getMatch:function(A){var C;if(A.element){C="element"}else{if(A.object){C="object"}else{return -1}}for(var D=0,B=animation.items.length;D<B;D++){var E=animation.items[D];if(E&&E[C]==A[C]&&E.property==A.property){return D}}return -1},add:function(A){var D={};for(var C in A){D[C]=A[C]}animation.parseParams(D);if(!animation.active){animation.start()}var B=animation.getMatch(D);if(B>-1){animation.items[B]=D;return B}else{animation.items.push(D);return animation.items.length-1}},rotate:function(H){var A;if(typeof (H.element)=="string"){A=xpath.evaluate(H.element)}else{if(H.element.constructor!=Array){A=[H.element]}else{A=H.element}}var J=parseInt(H.origin[0]);var I=parseInt(H.origin[1]);for(var N=0,L=A.length;N<L;N++){var G=parseInt(W.utils.getStyleProperty(A[N],"left")),D=parseInt(W.utils.getStyleProperty(A[N],"top")),S=G-J+Math.round(A[N].offsetWidth/2),Q=I-D-Math.round(A[N].offsetHeight/2),B=Math.sqrt(S*S+Q*Q),K,R,P,O,C;if(S==0){K=(Q>0)?0.5*Math.PI:1.5*Math.PI}else{K=Math.atan(Q/S);if(S<0){K=K+Math.PI}}O=H.eccentricity||0;C=H.orientation||0;P=B*Math.sqrt(1-O*O*Math.cos(K-C)*Math.cos(K-C));R=P/Math.cos(Math.asin(O));var E=function(Y,X,U,F,V){return function(a){a=parseFloat(a)+X-V;var b=U*F/Math.sqrt(U*U*Math.sin(a)*Math.sin(a)+F*F*Math.cos(a)*Math.cos(a));var Z=J+Math.round(b*Math.cos(a+V));var c=I-Math.round(b*Math.sin(a+V));Y.style.left=(Z-Math.round(Y.offsetWidth/2))+"px";Y.style.top=(c-Math.round(Y.offsetHeight/2))+"px"}}(A[N],K,R,P,C);var M={from:(H.clockwise)?2*Math.PI+"":"0",to:(H.clockwise)?"0":2*Math.PI+"",func:E};for(var T in H){if(T!="element"&&T!="func"){M[T]=H[T]}}W.animation.add(M)}},scrollTo:function(A){if(typeof (A.element)=="string"){A.element=xpath.evaluate(A.element)[0]}var C=function(F){return function(H){var G=H.split(" ");G[0]=parseInt(G[0]);G[1]=parseInt(G[1]);F.scrollLeft=G[0];F.scrollTop=G[1]}}(A.element);var E=(A.x||A.element.scrollLeft)+" "+(A.y||A.element.scrollTop);var D={from:A.element.scrollLeft+" "+A.element.scrollTop,to:E,func:C};for(var B in A){if(B!="element"&&B!="func"){D[B]=A[B]}}W.animation.add(D)}};controls["gapjumper.com:drag"]={initializer:function(A){var F=dom.getElementChildNodes(this);if(F.length){this.setProperty("elements",F);for(var C=0,B=F.length;C<B;C++){if(!F[C]["gapjumper.com"]){F[C]["gapjumper.com"]={control:this}}else{F[C]["gapjumper.com"].control=this}var E=xpath.evaluate(this.getProperty("handle"),F[C])[0];var D=function(I,H,G){return function(J){I.callMethod("initDrag",J,H,G)}}(this,F[C],E);events.addHandler(E,"mousedown",D,this);this.parentNode.insertBefore(F[C],this)}utils.removeNode(this)}},destructor:function(){},template:[{div:{"class":"gapjumper-hidden"}},[{content:{}}]],properties:{elements:{},dragId:{},source:{},handle:{},action:{},dragstyle:{"default":"outline"},constraint:{},multiSelect:{},fixX:{"default":"false"},fixY:{"default":"false"},onDrop:{},onDragMove:{},onDragEnter:{},onDragLeave:{},onDragEnd:{}},methods:{initDrag:function(Y,J,Z){var T=this.controlClass.previousSource;if(Y.ctrlKey&&T&&((this.getProperty("multiSelect")!="true")||(T["gapjumper.com"].control.getProperty("multiSelect")!="true")||(this.getProperty("dragId")!=T["gapjumper.com"].control.getProperty("dragId")))){return }this.controlClass.previousSource=J;this.controlClass.dropTarget=null;Y.stopPropagation();Y.preventDefault();var L={x:Y.clientX,y:Y.clientY};this.controlClass.mouseCoords=L;var K=this.getProperty("dragstyle");var E=utils.getBoxObject(J);var P={x:E.left,y:E.top,left:E.left,top:E.top,width:J.offsetWidth,height:J.offsetHeight,position:J.style.position};var F=null;if(K=="real"){if(J.style.position!="absolute"){J.style.position="relative";J.style.top=J.style.left="0px";var V=utils.getBoxObject(J);J.style.left=(P.left=E.left-V.left)+"px";J.style.top=(P.top=E.top-V.top)+"px"}else{J.style.left=(P.left=parseInt(utils.getStyleProperty(J,"left")))+"px";J.style.top=(P.top=parseInt(utils.getStyleProperty(J,"top")))+"px"}}else{if(K=="outline"){F=$.createElement("div");if(main.browser.ie&&main.browser.quirks){F.style.width=P.width+"px";F.style.height=P.height+"px"}else{F.style.width=(P.width-2)+"px";F.style.height=(P.height-2)+"px"}F.style.border="solid 1px #666666";F.style.backgroundColor="transparent";F.style.position="absolute";F.style.top=F.style.left="0px";$.body.appendChild(F);var I=utils.getBoxObject(F);F.style.top=(P.top=(E.top-I.top))+"px";F.style.left=(P.left=(E.left-I.left))+"px";F.style.display="none"}else{if(K=="cursor"){}}}var Q=null;if(this.getProperty("constraint")){var C=xpath.evaluate(this.getProperty("constraint"),J)[0];var N=utils.getBoxObject(C);Q={X1:N.left,Y1:N.top};if(C==$.documentElement){var X=utils.getClientDimensions();Q.X2=Q.X1+X.width;Q.Y2=Q.Y1+X.height}else{Q.X2=Q.X1+C.offsetWidth;Q.Y2=Q.Y1+C.offsetHeight}}var H=[];var M=null;var S=this.getProperty("action")?this.getProperty("action").toLowerCase():null;if(S=="insertsmart"){var O=function(b){return function(c){b.callMethod("doMouseEnter",c,J)}}(this);var B=function(b){return function(c){b.callMethod("doMouseLeave",c,J)}}(this);var G=this.getProperty("elements");for(var U=0,R=G.length;U<R;U++){if(G[U]!=J){if(G[U]["gapjumper.com"]&&G[U]["gapjumper.com"]["proxy"]){var D=G[U]["gapjumper.com"]["proxy"]}else{var D=controls["gapjumper.com:drop"].methods.createProxy(G[U]);H.push(D)}events.addHandler(D,"mouseenter",O,this);events.addHandler(D,"mouseleave",B,this)}}}else{if((S=="replace")||(S=="insertbefore")||(S=="insertafter")||(S=="replacechildren")||(S=="insertaslastchild")||(S=="insertasfirstchild")){M=this.callMethod("getDropTargets",this.getProperty("dragId"));var O=function(b){return function(c){b.callMethod("doMouseEnter",c,J)}}(this);var B=function(b){return function(c){b.callMethod("doMouseLeave",c,J)}}(this);for(var U=0,R=M.length;U<R;U++){if(M[U]["gapjumper.com"]["proxy"]){var D=M[U]["gapjumper.com"]["proxy"]}else{var D=controls["gapjumper.com:drop"].methods.createProxy(M[U]);H.push(D)}events.addHandler(D,"mouseenter",O,this);events.addHandler(D,"mouseleave",B,this)}}}var A=function(b){return function(c){b.callMethod("endDrag",c,J,F,P,H,arguments.callee,a,O,B)}}(this);events.addHandler($.documentElement,"mouseup",A,this);var a=function(b){return function(c){b.callMethod("doDrag",c,J,F,P,Q)}}(this);events.addHandler($.documentElement,"mousemove",a,this)},getDropTargets:function(A){var E=[];var D=controls["gapjumper.com:drop"].targets;for(var C=0,B=D.length;C<B;C++){if(D[C]["gapjumper.com"].control.getProperty("dragId")==A){E.push(D[C])}}return E},doDrag:function(G,E,D,A,K){var M=D||E;G.preventDefault();if(this.getProperty("multiSelect")&&G.ctrlKey){return }M.style.display="";oMouseCoords=controls["gapjumper.com:drag"]["mouseCoords"];var I=A.x;var H=A.y;var B=deltaY=0;if(this.getProperty("fixX")=="false"){B=G.clientX-oMouseCoords.x;I=I+B}if(this.getProperty("fixY")=="false"){deltaY=G.clientY-oMouseCoords.y;H=H+deltaY}var J=M.offsetWidth;var C=M.offsetHeight;if(K){if(I<K.X1){B=K.X1-A.x}else{if(I+J>K.X2){B=K.X2-J-A.x}}if(H<K.Y1){deltaY=K.Y1-A.y}else{if(H+C>K.Y2){deltaY=K.Y2-C-A.y}}}M.style.left=A.left+B+"px";M.style.top=A.top+deltaY+"px";G.dragSource=E;G.dragSourceProxy=D;if(this.getProperty("onDragMove")){var L=new Function("event",this.getProperty("onDragMove"));L.call(this,G)}},doMouseEnter:function(e,oNode){var oDropTarget=controls["gapjumper.com:drag"]["dropTarget"]=e.target.dropTarget||e.target;e.dragSource=oNode;e.dragTarget=oDropTarget;if(this.getProperty("action")!="insertsmart"){var oDropElement=oDropTarget["gapjumper.com"].control;if(oDropElement&&oDropElement.getProperty("onDragEnter")){eval("function(event){"+oDropElement.getProperty("onDragEnter")+"}")(e)}}if(this.getProperty("onDragEnter")){eval("function(event){"+this.getProperty("onDragEnter")+"}")(e)}},doMouseLeave:function(e,oNode){var oDropTarget=e.target.dropTarget||e.target;e.dragSource=oNode;e.dragTarget=oDropTarget;if(this.getProperty("action")!="insertsmart"){var oDropElement=oDropTarget["gapjumper.com"].control;if(oDropElement&&oDropElement.getProperty("onDragLeave")){eval("function(event){"+oDropElement.getProperty("onDragLeave")+"}")(e)}}if(this.getProperty("onDragLeave")){eval("function(event){"+this.getProperty("onDragLeave")+"}")(e)}controls["gapjumper.com:drag"]["dropTarget"]=null},endDrag:function(e,oNode,oProxyNode,oSourceInfo,aProxyTarget,oEndHandler,oMoveHandler,oMouseEnterHandler,oMouseLeaveHandler){if(this.getProperty("multiSelect")&&e.ctrlKey){return }var sAction=this.getProperty("action")?this.getProperty("action").toLowerCase():null;if(this.getProperty("onDrop")){eval("function(event){"+this.getProperty("onDrop")+"}")(e)}if(this.getProperty("dragstyle")=="outline"){if(!sAction){oProxyNode.style.display="";oNode.style.position="absolute";oNode.style.left=utils.getStyleProperty(oNode,"left")||"0px";oNode.style.top=utils.getStyleProperty(oNode,"top")||"0px";var oSourceBox=utils.getBoxObject(oNode);var oProxyBox=utils.getBoxObject(oProxyNode);oNode.style.left=((oProxyBox.left-oSourceBox.left)+parseInt(oNode.style.left))+"px";oNode.style.top=((oProxyBox.top-oSourceBox.top)+parseInt(oNode.style.top))+"px"}utils.removeNode(oProxyNode);oProxyNode=null}else{if(!sAction&&oNode.style.position=="relative"){var oSourceRelBox=utils.getBoxObject(oNode);oNode.style.position="absolute";oNode.style.left=utils.getStyleProperty(oNode,"left")||"0px";oNode.style.top=utils.getStyleProperty(oNode,"top")||"0px";var oSourceAbsBox=utils.getBoxObject(oNode);oNode.style.left=((oSourceRelBox.left-oSourceAbsBox.left)+parseInt(oNode.style.left))+"px";oNode.style.top=((oSourceRelBox.top-oSourceAbsBox.top)+parseInt(oNode.style.top))+"px"}}if(sAction){for(var i=0,j=aProxyTarget.length;i<j;i++){events.removeHandler(aProxyTarget[i],"mouseenter",oMouseEnterHandler);events.removeHandler(aProxyTarget[i],"mouseleave",oMouseLeaveHandler);aProxyTarget[i].dropTarget["gapjumper.com"]["proxy"]=null;utils.removeNode(aProxyTarget[i]);aProxyTarget[i]=null}if(this.getProperty("dragstyle")=="real"){oNode.style.position=oSourceInfo.position?oSourceInfo.position:"";oNode.style.top=oSourceInfo.top?oSourceInfo.top:"";oNode.style.left=oSourceInfo.left?oSourceInfo.left:"";oNode.style.bottom=oSourceInfo.bottom?oSourceInfo.bottom:"";oNode.style.right=oSourceInfo.right?oSourceInfo.right:""}var dropTarget=controls["gapjumper.com:drag"]["dropTarget"];if(dropTarget){switch(sAction){case"replace":dropTarget.parentNode.insertBefore(oNode,dropTarget);utils.deepRemoveNode(dropTarget);break;case"insertbefore":dropTarget.parentNode.insertBefore(oNode,dropTarget);break;case"insertafter":var oNext=dropTarget.nextSibling;dropTarget.parentNode.insertBefore(oNode,oNext);break;case"replacechildren":var oChildNodes=dropTarget.childNodes;for(var i=0,j=oChildNodes.length;i<j;i++){utils.deepRemoveNode(oChildNodes[0])}dropTarget.appendChild(oNode);break;case"insertaslastchild":dropTarget.appendChild(oNode);break;case"insertasfirstchild":dropTarget.insertBefore(oNode,dropTarget.firstChild);break;case"insertsmart":var previousSibling=dropTarget.previousSibling;while(previousSibling&&previousSibling!=oNode){previousSibling=previousSibling.previousSibling}if(!previousSibling){oNode.parentNode.insertBefore(oNode,dropTarget)}else{oNode.parentNode.insertBefore(oNode,dropTarget.nextSibling)}this.setProperty("dropTarget",null);break}}}events.removeHandler($.documentElement,"mousemove",oMoveHandler);events.removeHandler($.documentElement,"mouseup",oEndHandler)}},handlers:{load:function(E){if(!this.getProperty("elements")){aSource=xpath.evaluate(this.getProperty("source"),this);this.setProperty("elements",aSource);for(var B=0,A=aSource.length;B<A;B++){if(!aSource[B]["gapjumper.com"]){aSource[B]["gapjumper.com"]={control:this}}var D=xpath.evaluate(this.getProperty("handle"),aSource[B])[0];var C=function(H,G,F){return function(I){H.callMethod("initDrag",I,G,F)}}(this,aSource[B],D);events.addHandler(D,"mousedown",C,this)}utils.removeNode(this)}}}};controls["gapjumper.com:drop"]={initializer:function(A){var D=dom.getElementChildNodes(this);this.setProperty("elements",D);if(D.length){for(var C=0,B=D.length;C<B;C++){if(!D[C]["gapjumper.com"]){D[C]["gapjumper.com"]={}}D[C]["gapjumper.com"].control=this;this.parentNode.insertBefore(D[C],this)}utils.removeNode(this)}},handlers:{load:function(D){var C=this.getProperty("elements");if(!C.length){C=xpath.evaluate(this.getProperty("target"),this);for(var B=0,A=C.length;B<A;B++){if(!C[B]["gapjumper.com"]){C[B]["gapjumper.com"]={}}C[B]["gapjumper.com"].control=this}utils.removeNode(this)}if(!this.controlClass.targets){this.controlClass.targets=C}else{this.controlClass.targets=this.controlClass.targets.concat(C)}}},template:[{div:{"class":"gapjumper-hidden"}},[{content:{}}]],properties:{target:{},elements:{},dragId:{},onDrop:{},onDragEnter:{},onDragLeave:{}},methods:{createProxy:function(A){var C=$.createElement("div");C.style.width=A.offsetWidth+"px";C.style.height=A.offsetHeight+"px";utils.setStyleProperty(C,"opacity","0");C.style.position="absolute";C.style.backgroundColor="white";var B=utils.getClientOffset(A);C.style.top=B.Y+"px";C.style.left=B.X+"px";C.style.zIndex="1000";C.dropTarget=A;$.body.appendChild(C);A["gapjumper.com"]["proxy"]=C;return C}},destructor:function(){var A=main.getDropGroups();var D;for(var C=0,B=A.length;C<B;C++){if(A[C].control==this){D=C;break}}if(D!=undefined){A.splice(D,1)}}};main.setBrowserClass();}())
