DOMhelp={debugWindowId:"DOMhelpdebug",init:function(){if(!document.getElementById||!document.createTextNode){return;}},lastSibling:function(_1){var _2=_1.parentNode.lastChild;while(_2.nodeType!=1&&_2.previousSibling!=null){_2=_2.previousSibling;}return (_2.nodeType==1)?_2:false;},firstSibling:function(_3){var _4=_3.parentNode.firstChild;while(_4.nodeType!=1&&_4.nextSibling!=null){_4=_4.nextSibling;}return (_4.nodeType==1)?_4:false;},getText:function(_5){if(!_5.hasChildNodes()){return false;}var _6=/^\s+$/;var _7=_5.firstChild;while(_7.nodeType!=3&&_7.nextSibling!=null||_6.test(_7.nodeValue)){_7=_7.nextSibling;}return _7.nodeType==3?_7.nodeValue:false;},setText:function(_8,_9){if(!_8.hasChildNodes()){return false;}var _a=/^\s+$/;var _b=_8.firstChild;while(_b.nodeType!=3&&_b.nextSibling!=null||_a.test(_b.nodeValue)){_b=_b.nextSibling;}if(_b.nodeType==3){_b.nodeValue=_9;}else{return false;}},createLink:function(to,_d){var _e=document.createElement("a");_e.appendChild(document.createTextNode(_d));_e.setAttribute("href",to);return _e;},createTextElm:function(_f,txt){var _11=document.createElement(_f);_11.appendChild(document.createTextNode(txt));return _11;},closestSibling:function(_12,_13){var _14;if(_13==-1&&_12.previousSibling!=null){_14=_12.previousSibling;while(_14.nodeType!=1&&_14.previousSibling!=null){_14=_14.previousSibling;}}else{if(_13==1&&_12.nextSibling!=null){_14=_12.nextSibling;while(_14.nodeType!=1&&_14.nextSibling!=null){_14=_14.nextSibling;}}}return _14.nodeType==1?_14:false;},initDebug:function(){if(DOMhelp.debug){DOMhelp.stopDebug();}DOMhelp.debug=document.createElement("div");DOMhelp.debug.setAttribute("id",DOMhelp.debugWindowId);document.body.insertBefore(DOMhelp.debug,document.body.firstChild);},setDebug:function(bug){if(!DOMhelp.debug){DOMhelp.initDebug();}DOMhelp.debug.innerHTML+=bug+"\n";},stopDebug:function(){if(DOMhelp.debug){DOMhelp.debug.parentNode.removeChild(DOMhelp.debug);DOMhelp.debug=null;}},getKey:function(e){if(window.event){var key=window.event.keyCode;}else{if(e){var key=e.keyCode;}}return key;},getTarget:function(e){var _1a=window.event?window.event.srcElement:e?e.target:null;if(!_1a){return false;}while(_1a.nodeType!=1&&_1a.nodeName.toLowerCase()!="body"){_1a=_1a.parentNode;}return _1a;},stopBubble:function(e){if(window.event&&window.event.cancelBubble){window.event.cancelBubble=true;}if(e&&e.stopPropagation){e.stopPropagation();}},stopDefault:function(e){if(window.event&&window.event.returnValue){window.event.returnValue=false;}if(e&&e.preventDefault){e.preventDefault();}},cancelClick:function(e){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false;}if(e&&e.stopPropagation&&e.preventDefault){e.stopPropagation();e.preventDefault();}},addEvent:function(elm,_1f,fn,_21){if(elm.addEventListener){elm.addEventListener(_1f,fn,_21);return true;}else{if(elm.attachEvent){var r=elm.attachEvent("on"+_1f,fn);return r;}else{elm["on"+_1f]=fn;}}},cssjs:function(a,o,c1,c2){switch(a){case "swap":o.className=!DOMhelp.cssjs("check",o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);break;case "add":if(!DOMhelp.cssjs("check",o,c1)){o.className+=o.className?" "+c1:c1;}break;case "remove":var rep=o.className.match(" "+c1)?" "+c1:c1;o.className=o.className.replace(rep,"");break;case "check":var _28=false;var _29=o.className.split(" ");for(var i=0;i<_29.length;i++){if(_29[i]==c1){_28=true;}}return _28;break;}},safariClickFix:function(){return false;}};DOMhelp.addEvent(window,"load",DOMhelp.init,false);
