if(!LBS){var LBS={}}LBS.UTIL=new function(){this.getWindowDimensions=function(){return C()};this.getWindowScroll=function(){return A()};this.getElementPosition=function(D){return B(D)};var C=function(){if(typeof(window.innerWidth)=="number"){C=function(){return{width:window.innerWidth,height:window.innerHeight}}}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){C=function(){return{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}}}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){C=function(){return{width:document.body.clientWidth,height:document.body.clientHeight}}}else{C=function(){return null}}}}return C()};var A=function(){if(typeof(window.pageYOffset)=="number"){A=function(){return{x:window.pageXOffset,y:window.pageYOffset}}}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){A=function(){return{x:document.body.scrollLeft,y:document.body.scrollTop}}}else{if(document.documentElement&&(typeof(document.documentElement.scrollLeft)=="number"||typeof(document.documentElement.scrollTop)=="number")){A=function(){return{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}}}else{A=function(){return null}}}}return A()};var B=function(D){if(D.getBoundingClientRect){B=function(G){var F=G.getBoundingClientRect();var E=A();if(document.documentElement&&document.documentElement.clientLeft==2){return{x:F.left+E.x-2,y:F.top+E.y-2}}return{x:F.left+E.x,y:F.top+E.y}}}else{if(document.getBoxObjectFor){B=function(F){var E=document.getBoxObjectFor(F);return{x:E.x,y:E.y}}}else{if(D.offsetParent){B=function(G){var F=0;var E=0;do{F+=G.offsetLeft;E+=G.offsetTop;G=G.offsetParent}while(G);return{x:F,y:E}}}else{if(D.x&&D.y){B=function(E){return{x:E.x,y:E.y}}}else{B=function(E){return null}}}}}return B(D)}};LBS.UTIL.DOM=new function(){this.getElement=function(C){return A(C)};this.createElement=function(C,D){var E=B(C);if(D){E.className=D}return E};this.createTextNode=function(C){return document.createTextNode(C)};this.appendElement=function(C,D){C.appendChild(D);return D};this.appendNewElement=function(C,D,E){var F=B(D);C.appendChild(F);if(E){F.className=E}return F};this.appendText=function(C,D){C.appendChild(document.createTextNode(D))};this.clearElement=function(C){while(C.firstChild){C.removeChild(C.firstChild)}return C};var B=function(C){if(document.createElementNS){B=function(D){return document.createElementNS("http://www.w3.org/1999/xhtml","html:"+D)}}else{B=function(D){return document.createElement(D)}}return B(C)};var A=function(C){if(document.getElementById){A=function(D){return document.getElementById(D)}}else{if(document.all){A=function(D){return document.all[D]}}else{if(document.layers){A=function(D){return document.layers[D]}}else{A=function(D){return null}}}}return A(C)}};LBS.UTIL.STR=new function(){this.trim=function(A){return A.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}};LBS.UTIL.COOKIE=new function(){this.writeCookie=function(D,E,A){var B="";if(A){var C=new Date();C.setTime(C.getTime()+(A*1000));B="; expires="+C.toGMTString()}document.cookie=D+"="+encodeURIComponent(E)+B+"; path=/"};this.readCookie=function(B){if(!document.cookie){return null}var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return decodeURIComponent(E.substring(D.length,E.length))}}return null};this.eraseCookie=function(A){document.cookie=A+"=; expires=-1; path=/"}};