this.UserAgent=function(){this.getApp();this.getVersion();this.name=this.app+" "+this.version;
/*@cc_on
    try {
        if (typeof document.execCommand != 'undefined') {
            document.execCommand("BackgroundImageCache",false,true);
        }
        throw true;
    } catch (e) {
        return;
    }
    @*/
};this.UserAgent.prototype.id=this.navigator.userAgent;this.UserAgent.prototype.getApp=function(){
/*@cc_on this.app = 'MSIE';return;@*/
if(this.id.indexOf("Firefox")>-1){this.app="Firefox";}else{if(this.id.indexOf("Opera")>-1){this.app="Opera";}else{if(this.id.indexOf("AppleWebKit/")>-1){this.app="Safari";}else{if(this.id.indexOf("KHTML")>-1){this.app="Konqueror";}else{if(this.id.match(/Apple.*Mobile.*Safari/)){this.app="iSafari";}}}}}};this.UserAgent.prototype.getVersion=function(){switch(this.app){case"Firefox":/([0-9.]*)$/.test(this.id);break;case"Opera":/^Opera\/([0-9.]*)/.test(this.id);break;case"MSIE":/MSIE ([^;]*);/.test(this.id);break;case"Konqueror":/KHTML\/([0-9.]*)/.test(this.id);break;}this.version=RegExp.$1;};this.userAgent=new this.UserAgent();this.location.getParameter=function(b){var a=new RegExp("^\\?.*&?"+b+"=([^&]*).*$");return this.search.match(a)?RegExp.$1:false;};var LibArray=function(){};LibArray.prototype.inArray=function(c,b){for(var a=0;a<b.length;a++){if(b[a]==c){return true;}}return false;};window.libArray=new LibArray();var ArrayA=function(){var b;if(arguments.length==1&&arguments[0] instanceof Array){b=arguments[0];}else{if(arguments.length==1&&arguments[0] instanceof Object){b=Array.prototype.slice.apply(arguments[0]);}else{b=Array.prototype.slice.apply(arguments);}}for(var a in this.Functions){b[a]=this.Functions[a];}return b;};ArrayA.prototype.Functions={index:0,rewind:function(a){a=a||0;this.index=0+a;return this.index;},step:function(){return this[this.index++];},valid:function(a){a=a||0;return this.index<this.length-a?true:false;},current:function(){return this[this.index];},get:function(){var b=[];this.foreach(function(a){b.push(a);});return b;},inArray:function(a){var b=false;this.foreach(function(c){if(c==a){b=true;}});return b;},foreach:function(b){if(typeof b=="function"){var a=0;while(a<this.length){value=this[a];if(typeof value!="undefined"){b(value,a,this);}a++;}}else{throw (new Error("No callback function given."));}}};var EventHandler=function(){};EventHandler.prototype.predefined=["abort","blur","change","click","dblclick","error","focus","keydown","keypress","keyup","load","mousedown","mousemove","mouseout","mouseover","mouseup","mousewheel","reset","select","submit","unload"];EventHandler.prototype.userDefinedEvents=[];EventHandler.prototype.getEvent=function(a){a=a||window.event;if(!a.preventDefault){a.preventDefault=function(){this.returnValue=false;};}if(!a.stopPropagation){a.stopPropagation=function(){this.cancelBubble=true;};}return a;};EventHandler.prototype.addLoadEvent=function(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a;}else{window.onload=function(){if(b){b();}a();};}};EventHandler.prototype.addEvent=function(d,b,a){var c;if(!libArray.inArray(b,this.predefined)){d.userDefinedEvents=d.userDefinedEvents||[];d.userDefinedEvents["on"+b]=d.userDefinedEvents["on"+b]||[];d.userDefinedEvents["on"+b].push(a);a.registeredEventIndex=d.userDefinedEvents["on"+b].length-1;if(typeof d["on"+b]!="function"){d["on"+b]=function(g){for(var f in d.userDefinedEvents["on"+b]){if(typeof d.userDefinedEvents["on"+b][f]=="function"){d.userDefinedEvents["on"+b][f](g);}}};}return;}if(b=="mousewheel"){c=this.buildWheelHandler(d,a);}else{c=a;}if(d.addEventListener){if(b=="mousewheel"){b="DOMMouseScroll";}d.addEventListener(b,c,false);}else{if(d.attachEvent){d["e"+b+c]=c;d[b+c]=function(){d["e"+b+c](window.event);};d.attachEvent("on"+b,d[b+c]);}}};EventHandler.prototype.buildWheelHandler=function(c,a){var b=function(g,f){var h=0;g=g||window.event;if(g.wheelDelta){h=g.wheelDelta/120;if(window.opera){h=-h;}}else{if(g.detail){h=-g.detail/3;}}if(g.preventDefault){g.preventDefault();}else{window.event.returnValue=false;}f.call(c,h);};var d=function(f){f=f||window.event;b.call(c,f,a);};return d;};EventHandler.prototype.removeEvent=function(c,b,a){if(!libArray.inArray(b,this.predefined)){if(typeof c.userDefinedEvents["on"+b][a.registeredEventIndex]=="function"){c.userDefinedEvents["on"+b][a.registeredEventIndex]=undefined;}return;}if(c.removeEventListener){if(b=="mousewheel"){b="DOMMouseScroll";}c.removeEventListener(b,a,false);}else{if(c.detachEvent){c.detachEvent("on"+b,c[b+a]);c[b+a]=null;c["e"+b+a]=null;}}};EventHandler.prototype.getKeyCode=function(b){b=this.getEvent(b);var a=b.which||b.keyCode;return a;};window.eventHandler=new EventHandler();var LibObject=function(){};LibObject.prototype.isMember=function(c,b){for(var a in b){if(a==c){return true;}}return false;};LibObject.prototype.getMember=function(c,b){for(var a in b){if(a==c){return b[a];}}return false;};LibObject.prototype.toString=function(c){var d=[];for(var a in c){var b=(Number(c[a])==c[a]&&Number(c[a]).length==c[a].length)?true:false;d.push('"'+a+'":'+(parseFloat(c[a])===c[a]?c[a]:'"'+c[a]+'"'));}return"{"+d.join(",")+"}";};window.libObject=new LibObject();if(!this.JSON){this.JSON={};}(function(){function f(n){return n<10?"0"+n:n;}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key);}if(typeof rep==="function"){value=rep.call(holder,key,value);}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null";}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null";}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v;}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v);}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v;}return null;}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" ";}}else{if(typeof space==="string"){indent=space;}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify");}return str("",{"":value});};}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);});}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");};}}());var Loader=function(){this.dir="core/js/opt/";this.documentHead=document.getElementsByTagName("head")[0];this.documentScripts=this.documentHead.getElementsByTagName("script");};Loader.prototype.test=function(a){var c=new RegExp(".*"+this.dir+a+".js");for(var b=0;b<this.documentScripts.length;b++){if(typeof this.documentScripts[b].src!="undefined"&&this.documentScripts[b].src.match(c)){return true;}}return false;};Loader.prototype.instantiate=function(){var b=Array.prototype.slice.apply(arguments);var d=b.shift();var e=b.pop();if(!this.test(d)){var a=document.createElement("SCRIPT");a.src=this.dir+d+".js";a.type="text/javascript";this.documentHead.appendChild(a);}var c=0;this.interval=window.setInterval(function(){try{if(typeof window[d]=="function"&&typeof window[d].prototype.init!="undefined"){this.obj=new window[d]();if(this.obj instanceof window[d]){this.obj.init.apply(this.obj,b);throw true;}else{throw false;}}else{throw false;}}catch(f){if(f){window.clearInterval(this.interval);e(this.obj);}else{this.obj=false;}}c++;if(c>=100){window.clearInterval(this.interval);}}.bindTo(this),10);};eventHandler.addLoadEvent(function(){window.loader=new Loader();});CSSHandler=function(){};CSSHandler.prototype.getCSSValue=function(a,d,b){var c;if(typeof(window.getComputedStyle)=="function"){c=window.getComputedStyle(a,null)[d];}else{if(a.currentStyle){c=a.currentStyle[d];}else{return false;}}switch(b){case"int":c=Math.round(parseFloat(c))||0;break;case"float":c=parseFloat(c)||0;break;case"string":break;default:break;}return c;};CSSHandler.prototype.setOpacity=function(b,a){a=a>1?1:a<0?0:a;if(userAgent.app=="MSIE"){try{if(b.filters.item("DXImageTransform.Microsoft.Alpha").enabled){throw true;}else{throw false;}}catch(c){if(c==true){b.filters.item("DXImageTransform.Microsoft.Alpha").enabled=0;b.filters.item("DXImageTransform.Microsoft.Alpha").opacity=Math.round(a*100);b.filters.item("DXImageTransform.Microsoft.Alpha").enabled=1;}else{if(b.style.filter.indexOf("progid:")>-1){b.style.filter+=" DXImageTransform.Microsoft.Alpha(opacity:"+(Math.round(a*100))+");";}else{b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity:"+(Math.round(a*100))+");";}}}}else{b.style.opacity=a;}};CSSHandler.prototype.getOpacity=function(b){var a;if(userAgent.app=="MSIE"){try{if(b.filters.item("DXImageTransform.Microsoft.Alpha").enabled){throw true;}else{throw false;}}catch(c){if(c==true){a=b.filters.item("DXImageTransform.Microsoft.Alpha").opacity/100;}else{a=1;}}}else{a=parseFloat(this.getCSSValue(b,"opacity"));}return a;};CSSHandler.prototype.clip=function(c,e,b,a,d){var f;if(userAgent.app=="MSIE"){f=e+","+b+","+a+","+d;}else{f=e+" "+b+" "+a+" "+d;}c.style.clip="rect("+f+")";};CSSHandler.prototype.isClipped=function(b){var a=false;if(userAgent.app=="MSIE"){a=this.getCSSValue(b,"clip")=="rect(auto)"?false:true;}else{a=this.getCSSValue(b,"clip")=="auto"?false:true;}return a;};CSSHandler.prototype.unclip=function(a){if(userAgent.app=="MSIE"&&userAgent.version<8){a.style.clip="rect(auto)";}else{a.style.clip="auto";}};window.cssHandler=new CSSHandler();this.LibScreen=function(){};this.LibScreen.prototype.screen=this.document.getElementsByTagName("HEAD")[0].parentNode;this.LibScreen.prototype.dim=function(b,g,f){var d=b||document.body,a;b=b||document.getElementsByTagName("head")[0].parentNode;if(this.ov){this.ov.remove("fade");this.ov=undefined;}else{a={setDim:function(){this.style.width="1px";this.style.height="1px";this.style.width=b.scrollWidth+"px";this.style.height=b.scrollHeight+"px";},style:{position:"absolute",top:0,left:0,background:"black",zIndex:g||65536},oncreate:function(){this.setDim();eventHandler.addEvent(window,"resize",this.resizeListener=function(){this.setDim();}.bindTo(this));},onremove:function(){eventHandler.removeEvent(window,"resize",this.resizeListener);}};this.ov=renderer.createElement("div",a);cssHandler.setOpacity(this.ov,0);var e;eventHandler.addEvent(this.ov,"fadeready",e=function(){if(f){f();}var c=function(){this.removeCallback(e);}.call(this);}.bindTo(this));this.ov.renderIn(d,"fade",{"stopOpacity":{"in":0.7}});}};this.LibScreen.prototype.removeCallback=function(a){eventHandler.removeEvent(this.ov,"fadeready",a);};this.LibScreen.prototype.getScollSize=function(){return{"x":this.screen.scrollWidth,"y":this.screen.scrollHeight};};this.LibScreen.prototype.getOffsetSize=function(){return{"x":this.screen.offsetWidth,"y":this.screen.offsetHeight};};this.LibScreen.prototype.getClientSize=function(){return{"x":this.screen.clientWidth,"y":this.screen.clientHeight};};this.LibScreen.prototype.getScrollOffset=function(){var b=0,a=0;if(typeof window.pageYOffset=="number"){a=window.pageYOffset;b=window.pageXOffset;}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft;}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft;}}}return{"x":b,"y":a};};this.libScreen=new this.LibScreen();Renderer=function(){};Renderer.prototype.fade=function(c,b,f,e,d){if(typeof c.rendererFadeInterval!="undefined"){window.clearInterval(c.rendererFadeInterval);}c.fading=true;var a=cssHandler.getOpacity(c);b=b||(a===0?"in":"out");f=f||this.defaultEffectSettings.fade.fps;e=e||this.defaultEffectSettings.fade.stepping;d=!isNaN(d)?d:this.defaultEffectSettings.fade.stopOpacity[b];c.rendererFadeInterval=window.setInterval(function(){a=b=="out"?a-e:a+e;if((b=="in"&&a>=d)||(b=="out"&&a<=d)){cssHandler.setOpacity(c,a);window.clearInterval(c.rendererFadeInterval);if(typeof c.onfadeready=="function"){c.onfadeready();}if(typeof c.oneffectready=="function"){c.oneffectready();}c.fading=undefined;}else{cssHandler.setOpacity(c,a);}},Math.round(1000/f));};Renderer.prototype.move=function(d,k,l,i,e){if(typeof d.rendererMoveInterval!="undefined"){window.clearInterval(d.rendererMoveInterval);}d.moving=true;e=e||this.defaultEffectSettings.move.fps;i=i||this.defaultEffectSettings.move.stepping;l=l||this.defaultEffectSettings.move.easing;var m,q;startPos={"x":parseInt(cssHandler.getCSSValue(d,"left"),10),"y":parseInt(cssHandler.getCSSValue(d,"top"),10)};q={"x":parseInt(cssHandler.getCSSValue(d,"left"),10),"y":parseInt(cssHandler.getCSSValue(d,"top"),10)};var r=Math.max(startPos.x,k.x)-Math.min(startPos.x,k.x);var o=Math.max(startPos.y,k.y)-Math.min(startPos.y,k.y);var p=startPos.x>k.x?"left":"right";var n=startPos.y>k.y?"up":"down";var f=r>=o?"x":"y";var j=r>=o?o/r:r/o;var g=startPos;var c=function(){var s,t;if(r>o){s=p=="right"?q.x+=i:s=q.x-=i;t=n=="down"?q.y+=i*j:q.y-=i*j;}else{t=n=="down"?q.y+=i:t=q.y-=i;s=p=="right"?q.x+=i*j:q.x-=i*j;}return{"x":Math.round(s),"y":Math.round(t)};};var h=0;var a=i;while(a/2>0){h+=a;a=Math.floor(a/2);}a=i;var b=0;d.rendererMoveInterval=window.setInterval(function(){var t=Math.max(Math.abs(g[f]),Math.abs(k[f]))-Math.min(Math.abs(g[f]),Math.abs(k[f]));if(l===true&&t<h){var s=Math.ceil(i/2);if(i==a){i=i-(h-t)>s?i-(h-t):s;}else{s=Math.ceil(t/2);i=s>=1?s:1;}}if(t<=(l===true?1:i)){window.clearInterval(d.rendererMoveInterval);d.style.left=k.x+"px";d.style.top=k.y+"px";if(typeof d.onmoveready=="function"){d.onmoveready();}if(typeof d.oneffectready=="function"){d.oneffectready();}d.moving=undefined;}else{g=c();d.style.left=g.x+"px";d.style.top=g.y+"px";g.stepIndex=b++;g.stepWidth=i;g.delta=t;if(typeof d.onmove=="function"){d.onmove(g);}}},Math.round(1000/e));};Renderer.prototype.grow=function(f,i,d){var b=f.offsetWidth+f.getCSSValue("paddingLeft","int")+f.getCSSValue("paddingRight","int");var k=f.offsetHeight+f.getCSSValue("paddingTop","int")+f.getCSSValue("paddingBottom","int"),c,a;var e=Math.floor(k/2);var h=Math.floor(b/2);var g=Math.ceil(k/2);var j=Math.ceil(b/2);f.style.clip="rect("+e+"px, "+h+"px, "+g+"px, "+j+"px)";c=(b>k?b:k)/i;a=Math.ceil((c*(b>k?k:b)/(b>k?b:k))/2);c=Math.ceil(c/2);f.rendererGrowInterval=window.setInterval(function(){if(e-(b>k?a:c)>0){e-=(b>k?a:c);}else{e=0;}if(h+(b>k?c:a)<b){h+=(b>k?c:a);}else{h=b;}if(g+(b>k?a:c)<k){g+=(b>k?a:c);}else{g=k;}if(j-(b>k?c:a)>0){j-=(b>k?c:a);}else{j=0;}f.style.clip="rect("+e+"px "+h+"px "+g+"px "+j+"px)";if(j===0){f.unclip();window.clearInterval(f.rendererGrowInterval);if(typeof f.ongrowready=="function"){f.ongrowready();}if(typeof f.oneffectready=="function"){f.oneffectready();}}}.bindTo(this),Math.round(1000/d));};Renderer.prototype.defaultEffectSettings={fade:{startOpacity:{"in":0,"out":1},stopOpacity:{"in":1,"out":0},fps:25,stepping:0.1},move:{fps:25,stepping:25,easing:false,stopPos:{"x":0,"y":0}},grow:{fps:25,steps:5},slideIn:{fps:25,stepping:25,easing:true,stopPos:{"x":0,"y":0}},slideOut:{fps:25,stepping:25,easing:true}};Renderer.prototype.getEffectSettings=function(c,a){c=libObject.isMember(c,this.defaultEffectSettings)?c:null;if(c!==null){a=a||this.defaultEffectSettings[c];}for(var b in this.defaultEffectSettings[c]){if(typeof a[b]=="undefined"){a[b]=this.defaultEffectSettings[c][b];}}return a;};Renderer.prototype.elementMethods={renderIn:function(b,d,a){if(d){a=this.renderer.getEffectSettings(d,a);}switch(d){case"fade":cssHandler.setOpacity(this,a.startOpacity["in"]);b.appendChild(this);this.renderer.fade(this,"in",a.fps,a.stepping,a.stopOpacity["in"]);break;case"slideIn":this.style.position="absolute";b.appendChild(this);var c={"style":{"left":-this.offsetWidth+"px","top":-this.offsetHeight+"px"}};var f={"x":0,"y":0};if(typeof a.startPos!="undefined"){switch(typeof a.startPos){case"string":if(a.startPos=="rand"){if(typeof this.lastSlideInStartPos=="undefined"){this.lastSlideInStartPos=a.startPos;}var e=["top","topRight","right","bottomRight","bottom","bottomLeft","left","topLeft"];do{a.startPos=e[Math.round(Math.random()*(e.length-1))];}while(this.lastSlideInStartPos==a.startPos);this.lastSlideInStartPos=a.startPos;}switch(a.startPos){case"top":c.style.left=Math.floor((b.clientWidth)/2)-Math.floor(this.offsetWidth/2)+"px";c.style.top=-this.offsetHeight+"px";f.x=Math.floor((b.clientWidth)/2)-Math.floor(this.offsetWidth/2);f.y=0;break;case"topRight":c.style.left=b.clientWidth+"px";c.style.top=-this.offsetHeight+"px";f.x=b.clientWidth-this.offsetWidth;f.y="0";break;case"right":c.style.left=b.clientWidth+"px";c.style.top=Math.floor(b.clientHeight/2-this.offsetHeight/2)+"px";f.x=b.clientWidth-this.offsetWidth;f.y=Math.floor(b.clientHeight/2-this.offsetHeight/2);break;case"bottomRight":c.style.left=b.clientWidth+"px";c.style.top=b.clientHeight+"px";f.x=b.clientWidth-this.offsetWidth;f.y=b.clientHeight-this.offsetHeight;break;case"bottom":c.style.left=Math.floor(b.clientWidth/2-this.offsetWidth/2)+"px";c.style.top=b.clientHeight+"px";f.x=parseInt(Math.floor(b.clientWidth/2-this.offsetWidth/2),10);f.y=b.clientHeight-this.offsetHeight;break;case"bottomLeft":c.style.left=-this.offsetWidth+"px";c.style.top=b.clientHeight+"px";f.x="0";f.y=b.clientHeight-this.offsetHeight;break;case"left":c.style.left=-this.offsetWidth+"px";c.style.top=Math.floor(b.clientHeight/2-this.offsetHeight/2)+"px";f.x="0";f.y=Math.floor(b.clientHeight/2-this.offsetHeight/2);break;case"topLeft":break;default:break;}break;default:break;}}this.setProperties(c);this.renderer.move(this,f,a.easing,a.stepping,a.fps);break;case"grow":b.appendChild(this);this.renderer.grow(this,a.steps,a.fps);break;default:b.appendChild(this);}if(typeof this.onrender=="function"){this.onrender();}},remove:function(b,a){if(b){a=this.renderer.getEffectSettings(b,a);}switch(b){case"fade":eventHandler.addEvent(this,"fadeready",this.fadeready=function(){var d=function(){eventHandler.removeEvent(this,"fadeready",this.fadeready);}.call(this);if(this.parentNode){this.parentNode.removeChild(this);}}.bindAsEventListener(this));this.renderer.fade(this,"out",a.fps,a.stepping,a.stopOpacity.out);break;case"slideOut":this.style.position="absolute";var c={"x":-this.offsetWidth,"y":-this.offsetHeight};if(typeof a.stopPos!="undefined"){switch(typeof a.stopPos){case"string":switch(a.stopPos){case"top":c.x=this.offsetLeft;c.y=-this.offsetHeight;break;case"topRight":c.x=this.parentNode.clientWidth;c.y=-this.offsetHeight;break;case"right":c.x=this.parentNode.clientWidth;c.y=Math.floor(this.parentNode.clientHeight/2-this.offsetHeight/2);break;case"bottomRight":c.x=this.parentNode.clientWidth;c.y=this.parentNode.clientHeight;break;case"bottom":c.x=parseInt(Math.floor(this.parentNode.clientWidth/2-this.offsetWidth/2),10);c.y=this.parentNode.clientHeight;break;case"bottomLeft":c.x=-this.offsetWidth;c.y=this.parentNode.clientHeight;break;case"left":c.x=-this.offsetWidth;c.y=Math.floor(this.parentNode.clientHeight/2-this.offsetHeight/2);break;case"topLeft":break;default:break;}break;default:break;}}eventHandler.addEvent(this,"moveready",this.moveready=function(){eventHandler.removeEvent(this,"moveready",this.moveready);if(this.parentNode){this.parentNode.removeChild(this);}}.bindAsEventListener(this));this.renderer.move(this,c,a.easing,a.stepping,a.fps);break;default:if(this.parentNode){this.parentNode.removeChild(this);}}if(typeof this.onremove=="function"){this.onremove();}},move:function(a){a=this.renderer.getEffectSettings("move",a);this.renderer.move(this,a.stopPos,a.easing,a.stepping,a.fps);},fade:function(a){a=this.renderer.getEffectSettings("fade",a);this.renderer.fade(this,a.dir,a.fps,a.stepping,a.stopOpacity);},setOpacity:function(a){cssHandler.setOpacity(this,a);},getOpacity:function(){return cssHandler.getOpacity(this);},getCSSValue:function(b,a){return cssHandler.getCSSValue(this,b,a);},clip:function(d,b,a,c){cssHandler.clip(this,d,b,a,c);},isClipped:function(){return cssHandler.isClipped(this);},unclip:function(){cssHandler.unclip(this);},getScreenOffset:function(){return this.renderer.getScreenOffset(this);},getCustomOffset:function(a){return this.renderer.getCustomOffset(this,a);},getOffsetSize:function(){return{Width:this.offsetWidth,Height:this.offsetHeight};},getClientSize:function(){return{Width:this.clientWidth,Height:this.clientHeight};},setProperties:function(b,a){a=a||this;this.renderer.setProperties(b,a);},empty:function(){this.renderer.empty(this);},appendImage:function(a){this.renderer.appendImage(a,this);},addClassName:function(a){this.className+=this.className!=""?" "+a:a;},removeClassName:function(a){var b=new RegExp("(^"+a+" ?| "+a+")");this.className=this.className.replace(b,"");b=undefined;},hasClassName:function(a){var b=new RegExp("(^"+a+" ?| "+a+")");return this.className.match(b,"")?true:false;},getElement:function(a){return this.renderer.getElement(a,this);},getElements:function(a){return this.renderer.getElements(a,this);},mouseover:function(){return this.renderer.mouseover(this);}};Renderer.prototype.getScreenOffset=function(c){var b=libScreen.getScrollOffset();var a=c.offsetLeft;var e=c.offsetTop;var d=c.offsetParent;while(d!==null){a+=d.offsetLeft;e+=d.offsetTop;a+=cssHandler.getCSSValue(d,"borderLeftWidth","int");e+=cssHandler.getCSSValue(d,"borderTopWidth","int");d=d.offsetParent;}return{x:a-b.x,y:e-b.y};};Renderer.prototype.getCustomOffset=function(c,b){var a=c.offsetLeft;var e=c.offsetTop;var d=c.offsetParent;while(d!==null&&d!=b){a+=d.offsetLeft;a+=cssHandler.getCSSValue(d,"borderLeftWidth","int");e+=d.offsetTop;e+=cssHandler.getCSSValue(d,"borderTopWidth","int");d=d.offsetParent;}return{x:a,y:e};};Renderer.prototype.appendImage=function(a,b){var c=this.createElement("IMG");if(typeof a=="object"){this.setProperties(c,a);}c.renderIn(b);};Renderer.prototype.empty=function(a){while(a.hasChildNodes()){a.removeChild(a.firstChild);}};Renderer.prototype.setProperties=function(b,a){for(var c in b){if(typeof b[c]=="object"&&typeof a[c]!="undefined"){this.setProperties(b[c],a[c]);}else{a[c]=b[c];}}};Renderer.prototype.createElement=function(a,b){var d=a.toLowerCase()=="img"?new Image():document.createElement(a);d.renderer=this;for(var c in this.elementMethods){d[c]=this.elementMethods[c];}if(b){d.setProperties(b);}if(typeof d.oncreate=="function"){d.oncreate();}return d;};Renderer.prototype.getElement=function(b,c){c=c||document;var a;b.match(/^([^.#]*)?([.#])?(.*)$/);if(RegExp.$2=="."){a=window.getElementsByClassName(RegExp.$3,RegExp.$1,c);}else{if(RegExp.$2=="#"){a=document.getElementById(RegExp.$3);}else{if(typeof RegExp.$2=="undefined"||RegExp.$2==""){if(typeof c.getElementsByTagName!="undefined"){a=c.getElementsByTagName(RegExp.$1);}else{throw"parent.getElementsByTagName is not a function, renderer.getElement";}}}}return typeof a.length!="undefined"?a.length==1?a[0]:false:a;};Renderer.prototype.getElements=function(a,b){b=b||document;a.match(/^([^.]*)?([.])?(.*)$/);if(RegExp.$2=="."){return window.getElementsByClassName(RegExp.$3,RegExp.$1,b);}else{if(typeof RegExp.$2=="undefined"||RegExp.$2==""){if(typeof b.getElementsByTagName!="undefined"){return b.getElementsByTagName(RegExp.$1);}else{throw"parent.getElementsByTagName is not a function, renderer.getElement";}}}return false;};Renderer.prototype.mouseover=function(b){if(!b.renderer){this.assimilate(b);}var c=this.getScreenOffset(b);var a=b.getOffsetSize();if(this.currentMousePos.x>=c.x&&this.currentMousePos.x<=c.x+a.Width&&this.currentMousePos.y>=c.y&&this.currentMousePos.y<=c.y+a.Height){return true;}else{return false;}};Renderer.prototype.getWindowSize=function(){var a=document.getElementsByTagName("HEAD")[0].parentNode;return{"width":a.clientWidth,"height":a.clientHeight};};Renderer.prototype.assimilate=function(c,a){c.renderer=this;for(var b in this.elementMethods){c[b]=this.elementMethods[b];}if(a){c.setProperties(a);}return c;};window.renderer=new Renderer();eventHandler.addEvent(document,"mousemove",function(a){a=eventHandler.getEvent(a);Renderer.prototype.currentMousePos={"x":a.clientX,"y":a.clientY};});var HttpRequest=function(){var a=null;this.method="GET";this.tries=0;this.timeout=10000;this.asynchron=true;this.send=null;this.loading=false;this.init=function(b){if(window.XMLHttpRequest){a=new XMLHttpRequest();if(a.overrideMimeType){}}else{if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLHTTP");}}if(b){a.onreadystatechange=function(){if(a.readyState==4){if(this.timeout){window.clearTimeout(this.timeout);}try{if(a.status){throw true;}else{throw false;}}catch(c){if(c===true){if(a.status==200){b(a.responseText,true);}else{b(a.responseText);}}else{b("{status:"+a.status+"}");}this.loading=false;}}}.bindTo(this);}};this.toggleSync=function(){this.asynchron=!this.asynchron;};this.load=function(b){this.loading=true;this.url=b;a.open(this.method,b,this.asynchron);if(this.method=="POST"){a.setRequestHeader("Content-type","application/x-www-form-urlencoded");a.setRequestHeader("Content-length",this.send.length);a.setRequestHeader("Connection","close");}a.send(this.send);this.timeout=window.setTimeout(function(){if(this.tries<3){this.abort();this.load(this.url);this.tries++;}}.bindTo(this),60000);if(this.asynchron===false){this.loading=false;return a.responseText;}return true;};this.abort=function(){a.abort();this.loading=false;};};eventHandler.addLoadEvent(function(){window.httpRequest=new HttpRequest();});this.WatchDog=function(a){this.satisfied={};for(var b in a){this.satisfied[b]=false;}this.init();};this.WatchDog.prototype.action=function(){return false;};this.WatchDog.prototype.init=function(){this.stroke=function(a,b){this.action=typeof b=="function"?b:this.action;this.satisfied[a]=true;for(var c in this.satisfied){if(this.satisfied[c]===false){return false;}}this.action();return true;};};function $A(a){return Array.prototype.slice.apply(a);}Function.prototype.bindAsTimer=function(){var d=this;var b=Array.prototype.slice.apply(arguments);var a=b.shift();var c=function(){return d.apply(a,b);};return c;};Function.prototype.bindAsEventListener=function(a,b){var d=this;this.activator=b;var c=function(f){var e=f||window.event;return d.call(a,e);};return c;};Function.prototype.bindTo=function(){var e=this,c,b=Array.prototype.slice.apply(arguments),a=b.shift();var d=function(){if(arguments){var f=Array.prototype.slice.apply(arguments);c=f.concat(b);}else{c=b;}return e.apply(a,c);};return d;};function $A(a){return Array.prototype.slice.apply(a);}Function.prototype.bindAsTimer=function(){var d=this;var b=Array.prototype.slice.apply(arguments);var a=b.shift();var c=function(){return d.apply(a,b);};return c;};Function.prototype.bindAsEventListener=function(a,b){var d=this;this.activator=b;var c=function(f){var e=f||window.event;return d.call(a,e);};return c;};Function.prototype.bindTo=function(){var e=this,c,b=Array.prototype.slice.apply(arguments),a=b.shift();var d=function(){if(arguments){var f=Array.prototype.slice.apply(arguments);c=f.concat(b);}else{c=b;}return e.apply(a,c);};return d;};var getElementsByClassName=function(b,a,c){if(document.getElementsByClassName){getElementsByClassName=function(j,m,h){h=h||document;var d=h.getElementsByClassName(j),l=(m)?new RegExp("\\b"+m+"\\b","i"):null,e=[],g;for(var f=0,k=d.length;f<k;f+=1){g=d[f];if(!l||l.test(g.nodeName)){e.push(g);}}return e;};}else{if(document.evaluate){getElementsByClassName=function(o,r,n){r=r||"*";n=n||document;var g=o.split(" "),p="",l="http://www.w3.org/1999/xhtml",q=(document.documentElement.namespaceURI===l)?l:null,h=[],d,f;for(var i=0,k=g.length;i<k;i+=1){p+="[contains(concat(' ', @class, ' '), ' "+g[i]+" ')]";}try{d=document.evaluate(".//"+r+p,n,q,0,null);}catch(m){d=document.evaluate(".//"+r+p,n,null,0,null);}while((f=d.iterateNext())){h.push(f);}return h;};}else{getElementsByClassName=function(r,u,q){u=u||"*";q=q||document;var h=r.split(" "),t=[],d=(u==="*"&&q.all)?q.all:q.getElementsByTagName(u),p,j=[],o;for(var i=0,e=h.length;i<e;i+=1){t.push(new RegExp("(^|\\s)"+h[i]+"(\\s|$)"));}for(var g=0,s=d.length;g<s;g+=1){p=d[g];o=false;for(var f=0,n=t.length;f<n;f+=1){o=t[f].test(p.className);if(!o){break;}}if(o){j.push(p);}}return j;};}}return getElementsByClassName(b,a,c);};String.prototype.bdpUcFirst=function(){var a=this[0].toUpperCase();for(var b=1;b<this.length;b++){a+=this[b];}return a;};String.prototype.bdpTrim=function(){return this.replace(/^[\s\r\x00]+/,"").replace(/[\s\r\x00]+$/,"");};
