function tii_getTotalOffsetPosition(B,C){var D=C=="x"?B.offsetLeft:B.offsetTop;var A=B.offsetParent;while(A!=null){D+=C=="x"?A.offsetLeft:A.offsetTop;A=A.offsetParent}return D}function tii_stopDefaultAction(A){A.returnValue=false;if(typeof A.preventDefault!="undefined"){A.preventDefault()}}function tii_dom_createElement(I,C){var B=typeof window.opera!="undefined";var G=typeof document.all!="undefined"&&!B&&navigator.vendor!="KDE";var F;try{F=document.createElement(I)}catch(H){return null}var D=C.length;for(var E=0;E<D;E++){var A=C[E][0];var J=C[E][1];F.setAttribute(A,J);switch(A){case"id":F.id=J;break;case"class":if(G){F.setAttribute("className",J)}F.className=J;break;case"style":F.style.cssText=F.style.cssText+" "+J;break;case"for":if(G){F.setAttribute("htmlFor",J)}F.htmlFor=J}}return F}function tii_dom_removeWhitespaceTextNodes(B){for(var A=0;A<B.childNodes.length;A++){var C=B.childNodes[A];if(C.nodeType==3&&!/\S/.test(C.nodeValue)){B.removeChild(B.childNodes[A]);A--}if(C.nodeType==1){tii_dom_removeWhitespaceTextNodes(C)}}}function tii_callFunctionOnWindowLoad(A){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",A,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",A,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",A)}else{var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}}}}}function tii_callFunctionOnElementLoad(C,A){var D=arguments;tii_callFunctionOnWindowLoad(function(){window.loaded=true});var B=document.getElementById(C);if(B==null&&!window.loaded){var E=setInterval(function(){if(window.loaded){clearInterval(E)}B=document.getElementById(C);if(B!=null){clearInterval(E);var F=new Array();var H=D.length-2;for(var G=0;G<H;G++){F[G]=D[G+2]}A.apply(this,F)}},10)}}function tii_addEventHandlerOnElementLoad(C,D,A,E){tii_callFunctionOnWindowLoad(function(){window.loaded=true});var B=document.getElementById(C);if(B==null&&!window.loaded){var F=setInterval(function(){if(window.loaded){clearInterval(F)}B=document.getElementById(C);if(B!=null){clearInterval(F);tii_addEventHandler(B,D,A,E)}},10)}}function tii_addEventHandler(C,D,B,E){if(!C){window.status="Warning: Tried to attach event to null object";return false}if(typeof C.addEventListener!="undefined"){C.addEventListener(D,B,E)}else{if(typeof C.attachEvent!="undefined"){C.attachEvent("on"+D,B)}else{D="on"+D;if(typeof C[D]=="function"){var A=C[D];C[D]=function(){A();return B()}}else{C[D]=B}}}return true}function tii_removeEventHandler(B,C,A,D){if(typeof B.removeEventListener!="undefined"){B.removeEventListener(C,A,D)}else{if(typeof B.detachEvent!="undefined"){B.detachEvent("on"+C,A)}else{B["on"+C]=null}}return true};
