/* 
 * Advanced Layer Popup 1.08 
 * Copyright(c) 2007-2011, DMXzone.com 
 */ 
cDomEvent={e:null,type:"",button:0,key:0,x:0,y:0,pagex:0,pagey:0,target:null,from:null,to:null};cDomEvent.init=function(a){if(window.event){a=window.event}this.e=a;this.type=a.type;this.button=(a.which)?a.which:a.button;this.key=(a.which)?a.which:a.keyCode;this.target=(a.srcElement)?a.srcElement:a.originalTarget;this.currentTarget=(a.currentTarget)?a.currentTarget:a.srcElement;this.from=(a.originalTarget)?a.originalTarget:(a.fromElement)?a.fromElement:null;this.to=(a.currentTarget)?a.currentTarget:(a.toElement)?a.toElement:null;this.x=(a.layerX)?a.layerX:(a.offsetX)?a.offsetX:null;this.y=(a.layerY)?a.layerY:(a.offsetY)?a.offsetY:null;this.screenX=a.screenX;this.screenY=a.screenY;this.pageX=(a.pageX)?a.pageX:a.x+document.body.scrollLeft;this.pageY=(a.pageY)?a.pageY:a.y+document.body.scrollTop};cDomEvent.getEvent=function(a){if(window.event){a=window.event}return{e:a,type:a.type,button:(a.which)?a.which:a.button,key:(a.which)?a.which:a.keyCode,target:cDomEvent.getRealNode(a.target||a.srcElement),currentTarget:cDomEvent.getRealNode(a.currentTarget||a.srcElement),from:(a.originalTarget)?a.originalTarget:(a.fromElement)?a.fromElement:null,to:(a.currentTarget)?a.currentTarget:(a.toElement)?a.toElement:null,x:(a.layerX)?a.layerX:(a.offsetX)?a.offsetX:null,y:(a.layerY)?a.layerY:(a.offsetY)?a.offsetY:null,screenX:a.screenX,screenY:a.screenY,pageX:(a.pageX)?a.pageX:(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),pageY:(a.pageY)?a.pageY:(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}};cDomEvent.getRealNode=function(a){if(a&&a.type==3){return a.parentNode}else{return a}};cDomEvent.cancelEvent=function(a){if(a.preventDefault){a.preventDefault()}a.returnValue=false;a.cancelBubble=true;return false};cDomEvent.addEvent=function(hElement,sEvent,handler,bCapture){if(hElement.addEventListener){hElement.addEventListener(sEvent,handler,bCapture);return true}else{if(hElement.attachEvent){return hElement.attachEvent("on"+sEvent,handler)}else{if(document.all||hElement.captureEvents){if(hElement.captureEvents){eval("hElement.captureEvents( Event."+sEvent.toUpperCase()+" )")}eval("hElement.on"+sEvent+" = "+handler)}else{alert("Not implemented yet!")}}}};cDomEvent.encapsulateEvent=function(a){return function(b){b=cDomEvent.getEvent(b);a.call(b.target,b.e)}};cDomEvent.eventQueue=[];cDomEvent.hQueueTimer=null;cDomEvent.startQueueTimer=function(){if(cDomEvent.hQueueTimer){window.clearTimeout(cDomEvent.hQueueTimer)}for(var a=0;a<cDomEvent.eventQueue;a++){if(cDomEvent.eventQueue[a]){cDomEvent.addEvent2(cDomEvent.eventQueue[a][0],cDomEvent.eventQueue[a][1],cDomEvent.eventQueue[a][2],cDomEvent.eventQueue[a][3])}}cDomEvent.hQueueTimer=window.setTimeout(cDomEvent.startQueueTimer,100)};cDomEvent.addEvent2=function(d,e,b,c){if(typeof d=="string"){d=document.getElementById(d)}if(d){try{if(d.addEventListener){d.addEventListener(e,cDomEvent.encapsulateEvent(b),c);return true}else{if(d.attachEvent){return d.attachEvent("on"+e,cDomEvent.encapsulateEvent(b))}else{alert("Not implemented!")}}}catch(a){cDomEvent.eventQueue.push([d,e,b,c]);cDomEvent.startQueueTimer()}}else{alert("wrong")}};cDomEvent.DomLoaded={onload:[],loaded:function(){if(arguments.callee.done){return}arguments.callee.done=true;for(i=0;i<cDomEvent.DomLoaded.onload.length;i++){cDomEvent.DomLoaded.onload[i]()}},load:function(handler){this.onload.push(handler);if(document.addEventListener){document.addEventListener("DOMContentLoaded",cDomEvent.DomLoaded.loaded,null)}if(/KHTML|WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(_timer);delete _timer;cDomEvent.DomLoaded.loaded()}},10);
/*@cc_on @*/
/*@if (@_win32)
		var proto = "src='javascript:void(0)'"
		if ( location.protocol == "https:" ) proto = "src=//0"
		document.write( "<scr"+"ipt id=__ie_onload defer " + proto + "><\/scr"+"ipt>" )
		var script = document.getElementById( "__ie_onload" )
		script.onreadystatechange = function() 
		{
		    if (this.readyState == "complete") 
			{
		        cDomEvent.DomLoaded.loaded()
		    }
		}
		/*@end @*/
}window.onload=cDomEvent.DomLoaded.loaded}};cDomEvent.removeEvent=function(hElement,sEvent,handler,bCapture){if(hElement.addEventListener){hElement.removeEventListener(sEvent,handler,bCapture);return true}else{if(hElement.attachEvent){return hElement.detachEvent("on"+sEvent,handler)}else{if(document.all||hElement.captureEvents){eval("hElement.on"+sEvent+" = null")}else{alert("Not implemented yet!")}}}};cDomEvent.customEvent=function(b,a){this.sType=b;this.hScope=a||window;this.subscribers=[];this.returnValue=true;this.cancelBubble=false;this.eventData=null};cDomEvent.customEvent.prototype={fire:function(){var c=true;this.returnValue=true;this.cancelBubble=false;this.eventData=null;var e=[];var b=this.subscribers.length;if(b==0){return c}var a;for(a=0;a<arguments.length;a++){e.push(arguments[a])}for(a=0;a<b;a++){if(this.subscribers[a]){var d=this.subscribers[a].bOverride?this.subscribers[a].hObject:this.hScope;c=this.subscribers[a].hListener.call(d,this,e,this.subscribers[a].hObject);if(this.cancelBubble){break}}}return c},subscribe:function(b,c,a){this.subscribers.push(new cDomEvent.eventSubscriber(b,c,a))},unsubscribe:function(b,d){var c=this.subscribers.length;for(var a=0;a<c;a++){if(this.subscribers[a]&&this.subscribers[a].contains(b,d)){this._delete(a);return true}}return false},_delete:function(a){var b=this.subscribers[a];if(b){delete b.hListener;delete b.hObject}this.subscribers.splice(a,1)}};cDomEvent.eventSubscriber=function(b,c,a){this.hListener=b;this.hObject=c||null;this.bOverride=a};cDomEvent.eventSubscriber.prototype.contains=function(a,b){if(this.hListener==a&&this.hObject==b){return true}return false};if(typeof cDomObject=="undefined"){cDomObject={};(function(){var a=navigator.userAgent.toLowerCase();cDomObject.isOpera=(a.indexOf("opera")>-1);cDomObject.isSafari=(a.indexOf("safari")>-1);cDomObject.isIE=(window.ActiveXObject);cDomObject.isIE7=cDomObject.isIE&&(a.indexOf("msie 7")>=0);cDomObject.sDocMode=document.compatMode||""})();cDomObject.$=function(a){if(typeof(a)=="string"){return document.getElementById(a)}return a};cDomObject.getStyle=function(a,c){a=cDomObject.$(a);if(typeof(a.style[c])!="undefined"&&a.style[c]!=""){return a.style[c]}else{if(a.currentStyle){if(typeof(a.currentStyle[c])!="undefined"){return a.currentStyle[c]}}else{if(a.ownerDocument&&a.ownerDocument.defaultView&&a.ownerDocument.defaultView.getComputedStyle){var b=a.ownerDocument.defaultView.getComputedStyle(a,null);if(b){if(typeof(b[c])!="undefined"){return b[c]}}}}}return null};cDomObject.setStyleValue=function(b,c,a){b=cDomObject.$(b);b.style[c]=a};if(cDomObject.isIE){cDomObject.setStyle=function(b,a,c){if(a=="opacity"){if(typeof b.style.filter=="string"){b.style.filter="alpha(opacity="+parseFloat(c)*100+")";if(!b.currentStyle||!b.currentStyle.hasLayout){b.style.zoom=1}}else{b.style[a]=c}}else{a=cDMX.util.toCamelCase(a);b.style[a]=c}return c}}else{cDomObject.setStyle=function(b,a,c){a=cDMX.util.toCamelCase(a);b.style[a]=c;return c}}cDomObject.setAbsolutePositioned=function(a,b){cDomObject.setStyleValue(a,"position","absolute");if(b){cDomObject.setStyleValue(a,"z-index",b)}};cDomObject.setRelativePositioned=function(a,b){cDomObject.setStyleValue(a,"position","relative");if(b){cDomObject.setStyleValue(a,"z-index",b)}};cDomObject.getStyleValue=function(b,c){var d=cDomObject.getStyle(b,c);var a=parseInt(d);if(!isNaN(a)){return a}else{return null}};cDomObject.getLeft=function(b){b=cDomObject.$(b);var a=cDomObject.getStyleValue(b,"left");if(isNaN(a)||(a==null)){a=parseInt(b.offsetLeft)}return a};cDomObject.getTop=function(b){b=cDomObject.$(b);var a=cDomObject.getStyleValue(b,"top");if(isNaN(a)||(a==null)){a=parseInt(b.offsetTop)}return a};cDomObject.getWidth=function(b){b=cDomObject.$(b);var a=cDomObject.getStyleValue(b,"width");if(isNaN(a)||(a==null)){a=Math.max(b.offsetWidth,b.clientWidth)}return a};cDomObject.getHeight=function(b){b=cDomObject.$(b);var a=cDomObject.getStyleValue(b,"height");if(isNaN(a)||a==null){a=Math.max(b.offsetHeight,b.clientHeight)}return a};cDomObject.getScrollTop=function(){return document.documentElement.scrollTop||document.body.scrollTop};cDomObject.getScrollLeft=function(){return document.documentElement.scrollLeft||document.body.scrollLeft};cDomObject.getViewportHeight=function(){var a=-1;var b=document.compatMode;if((b||cDomObject.isIE)&&!cDomObject.isOpera){switch(b){case"CSS1Compat":a=document.documentElement.clientHeight;break;default:a=document.body.clientHeight}}else{a=self.innerHeight}return a};cDomObject.getViewportWidth=function(){var a=-1;var b=document.compatMode;if(b||cDomObject.isIE){switch(b){case"CSS1Compat":a=document.documentElement.clientWidth;break;default:a=document.body.clientWidth}}else{a=self.innerWidth}return a};cDomObject.getDocumentHeight=function(){var a=-1;switch(cDomObject.sDocMode){case"CSS1Compat":a=document.documentElement.scrollHeight;break;default:a=document.body.scrollHeight}return Math.max(a,cDomObject.getViewportHeight())};cDomObject.getDocumentWidth=function(){var a=-1;switch(cDomObject.sDocMode){case"CSS1Compat":a=document.documentElement.scrollWidth;break;default:a=document.body.scrollWidth}return Math.max(a,cDomObject.getViewportWidth())};cDomObject.hasClass=function(b,a){if(b.className.toLowerCase().indexOf(a.toLowerCase())>=0){return true}else{return false}};cDomObject.addNodeClass=function(d,a){a=a.replace(/^\s*|\s*$/g,"");var c=d.className;var e=c.split(" ");for(var b=0;b<e.length;b++){e[b]=e[b].replace(/^\s*|\s*$/g,"");if(e[b]==a){return}}e[b]=a;c=e.join(" ");d.className=c};cDomObject.removeNodeClass=function(d,a){a=a.replace(/^\s*|\s*$/g,"");var c=d.className;var e=c.split(" ");for(var b=0;b<e.length;b++){e[b]=e[b].replace(/^\s*|\s*$/g,"");if(e[b]==a){delete (e[b])}}c=e.join(" ");d.className=c};cDomObject.getNodeClasses=function(d,a){a=a.replace(/^\s*|\s*$/g,"");var c=d.className;var e=c.split(" ");if(typeof e!="object"){aClasNames=[c]}for(var b=0;b<e.length;b++){e[b]=e[b].replace(/^\s*|\s*$/g,"");if(e[b].indexOf(a)<0){delete (e[b])}}return e.join(" ").replace(/^\s*|\s*$/g,"").split(" ")};cDomObject.setOpacity=function(a,b){var d=cDomObject.$(a);if(d){try{if(d.filters&&d.filters.alpha){d.filters.alpha.opacity=b}else{if(typeof d.style.opacity!="undefined"){d.style.opacity=b/100}else{if(typeof d.style.MozOpacity!="undefined"){d.style.MozOpacity=b/100}}}}catch(c){return}}};cDomObject.Borders={l:"borderLeftWidth",r:"borderRightWidth",t:"borderTopWidth",b:"borderBottomWidth"};cDomObject.getBorderWidth=function(c,d){var b=0;for(var a in cDomObject.Borders){if(d.indexOf(a)>=0){b+=cDomObject.getStyleValue(c,cDomObject.Borders[a])}}return b};cDomObject.Paddings={l:"paddingLeft",r:"paddingRight",t:"paddingTop",b:"paddingBottom"};cDomObject.getPaddingWidth=function(d,c){var b=0;for(var a in cDomObject.Paddings){if(c.indexOf(a)>=0){b+=cDomObject.getStyleValue(d,cDomObject.Paddings[a])}}return b}};String.prototype.trim=function(){var a=this.toString();return a.replace(/^\s*|\s*$/g,"")};cJSExtend={};cJSExtend.extend=function(c,b){function a(){}a.prototype=c.prototype;b.prototype=new a();b.prototype.constructor=b;b.baseConstructor=c;b.baseClass=c.prototype};cDMX={};cDMX.util=function(){var b="DMXID_";var a=0;dmxUtil={getUniqueId:function(){return b+Math.round(Math.random()*10000)+(a++)},toCamelCase:function(e){e=e.replace(/[\-\.]/g," ");var c=e.split(" ");for(var d=0;d<c.length;d++){c[d].replace(/^\s+|\s+$/,"");if(d>0){c[d]=c[d].charAt(0).toUpperCase()+c[d].substr(1)}}return c.join("")},isUndefined:function(c){if(typeof c=="undefined"){return true}else{return false}}};return dmxUtil}();cDMX.delayedTask=function(c,b,a){var d=null;this.delay=function(e){if(d){window.clearTimeout(d)}d=window.setTimeout(function(){c.call(b,a)},e);return this};this.cancel=function(){if(d){window.clearTimeout(d);d=null}}};cDMX.media=function(){dmxMedia={createContentEnvelope:function(f,d,c){var h="";var a='width="'+d+'" height="'+c+'"';if(f.match(/(gif|jpg|jpeg|png)$/i)){h='<img src="'+f+'" '+a+" />"}else{if(f.match(/\.swf/)){var e=f.match(/\.swf\??(.*)$/i);var g="";var b="";if(e.length==2){b='flashvars="'+e[1]+'"';g='<param name="flashvars" value="'+e[1]+'"/> '}h='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" '+a+'> <param name="movie" value="'+f+'"/> <param name="quality" value="high"/> <param name="wmode" value="transparent"/> '+g+'<embed wmode="transparent" src="'+f+'"  '+a+" "+b+"></embed> </object>"}else{if(f.match(/mov$/)){h='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" codebase="http://www.apple.com/qtactivex/qtplugin.cab" '+a+'> <param name="src" value="'+f+'"> <param name="autoplay" value="true"> <param name="controller" value="true"> <param name="loop" value="true"> <embed src="'+f+'" autoplay="true" controller="true" loop="true" pluginspage="http://www.apple.com/quicktime/download/" '+a+"> </embed> </oject> "}else{if(f.match(/wmv$/)){h='<object id="MediaPlayer" '+a+' classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player ..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" '+a+'> <param name="filename" value="'+f+'"> <param name="Showcontrols" value="True"> <param name="autoStart" value="True"> <embed type="application/x-mplayer2" src="'+f+'" name="MediaPlayer" '+a+"></embed> </object> "}else{h="<span> "+f+'"> </span>'}}}}return h},calculateContentSize:function(){}};return dmxMedia}();cDragable=function(a){a=cDomObject.$(a);if(!a.id){a.id=cDragable.CS_ID+(cDragable.CN_COUNT++)}if(!cDomObject.hasClass(a,"dragableElement")){cDomObject.addNodeClass(a,"dragableElement")}a.setAttribute("unselectable","on");this.sId=a.id;this.bDraging=false;this.bResizing=false;this.bResizable=false;this.bWireframe=false;if(cDomObject.hasClass(a,"elementResizable")){this.bResizable=true}if(cDomObject.hasClass(a,"elementDragWireframe")){this.bWireframe=true}this.initEventHandlers()};cDragable.CS_ID="draggable";cDragable.CS_WIREFRAME_ID="draggable_wireframe";cDragable.CS_WIREFRAME_CLASS="dmxWireframeWindow";cDragable.CN_COUNT=0;cDragable.nZIndex=50000;cDragable.CA_MIN_CONSTRAINTS=[100,100];cDragable.CA_DEFAULT_SIZE=[600,520];cDragable.CA_DEFAULT_POSITION=["center","center"];cDragable.hPagePos={x:0,y:0};cDragable.dragQueue={};cDragable.dragQueue.nCount=0;cDragable.sWireframeId="";cDragable.prototype.initEventHandlers=function(a){var c=document.getElementById(this.sId);var b=this;if(typeof a=="undefined"){a=false}if(c.addEventListener&&!a){c.addEventListener("mousedown",function(d){b.onMouseDown(d)},false);c.addEventListener("mouseup",function(d){b.onMouseUp(d)},false);c.addEventListener("selectstart",function(d){b.onSelectStart(d)},false)}else{if(c.attachEvent){c.attachEvent("onmousedown",function(){var d=window.event;b.onMouseDown(d)});c.attachEvent("onmouseup",function(){var d=window.event;b.onMouseUp(d)});c.attachEvent("onselectstart",function(){var d=window.event;b.onSelectStart(d)});c.attachEvent("ondragstart",function(){return false})}}};cDragable.prototype.onMouseDown=function(h){var d=document.getElementById(this.sId);var b=h.srcElement||h.originalTarget;if(d.getAttribute("draghandle")){if(b.className!="resizeHandle"){if(!b.id||(b.id&&d.getAttribute("draghandle").indexOf(b.id)<0)){return}}}this.bDraging=true;var a=cDomObject.getStyleValue(d,"zIndex");if(a==null){a=cDragable.nZIndex++}else{a++}d.style.zIndex=a;if(b.className=="resizeHandle"){this.bResizing=true}else{this.bResizing=false}var g={x:0,y:0};g.x=h.layerX||h.offsetX;g.y=h.layerY||h.offsetY;var f={x:0,y:0};if(h.pageX||h.pageY){f.x=h.pageX;f.y=h.pageY}else{if(h.clientX||h.clientY){f.x=h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f.y=h.clientY+document.body.scrollTop+document.documentElement.scrollTop}}cDragable.hPagePos=f;cDragable.registerDragable(this);if(this.bWireframe){var c=document.getElementById(cDragable.CS_WIREFRAME_ID);cDomObject.setStyle(c,"left",cDomObject.getLeft(d)+"px");cDomObject.setStyle(c,"top",cDomObject.getTop(d)+"px");cDomObject.setStyle(c,"width",cDomObject.getWidth(d)+"px");cDomObject.setStyle(c,"height",cDomObject.getHeight(d)+"px");cDomObject.setStyle(c,"visibility","visible")}if(typeof cDomObject!="undefined"){if(!this.bWireframe){cDomObject.addNodeClass(d,"dmxMoving");if(this.bResizing){cDomObject.addNodeClass(d,"dmxResizing")}}}};cDragable.prototype.onMouseUp=function(a){cDragable.onMouseUp(a)};cDragable.prototype.onSelectStart=function(a){a.cancelBubble=true;a.returnValue=false;return false};cDragable.prototype.move=function(b,a){var d={x:0,y:0};var c=true;if(this.bWireframe){d.x=cDomObject.getLeft(cDragable.CS_WIREFRAME_ID);d.y=cDomObject.getTop(cDragable.CS_WIREFRAME_ID)}else{d.x=cDomObject.getLeft(this.sId);d.y=cDomObject.getTop(this.sId)}var g=document.getElementById(this.sId);if(this.bWireframe){var f=document.getElementById(cDragable.CS_WIREFRAME_ID);cDomObject.setStyle(f,"left",(d.x+b)+"px");if(d.y+a<0){c=false}else{cDomObject.setStyle(f,"top",(d.y+a)+"px")}}else{g.style.left=(d.x+b)+"px";if(d.y+a<0){c=false}else{g.style.top=(d.y+a)+"px"}}var e=[true,c];return e};cDragable.prototype.resize=function(c,b){var g=[true,true];var h={w:0,h:0};if(this.bWireframe){h.w=cDomObject.getWidth(cDragable.CS_WIREFRAME_ID);h.h=cDomObject.getHeight(cDragable.CS_WIREFRAME_ID)}else{h.w=cDomObject.getWidth(this.sId);h.h=cDomObject.getHeight(this.sId)}var f=document.getElementById(this.sId);var a=h.w+c;var d=h.h+b;if(a<cDragable.CA_MIN_CONSTRAINTS[0]){g[0]=false}else{if(this.bWireframe){var e=document.getElementById(cDragable.CS_WIREFRAME_ID);cDomObject.setStyle(e,"width",(h.w+c)+"px")}else{f.style.width=(h.w+c)+"px"}}if(d<cDragable.CA_MIN_CONSTRAINTS[1]){g[1]=false}else{if(this.bWireframe){var e=document.getElementById(cDragable.CS_WIREFRAME_ID);cDomObject.setStyle(e,"height",(h.h+b)+"px")}else{f.style.height=(h.h+b)+"px"}}if(f.ondragresize){f.ondragresize.call(this,this.sId)}return g};cDragable.prototype.stop=function(){var b=document.getElementById(this.sId);this.bDraging=false;this.bResizing=false;if(typeof cDomObject!="undefined"){cDomObject.removeNodeClass(b,"dmxMoving");cDomObject.removeNodeClass(b,"dmxResizing")}var b=document.getElementById(this.sId);if(this.bWireframe){var a=document.getElementById(cDragable.CS_WIREFRAME_ID);cDomObject.setStyle(b,"left",cDomObject.getLeft(a)+"px");cDomObject.setStyle(b,"top",cDomObject.getTop(a)+"px");cDomObject.setStyle(b,"width",cDomObject.getWidth(a)+"px");cDomObject.setStyle(b,"height",cDomObject.getHeight(a)+"px");if(b.ondragresize){b.ondragresize.call(this,this.sId)}cDomObject.setStyle(a,"visibility","hidden")}};cDragable.registerDragable=function(a){cDragable.dragQueue[a.sId]=a;cDragable.dragQueue.nCount++};cDragable.emptyQueue=function(b){for(var a in cDragable.dragQueue){if(typeof cDragable.dragQueue[a]=="object"){cDragable.dragQueue[a].stop();delete (cDragable.dragQueue[a]);cDragable.dragQueue.nCount--}}};cDragable.findResizing=function(){for(var a in cDragable.dragQueue){if(typeof cDragable.dragQueue[a]=="object"&&cDragable.dragQueue[a].bResizing){return cDragable.dragQueue[a]}}};cDragable.onMouseMove=function(h){if(!h){h=window.event}var c=document.all?(h.srcElement.ownerDocument?h.srcElement.ownerDocument.parentWindow:h.srcElement.document.parentWindow):h.target.ownerDocument.defaultView;var b=document;if(c!=c.parent){}if(cDragable.dragQueue.nCount>0){pagepos={x:0,y:0};if(h.pageX||h.pageY){pagepos.x=h.pageX;pagepos.y=h.pageY}else{if(h.clientX||h.clientY){pagepos.x=h.clientX+b.body.scrollLeft+b.documentElement.scrollLeft;pagepos.y=h.clientY+b.body.scrollTop+b.documentElement.scrollTop;if(c!=c.parent){pagepos.x+=cDomObject.getLeft(c.frameElement.parentNode);pagepos.y+=cDomObject.getTop(c.frameElement.parentNode)}}}var d=pagepos.x-cDragable.hPagePos.x;var a=pagepos.y-cDragable.hPagePos.y;var g=[false,false];for(var f in cDragable.dragQueue){if(typeof cDragable.dragQueue[f]=="object"){if(!cDragable.dragQueue[f].bResizing){g=cDragable.dragQueue[f].move(d,a)}else{g=cDragable.dragQueue[f].resize(d,a)}}}if(g[0]){cDragable.hPagePos.x=pagepos.x}if(g[1]){cDragable.hPagePos.y=pagepos.y}}};cDragable.onMouseUp=function(a){if(!a){a=window.event}cDragable.emptyQueue()};cDragable.init=function(){if(document.addEventListener){document.addEventListener("mousemove",cDragable.onMouseMove,false);document.addEventListener("mouseup",cDragable.onMouseUp,false)}else{if(document.attachEvent){document.attachEvent("onmousemove",cDragable.onMouseMove);document.attachEvent("onmouseup",cDragable.onMouseUp)}}cDragable.sWireframeId=cDragable.CS_WIREFRAME_ID;var a=document.createElement("div");a.id=cDragable.sWireframeId;cDomObject.addNodeClass(a,cDragable.CS_WIREFRAME_CLASS);document.body.appendChild(a)};if(window.addEventListener){window.addEventListener("load",cDragable.init,false)}else{if(document.attachEvent){window.attachEvent("onload",cDragable.init)}};cDMXPopupWindow=function(){var f=50000;var k=0;var a="dmxWindowOverlay";var j=250;var d=22;var c=/\.(gif|jpg|jpeg|png|swf|mov|wmv)/i;var b=/\.(gif|jpg|jpeg|png)/i;var h=function(m,l){this.sId=m;this.hAttr=l};var i=function(l){return l+"ContentFrame"};var g=function(l){return l+"Content"};var e=function(l){return l+"Content"};return{createOverlay:function(m){var l=a;var o=document.getElementById(l);if(!o){o=document.createElement("div");o.id=l;document.body.appendChild(o)}if(cDomObject.isIE&&!cDomObject.isIE7){o.style.width=cDomObject.getDocumentWidth()+16+"px"}else{o.style.width=cDomObject.getDocumentWidth()+"px"}o.style.height=cDomObject.getDocumentHeight()+"px";if(cDomObject.isIE&&!cDomObject.isIE7){k=o.pageYOffset?o.pageYOffset:document.documentElement?document.documentElement.scrollTop:document.body?document.body.scrollTop:0;window.scrollTo(0,0);var n=document.getElementsByTagName("body")[0];n.style.height="100%";n.style.width="100%";n.style.overflow="hidden";var p=document.getElementsByTagName("html")[0];p.style.height="100%";p.style.width="100%";p.style.overflow="hidden"}o.style.display="block";cDomObject.setStyle(o,"opacity",m)},removeOverlay:function(){var l=a;if(document.getElementById(l)){document.getElementById(l).style.display="none";if(cDomObject.isIE){if(cDomObject.isIE&&!cDomObject.isIE7){window.scrollTo(0,k);k=0}var m=document.getElementsByTagName("body")[0];m.style.height="auto";m.style.width="auto";m.style.overflow="auto";var n=document.getElementsByTagName("html")[0];n.style.height="auto";n.style.overflow="auto"}}},resizeOverlay:function(){var l=a;var m=document.getElementById(l);if(!m){return}if(cDomObject.isIE&&!cDomObject.isIE7){m.style.width=cDomObject.getViewportWidth()+16+"px"}else{m.style.width=cDomObject.getViewportWidth()+"px"}m.style.height=cDomObject.getViewportHeight()+"px"},resizeTo:function(m,l,n){l-=cDomObject.getBorderWidth(m,"lr");n-=cDomObject.getBorderWidth(m,"tb");var o=new cMoEffects.cResizer(m,null,null,l,n,cMoEffects.cResizer.CN_RESIZE_GLIDE,{nSteps:8,nDuration:j,onFinish:function(){cDMXPopupWindow.onResize(m)}})},moveTo:function(l,o,n){var m=new cMoEffects.cMover(l,null,null,o,n,cMoEffects.cResizer.CN_RESIZE_GLIDE,true,{nSteps:8,nDuration:j})},onResize:function(o){var n=document.getElementById(o);var m=document.getElementById(o+"ContentFrame");var p=document.getElementById(o+"Content");var q=document.getElementById(o+"FrameHolder");var l=n.getElementsByTagName("h2")[0];if(q){q.style.height=cDomObject.getHeight(n)-l.offsetHeight+"px"}if(m){m.style.height=cDomObject.getHeight(q)+"px"}},postCreateInit:function(l,t){var n=document.getElementById(l);var s=document.getElementById(l+"ContentFrame");var r=document.getElementById(l+"FrameHolder");var p=n.getElementsByTagName("h2")[0];p.innerHTML=t.sTitle;if(r){r.style.height=cDomObject.getHeight(n)-p.offsetHeight+"px"}var o=document.getElementById(l+"Clear");if(o){var m=o.contentWindow.document;if(m.attachEvent){m.attachEvent("onmousemove",cDragable.onMouseMove);m.attachEvent("onmouseup",cDragable.onMouseUp)}}if(t.bDragable||t.bResizable){if(!t.bDragable){n.setAttribute("draghandle","Title0x00"+n.id)}else{n.setAttribute("draghandle",n.id+"Title")}var q=new cDragable(n)}if(t.hGallery){t.hGallery.startSlideshow()}},createContent:function(t,l){if(l==undefined){l=false}if(l){this.removeContent(t)}var p=cDomObject.$(t.hIDList.winId);var q=cDomObject.$(e(t.hIDList.winId));var s=cDomObject.$(i(t.hIDList.winId));if(!t.bIFrame){if(typeof t.sContent=="string"){var n=document.getElementById(t.sContent);var r=cDomObject.getWidth(q);var o=cDomObject.getHeight(p)-cDomObject.getBorderWidth(p,"tb")-cDomObject.getBorderWidth(q,"tb")-p.getElementsByTagName("h2")[0].offsetHeight;q.style.height=o+"px";if(n){q.innerHTML=n.innerHTML}else{if(t.sContent.match(c)){q.innerHTML=cDMX.media.createContentEnvelope(t.sContent,r,o);if(t.sContent.match(b)){cDomObject.addNodeClass(q.parentNode,"dmxNoProtect")}}else{q.innerHTML=t.sContent}}}else{cDomObject.addNodeClass(p,"dmxGallery");var m=new cDMXSlideshow(q);m.init(t.sContent,200);t.hGallery=m;m.onLoaded=function(){if(this.aDim){var y=this.aDim}this.aDim=m.getCurrentDimensions();if(y!=null){var w=y[0]-this.aDim[0];var v=y[1]-this.aDim[1];cDMXPopupWindow.moveTo(p.id,Math.floor(w/2),Math.floor(v/2))}var x=this.aDim[0]+cDomObject.getBorderWidth(q,"lr")+cDomObject.getBorderWidth(p,"lr");var u=this.aDim[1]+cDomObject.getBorderWidth(q,"tb")+cDomObject.getBorderWidth(p,"tb")+p.getElementsByTagName("h2")[0].offsetHeight;cDMXPopupWindow.resizeTo(p.id,x,u);q.style.width=this.aDim[0]+cDomObject.getBorderWidth(q,"lr")+"px";q.style.height=this.aDim[1]+cDomObject.getBorderWidth(q,"tb")+"px"}}}else{if(t.bIFrame){if(s){s.src=t.sURL}}}},removeContent:function(n){var l=cDomObject.$(n.hIDList.winId);var o=cDomObject.$(n.hIDList.contentId);var m=cDomObject.$(n.hIDList.iFrameId);if(o){o.innerHTML=""}},buildWindow:function(t){var m=new cAPWAttributes(t);var A;if(m.nOpenDelay>0){t.nOpenDelay=0;window.setTimeout(function(){cDMXPopupWindow.buildWindow(t)},m.nOpenDelay)}var p=m.sPopupName.replace("&nbsp;","");var x="dmxPopup"+cDMX.util.toCamelCase(p);if(m.bOverlay){cDMXPopupWindow.createOverlay(m.nOverlayOpacity);cDomEvent.addEvent(window,"resize",function(){cDMXPopupWindow.resizeOverlay()});var w=document.getElementById(a);w.onclick=function(N){if(!N){N=window.event}window.setTimeout(function(){cDMXPopupWindow.closeWindow(l.id)},10);N.cancelBubble=true;N.returnValue=false;return false}}var l=document.getElementById(x);var M=l!=null;var r=document.getElementById(x+"Content");if(!l){l=document.createElement("div");l.className="dmxWindow";l.id=x}else{}m.hIDList.winId=x;if(!cDomObject.hasClass(l,m.sClass)){cDomObject.addNodeClass(l,m.sClass)}l.style.zIndex=f++;l.style.width=m.aSize[0]+"px";l.style.height=m.aSize[1]+"px";var D=cDomObject.getViewportWidth();var H=cDomObject.getViewportHeight();var B=cDomObject.getScrollLeft();var u=cDomObject.getScrollTop();var E=m.aSize[0];var J=m.aSize[1];var v,s;switch(m.aPosition[0]){case"left":v=B;break;case"center":v=Math.round((D-m.aSize[0])/2)+B;break;case"right":v=B+D-m.aSize[0];break;default:v=parseInt(m.aSize[0])!=Math.NaN?parseInt(m.aSize[0]):B;break}switch(m.aPosition[1]){case"top":s=u;break;case"center":s=Math.round((H-m.aSize[1])/2)+u;break;case"bottom":s=u+H-m.aSize[1];break;default:s=parseInt(m.aSize[1])!=Math.NaN?parseInt(m.aSize[1]):u;break}if(!M){if(cDomObject.isIE&&!cDomObject.isIE7){var G=document.createElement("iframe");G.id=x+"Clear";G.className="clear";G.frameBorder=0;l.appendChild(G)}var L=document.createElement("h2");L.id=x+"Title";L.innerHTML=m.sTitle;l.appendChild(L);if(m.bClosable){var K=document.createElement("a");K.href="javascript:false;";K.className="closeHandle";K.onclick=function(N){if(!N){N=window.event}window.setTimeout(function(){cDMXPopupWindow.closeWindow(l.id)},10);N.cancelBubble=true;N.returnValue=false;return false};l.appendChild(K)}var z=document.createElement("div");z.id=x+"FrameHolder";z.className="frameHolder";cDomObject.setStyle(z,"background-color",m.sContentBgColor);if(m.bIFrame){var C=document.createElement("iframe");C.id=i(x);C.className="content";z.appendChild(C);cDomObject.addNodeClass(z,"dmxIFrame")}else{r=document.createElement("div");r.id=e(x);m.hIDList.contentId=r.id;r.className="content";z.appendChild(r)}l.appendChild(z);if(m.bResizable){cDomObject.addNodeClass(l,"elementResizable");var y=document.createElement("div");y.className="resizeHandle";y.onclick=function(N){if(!N){N=window.event}N.cancelBubble=true;N.returnValue=false;return false};y.onselectstart=function(N){if(!N){N=window.event}if(N.preventDefault){N.preventDefault()}N.cancelBubble=true;N.returnValue=false;return false};y.onmousedown=function(N){if(!N){N=window.event}if(N.preventDefault){N.preventDefault()}N.returnValue=false;return false};l.appendChild(y);l.ondragresize=cDMXPopupWindow.onResize}if(m.bWireframe){cDomObject.addNodeClass(l,"elementDragWireframe")}document.body.appendChild(l)}this.createContent(m,M);var I;if(m.sStartPosition!=""){var n,o;switch(m.sStartPosition){case"SlideInTop":n=v;o=u-J;break;case"SlideInTopLeft":n=B-E;o=u-J;break;case"SlideInTopRight":n=B+D+E;o=u-J;break;case"SlideInRight":n=B+D+E;o=s;break;case"SlideInBottom":n=v;o=u+H+J;break;case"SlideInBottomLeft":n=B-E;o=u+H+J;break;case"SlideInBottomRight":n=B+D+E;o=u+H+J;break;case"SlideInLeft":n=B-E;o=s;break}var F=cMoEffects.cMover.CN_MOVE_GLIDEFAST;switch(m.sStartShowEffect){case"Linear":F=cMoEffects.cMover.CN_MOVE_SLIDE;break;case"FastSlow":F=cMoEffects.cMover.CN_MOVE_GLIDE;break;case"SlowFase":F=cMoEffects.cMover.CN_MOVE_GLIDEFAST;break}l.style.top=o+"px";l.style.left=n+"px";var q=Math.floor(m.nStartDelay/1000*d);I=new cMoEffects.cMover(l.id,null,null,v,s,F,false,{nSteps:q,nDuration:m.nStartDelay})}else{s=s<0?0:s;l.style.left=v+"px";l.style.top=s+"px"}if(m.bFadeIn){cDomObject.setOpacity(l.id,0);I=new cMoEffects.cFade(l.id,0,100,{nSteps:12,nDuration:m.nStartDelay})}l.style.visibility="visible";if(m.nCloseDelay&&m.nCloseDelay>500){if(m.hCloseTimeout){window.clearTimeout(m.hCloseTimeout)}m.hCloseTimeout=window.setTimeout(function(){cDMXPopupWindow.closeWindow(l.id)},m.nCloseDelay)}if(l.dmxData){try{l.dmxData=null;delete l.dmxData}catch(I){}}l.dmxData=new h(l.id,m);window.setTimeout(function(){cDMXPopupWindow.postCreateInit(x,m)},1);return l},closeWindow:function(n){var q=document.getElementById(n);this.removeOverlay();if(q&&!q.bClosing){q.removeCounter=0;var x=false;if(q.dmxData.hAttr.hCloseTimeout){window.clearTimeout(q.dmxData.hAttr.hCloseTimeout)}var u;if(q.dmxData.hAttr.hGallery){q.dmxData.hAttr.hGallery.stopSlideshow()}if(q.dmxData.hAttr.sEndPosition!=""){var y=cDomObject.getViewportWidth();var s=cDomObject.getViewportHeight();var t=cDomObject.getScrollLeft();var p=cDomObject.getScrollTop();var v=q.offsetWidth;var r=q.offsetHeight;var o,w;switch(q.dmxData.hAttr.sEndPosition){case"SlideOutTop":o=null;w=p-r;break;case"SlideOutTopLeft":o=t-v;w=p-r;break;case"SlideOutTopRight":o=t+y+v;w=p-r;break;case"SlideOutRight":o=t+y+v;w=null;break;case"SlideOutBottom":o=null;w=p+s+r;break;case"SlideOutBottomLeft":o=t-v;w=p+s+r;break;case"SlideOutBottomRight":o=t+y+v;w=p+s+r;break;case"SlideOutLeft":o=t-v;w=null;break}var l=cMoEffects.cMover.CN_MOVE_GLIDEFAST;switch(q.dmxData.hAttr.sEndShowEffect){case"Linear":l=cMoEffects.cMover.CN_MOVE_SLIDE;break;case"FastSlow":l=cMoEffects.cMover.CN_MOVE_GLIDE;break;case"SlowFase":l=cMoEffects.cMover.CN_MOVE_GLIDEFAST;break}x=true;var m=Math.floor(q.dmxData.hAttr.nEndDelay/1000*d);u=new cMoEffects.cMover(q.id,null,null,o,w,l,false,{nSteps:m,nDuration:q.dmxData.hAttr.nEndDelay,onFinish:function(){window.setTimeout(function(){cDMXPopupWindow.removeWindow(q.id)},100)}})}if(q.dmxData.hAttr.bFadeOut){x=true;u=new cMoEffects.cFade(q.id,100,0,{nSteps:12,nDuration:q.dmxData.hAttr.nEndDelay,onFinish:function(){window.setTimeout(function(){cDMXPopupWindow.removeWindow(q.id)},100)}})}if(!x){q.style.visibility="hidden";this.removeWindow(q.id)}q.bClosing=true;return q}else{return false}},removeWindow:function(m){var l=document.getElementById(m);if(l){document.body.removeChild(l);l=null}}}}();cAttributes=function(b){for(var a in b){this[a]=b[a]}};cAPWAttributes=function(a){this.sTitle="";this.sPopupName="";this.sURL="";this.sContent="";this.bOverlay=false;this.bResizable=true;this.bClosable=true;this.sClass="dmxNova";this.nOpacity=0.4;this.nOverlayOpacity=0.3;this.nOpenDelay=0;this.nCloseDelay=0;this.aSize=cDragable.CA_DEFAULT_SIZE;this.aPosition=cDragable.CA_DEFAULT_POSITION;this.sStartPosition="";this.sStartShowEffect="Linear";this.nStartDelay=1;this.bFadeIn=false;this.sEndPosition="";this.sEndShowEffect="Linear";this.nEndDelay=0.2;this.bFadeOut=false;this.bDragable=true;this.bIFrame=false;this.bResizable=false;this.bWireframe=false;this.bShadow=true;this.sContentBgColor="#ffffff";this.hIDList={};cAPWAttributes.baseConstructor.call(this,a);if(this.sTitle==""){this.sTitle="&nbsp;"}this.nOpenDelay*=1000;this.nCloseDelay*=1000;this.sStartPosition=this.sIncomingEffect?this.sIncomingEffect:this.sStartPosition;this.sStartShowEffect=this.sIncomingEffectEasing?this.sIncomingEffectEasing:this.sStartShowEffect;this.nStartDelay=this.nIncomingEffectDuration?this.nIncomingEffectDuration:this.nStartDelay;this.nStartDelay*=1000;this.sEndPosition=this.sOutgoingEffect?this.sOutgoingEffect:this.sEndPosition;this.sEndShowEffect=this.sOutgoingEffectEasing?this.sOutgoingEffectEasing:this.sEndShowEffect;this.nEndDelay=this.nOutgoingEffectDuration?this.nOutgoingEffectDuration:this.nEndDelay;this.nEndDelay*=1000;if(this.nOverlayOpacity>1){this.nOverlayOpacity=this.nOverlayOpacity/100}this.sPopupName=this.sPopupName||this.sTitle;if(typeof this.sURL=="object"){this.sContent=this.sURL;for(var b in this.sContent){this.sContent[b].nDelay*=1000;this.sContent[b].nWidth=new Number(this.sContent[b].nWidth);this.sContent[b].nHeight=new Number(this.sContent[b].nHeight)}this.aSize=[this.sContent[0].nWidth,this.sContent[0].nHeight];if(this.sContent.length==1){this.sContent[0].nDelay=0}this.bIFrame=false}else{if(typeof this.sURL=="string"){if(this.sURL.match(/\.(gif|jpg|jpeg|png|swf|mov|avi)/i)){this.sContent=this.sURL;this.bIFrame=false}else{this.bIFrame=true}}}this.bResizable=!cDMX.util.isUndefined(this.bResizable)?this.bResizable:!this.bIFrame};cJSExtend.extend(cAttributes,cAPWAttributes);cDMX.TestResources=function(){var a={};var b=null;var c=0;var e=0;var d={testCss:function(h,f){var g=document.createElement("div");g.id=cDMX.util.getUniqueId();document.body.appendChild(g);g.className=f;a[h]=g.id;e++;if(!b){b=new cDMX.delayedTask(cDMX.TestResources.check,window)}b.delay(500)},check:function(){for(var f in a){if(typeof f=="string"){var g=cDomObject.$(a[f]);if(g){if(g.offsetHeight&&g.offsetHeight>0){delete a[f]}else{c++}e--}else{c++}}}if(c>0){cDMX.TestResources.onFailure(cDMX.TestResources.generateListOfFailures())}},generateListOfFailures:function(){var g=[];for(var f in a){g[g.length]=f}return g.join(" ")}};return d}();cDMX.TestResources.onFailure=function(a){window.alert("The CSS files needed for Advanced Layer Popup are not found or are outdated.\nPlease make sure you have uploaded the file(s) your Styles folder to your server.\nThe following file(s) are missing or outdated: "+a)};cDomEvent.addEvent(window,"load",function(){cDMX.TestResources.testCss("dmxpopup.css","dmxPopupTest")});cDMXSlideshow=function(b,a){b=cDomObject.$(b);this.sContainerId=b.id;cDomObject.addNodeClass(b,"dmxGalleryContainer");this.nStartDelay=a||2000;this.aGallery=null;this.nPreviousPosition=0;this.nPosition=0;this.sBufferId=cDMX.util.getUniqueId();this.hTimeout=null;this.nCounter=0;this.onLoaded=function(){}};cDMXSlideshow.CN_FPS=20;cDMXSlideshow.CN_TRANSITION_DURATION=800;cDMXSlideshow.CN_SLIDE_DURATION=3000;cDMXSlideshow.prototype={init:function(b,a){if(typeof a=="undefined"){a=0}this.aGallery=b;this.nDelay=a;this.createSlides()},createSlides:function(){if(!this.aGallery||this.aGallery.length==0){return false}var d=cDomObject.$(this.sContainerId);var c=this.aGallery.length;for(var a=0;a<this.aGallery.length;a++){var b=document.createElement("div");b.id=this.sContainerId+"Slide"+(this.nCounter++);b.className="dmxGallerySlide";b.style.zIndex=c--;b.innerHTML=cDMX.media.createContentEnvelope(this.aGallery[a].src,this.aGallery[a].nWidth,this.aGallery[a].nHeight);d.appendChild(b)}},startSlideshow:function(){if(!this.aGallery||this.aGallery.length==0){return false}var a=this;this.nPosition=0;this.hTimeout=window.setTimeout(function(){a.nextSlide()},this.nStartDelay)},stopSlideshow:function(){window.clearTimeout(this.hTimeout)},nextSlide:function(){var g=cDomObject.$(this.sContainerId);if(g){var d=this;var f,e,c;var b=null;if(this.nPreviousPosition!=this.nPosition){b=g.childNodes[this.nPreviousPosition]}var a=g.childNodes[this.nPosition];cDomObject.setOpacity(a,0);a.style.visibility="visible";a.style.display="block";f=this.aGallery[this.nPosition].nDelay;if(!f){f=cDMXSlideshow.CN_SLIDE_DURATION}e=Math.round(cDMXSlideshow.CN_TRANSITION_DURATION/1000*cDMXSlideshow.CN_FPS);if(b){c=new cMoEffects.cFade(b,100,0,{nSteps:e,nDuration:cDMXSlideshow.CN_TRANSITION_DURATION,onFinish:function(){b.style.visibility="hidden";b.style.display="none"}})}if(a){c=new cMoEffects.cFade(a,0,100,{nSteps:e,nDuration:cDMXSlideshow.CN_TRANSITION_DURATION,onFinish:function(){d.onLoaded()}})}this.nPreviousPosition=this.nPosition;this.nPosition++;if(this.nPosition>=this.aGallery.length){this.nPosition=0}this.hTimeout=window.setTimeout(function(){d.nextSlide()},f)}},getCurrentDimensions:function(){return[this.aGallery[this.nPreviousPosition].nWidth,this.aGallery[this.nPreviousPosition].nHeight]}};var cMoEffects;if(!cMoEffects){cMoEffects={}}if(!cMoEffects.cEffect){cMoEffects.cEffect={}}if(!Function.prototype.andThen){Function.prototype.andThen=function(a){var b=this;return function(){b();a()}}}cMoEffects.isOpera=(navigator.userAgent.toLowerCase().indexOf("opera")>-1);cMoEffects.isIE=(window.ActiveXObject)&&!cMoEffects.isOpera;cMoEffects.isIE7=cMoEffects.isIE&&(navigator.userAgent.indexOf("msie 7")>=0);cMoEffects.easing={easeNone:function(e,a,g,f){return g*e/f+a},easeIn:function(e,a,g,f){return g*(e/=f)*e+a},easeOut:function(e,a,g,f){return -g*(e/=f)*(e-2)+a},easeBoth:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e+a}return -g/2*((--e)*(e-2)-1)+a},easeInStrong:function(e,a,g,f){return g*(e/=f)*e*e*e+a},easeOutStrong:function(e,a,g,f){return -g*((e=e/f-1)*e*e*e-1)+a},easeBothStrong:function(e,a,g,f){if((e/=f/2)<1){return g/2*e*e*e*e+a}return -g/2*((e-=2)*e*e*e-2)+a},elasticIn:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return -(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e},elasticOut:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j)==1){return e+k}if(!i){i=j*0.3}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}return f*Math.pow(2,-10*g)*Math.sin((g*j-h)*(2*Math.PI)/i)+k+e},elasticBoth:function(g,e,k,j,f,i){if(g==0){return e}if((g/=j/2)==2){return e+k}if(!i){i=j*(0.3*1.5)}if(!f||f<Math.abs(k)){f=k;var h=i/4}else{var h=i/(2*Math.PI)*Math.asin(k/f)}if(g<1){return -0.5*(f*Math.pow(2,10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i))+e}return f*Math.pow(2,-10*(g-=1))*Math.sin((g*j-h)*(2*Math.PI)/i)*0.5+k+e},backIn:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*(e/=g)*e*((f+1)*e-f)+a},backOut:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}return h*((e=e/g-1)*e*((f+1)*e+f)+1)+a},backBoth:function(e,a,h,g,f){if(typeof f=="undefined"){f=1.70158}if((e/=g/2)<1){return h/2*(e*e*(((f*=(1.525))+1)*e-f))+a}return h/2*((e-=2)*e*(((f*=(1.525))+1)*e+f)+2)+a},bounceIn:function(e,a,g,f){return g-cMoEffects.easing.bounceOut(f-e,0,g,f)+a},bounceOut:function(e,a,g,f){if((e/=f)<(1/2.75)){return g*(7.5625*e*e)+a}else{if(e<(2/2.75)){return g*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return g*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}}}return g*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a},bounceBoth:function(e,a,g,f){if(e<f/2){return cMoEffects.easing.bounceIn(e*2,0,g,f)*0.5+a}return cMoEffects.easing.bounceOut(e*2-f,0,g,f)*0.5+g*0.5+a}};cMoEffects.cEffect=function(a){this.hTimer=null;this.nCurrentStep=0;this.nInterval=0;this.hOptions={nSteps:10,nFPS:0,nDuration:500,onStart:function(){},onStop:function(){},onFinish:function(){}};this.setOptions(a);if(this.hOptions.nFPS>0){this.nInterval=Math.floor(1000/this.hOptions.nFPS);this.hOptions.nSteps=Math.round(this.nDuration/this.nInterval)+1}else{this.nInterval=Math.round(this.hOptions.nDuration/this.hOptions.nSteps)}this.hOptions.nInterval=this.nInterval;if(this.hOptions.easing==undefined){this.hOptions.easing=cMoEffects.easing.easeIn}return this};cMoEffects.cEffect.prototype.setOptions=function(a){for(var b in a){this.hOptions[b]=a[b]}};cMoEffects.cEffect.prototype.calculate=function(){};cMoEffects.cEffect.prototype.playAgain=function(){};cMoEffects.cEffect.prototype.start=function(){this.hOptions.onStart();this.play()};cMoEffects.cEffect.prototype.stop=function(){this.hOptions.onStop()};cMoEffects.cEffect.prototype.doFrame=function(){};cMoEffects.cEffect.prototype.play=function(){this.nCurrentStep++;this.doFrame();if(this.nCurrentStep<this.hOptions.nSteps-1){var a=this;window.setTimeout(function(){a.play()},this.nInterval)}else{(this.hOptions.onStop).andThen(this.hOptions.onFinish.call(this))}};cMoEffects.cFade=function(c,d,a,b){cMoEffects.cEffect.call(this,b);if(typeof c=="string"){c=document.getElementById(c)}this.sId=c.id;this.aOpacities=new Array();this.playAgain(d,a)};cMoEffects.cFade.prototype=new cMoEffects.cEffect();cMoEffects.cFade.prototype.constructor=cMoEffects.cFade;cMoEffects.cFade.prototype.calculate=function(){var b=this.nEndOpacity-this.nStartOpacity;for(var a=0;a<this.hOptions.nSteps-1;a++){this.aOpacities[a]=Math.round(this.hOptions.easing(a*this.hOptions.nInterval,this.nStartOpacity,b,this.hOptions.nDuration)*100)/100}this.aOpacities[a]=this.nEndOpacity};cMoEffects.cFade.prototype.playAgain=function(b,a){this.nStartOpacity=b;this.nEndOpacity=a;this.calculate();this.start()};cMoEffects.cFade.prototype.doFrame=function(){cMoEffects.cFade.setOpacity(this.sId,this.aOpacities[this.nCurrentStep])};cMoEffects.cFade.setOpacity=function(a,b){var d=document.getElementById(a);if(d){try{b=Math.floor(b);if(typeof d.style.opacity!="string"){if(cMoEffects.isIE&&!cMoEffects.isIE7){window.setTimeout(function(){d.style.filter="alpha(opacity="+parseFloat(b)+")"},1)}else{d.style.filter="alpha(opacity="+parseFloat(b)+")"}if(!d.currentStyle||!d.currentStyle.hasLayout){d.style.zoom=1}}else{b=b/100;d.style.opacity=b;try{d.style.MozOpacity=b}catch(c){}}}catch(c){return}}};cMoEffects.cColor=function(b,c,e,d,a){cMoEffects.cEffect.call(this,a);if(typeof b=="string"){b=document.getElementById(b)}this.sId=b.id;this.aColors=new Array();if(typeof(c)=="string"){c=cMoEffects.cColor.colorToNumber(c)}if(typeof(e)=="string"){e=cMoEffects.cColor.colorToNumber(e)}this.playAgain(c,e,d)};cMoEffects.cColor.prototype=new cMoEffects.cEffect();cMoEffects.cColor.prototype.constructor=cMoEffects.cColor;cMoEffects.cColor.prototype.calculate=function(){var f=Math.round((this.nStartColor-this.nEndColor))/this.hOptions.nSteps;var h=(this.nStartColor&16711680)>>>16;var a=(this.nStartColor&65280)>>>8;var c=(this.nStartColor&255);var l=(this.nEndColor&16711680)>>>16;var d=(this.nEndColor&65280)>>>8;var i=(this.nEndColor&255);var e=l-h;var k=d-a;var b=i-c;var j;for(var g=0;g<this.hOptions.nSteps-1;g++){j=this.hOptions.easing(g*this.hOptions.nInterval,h,e,this.hOptions.nDuration)<<16|this.hOptions.easing(g*this.hOptions.nInterval,a,k,this.hOptions.nDuration)<<8|this.hOptions.easing(g*this.hOptions.nInterval,c,b,this.hOptions.nDuration);this.aColors[g]=j}this.aColors[g]=this.nEndColor};cMoEffects.cColor.prototype.playAgain=function(a,c,b){this.bBGColor=b;this.nStartColor=a;this.nEndColor=c;this.calculate();this.start()};cMoEffects.cColor.prototype.doFrame=function(){if(!this.bBGColor){cMoEffects.cColor.setColor(this.sId,this.aColors[this.nCurrentStep])}else{cMoEffects.cColor.setBGColor(this.sId,this.aColors[this.nCurrentStep])}};cMoEffects.cColor.setColor=function(a,b){var c=document.getElementById(a);if(c){c.style.color=cMoEffects.cColor.numberToColor(b)}};cMoEffects.cColor.setBGColor=function(a,b){var c=document.getElementById(a);if(c){c.style.backgroundColor=cMoEffects.cColor.numberToColor(b)}};cMoEffects.cColor.colorToNumber=function(b){var a=/^#/;return parseInt("0x"+b.replace(a,""))};cMoEffects.cColor.numberToColor=function(a){a|=1<<24;return"#"+a.toString(16).substr(1)};cMoEffects.cResizer=function(d,g,f,b,e,a,c){if(c==undefined&&typeof a=="object"){c=a}cMoEffects.cEffect.call(this,c);if(typeof d=="string"){d=document.getElementById(d)}d.style.overflow="hidden";this.sId=d.id;this.aSizes=new Array();this.playAgain(g,f,b,e,a)};cMoEffects.cResizer.prototype=new cMoEffects.cEffect();cMoEffects.cResizer.prototype.constructor=cMoEffects.cResizer;cMoEffects.cResizer.prototype.calculate=function(){var d;while(d in this.aSizes){delete (this.aSizes[d])}var c;var b=this.nEndWidth-this.nStartWidth;var a=this.nEndHeight-this.nStartHeight;var f=this.nStartWidth;var e=this.nStartHeight;for(c=0;c<this.hOptions.nSteps-1;c++){this.aSizes[c]={w:this.hOptions.easing(c*this.hOptions.nInterval,f,b,this.hOptions.nDuration),h:this.hOptions.easing(c*this.hOptions.nInterval,e,a,this.hOptions.nDuration)}}this.aSizes[c]={w:this.nEndWidth,h:this.nEndHeight}};cMoEffects.cResizer.prototype.playAgain=function(f,e,c,d,b){var a=[cDomObject.getWidth(this.sId),cDomObject.getHeight(this.sId)];this.nStartWidth=f!=null?f:a[0];this.nStartHeight=e!=null?e:a[1];this.nEndWidth=c!=null?c:a[0];this.nEndHeight=d!=null?d:a[1];if(b){this.nType=b}this.calculate();this.start()};cMoEffects.cResizer.prototype.doFrame=function(){cMoEffects.cResizer.setSize(this.sId,this.aSizes[this.nCurrentStep])};cMoEffects.cResizer.setSize=function(a,d){var c=document.getElementById(a);try{c.style.width=d.w+"px";c.style.height=d.h+"px"}catch(b){}};cMoEffects.cMover=function(g,d,a,e,c,b,h,f){if(f==undefined&&typeof b=="object"){f=b}cMoEffects.cEffect.call(this,f);if(typeof g=="string"){g=document.getElementById(g)}this.sId=g.id;this.aPositions=new Array();this.playAgain(d,a,e,c,b,h)};cMoEffects.cMover.prototype=new cMoEffects.cEffect();cMoEffects.cMover.prototype.constructor=cMoEffects.cMover;cMoEffects.cMover.prototype.calculate=function(){var d;while(d in this.aPositions){delete (this.aPositions[d])}var c;var b=this.nEndX-this.nStartX;var a=this.nEndY-this.nStartY;var f=this.nStartX;var e=this.nStartY;for(c=0;c<this.hOptions.nSteps-1;c++){this.aPositions[c]={left:this.hOptions.easing(c*this.hOptions.nInterval,f,b,this.hOptions.nDuration),top:this.hOptions.easing(c*this.hOptions.nInterval,e,a,this.hOptions.nDuration)}}this.aPositions[c]={left:this.nEndX,top:this.nEndY}};cMoEffects.cMover.prototype.playAgain=function(d,a,e,c,b,g){if(g==null){g=false}var f=[cDomObject.getLeft(this.sId),cDomObject.getTop(this.sId)];this.nStartX=(d==null)?f[0]:d;this.nStartY=(a==null)?f[1]:a;if(g){this.nEndX=e!=null?this.nStartX+e:this.nStartX;this.nEndY=c!=null?this.nStartY+c:this.nStartY}else{this.nEndX=e!=null?e:this.nStartX;this.nEndY=c!=null?c:this.nStartY}if(b){this.nType=b}this.calculate();this.start()};cMoEffects.cMover.prototype.doFrame=function(){if(this.aPositions.length>this.nCurrentStep){cMoEffects.cMover.setPosition(this.sId,this.aPositions[this.nCurrentStep])}};cMoEffects.cMover.setPosition=function(a,c){var b=document.getElementById(a);if(b){b.style.left=c.left+"px";b.style.top=c.top+"px"}};
