var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof a=="string")a=document.getElementById(a);if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(a){this.removeClass(a);this.className+=" "+a};a.removeClass=function(d){for(var a=this.className.split(/\s+/),c=-1,b=0;b<a.length;b++)if(a[b]==d){c=b;b=a.length}if(c>-1){a.splice(c,1);this.className=a.join(" ")}return this};a.hasClass=function(a){return!!this.className.match(new RegExp("\\s*"+a+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];a&&a.receiveEvent(b,c)},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(a,c){var b={left:0,top:0,width:a.width?a.width:a.offsetWidth,height:a.height?a.height:a.offsetHeight};while(a&&a!=c){b.left+=a.offsetLeft;b.top+=a.offsetTop;a=a.offsetParent}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);a&&this.glue(a)}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(f,a,d){this.domElement=ZeroClipboard.$(f);var e=99;if(this.domElement.style.zIndex)e=parseInt(this.domElement.style.zIndex,10)+1;if(typeof a=="string")a=ZeroClipboard.$(a);else if(typeof a=="undefined")a=document.getElementsByTagName("body")[0];var c=ZeroClipboard.getDOMObjectPosition(this.domElement,a);this.div=document.createElement("div");var b=this.div.style;b.position="absolute";b.left=""+c.left+"px";b.top=""+c.top+"px";b.width=""+c.width+"px";b.height=""+c.height+"px";b.zIndex=e;if(typeof d=="object")for(addedStyle in d)b[addedStyle]=d[addedStyle];a.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(b,a){var c="",d="id="+this.id+"&width="+b+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+b+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+d+'"/><param name="wmode" value="transparent"/></object>'}else c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+b+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+d+'" wmode="transparent" />';return c},hide:function(){if(this.div)this.div.style.left="-2000px"},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(b){if(b){this.domElement=ZeroClipboard.$(b);!this.domElement&&this.hide()}if(this.domElement&&this.div){var c=ZeroClipboard.getDOMObjectPosition(this.domElement),a=this.div.style;a.left=""+c.left+"px";a.top=""+c.top+"px"}},setText:function(a){this.clipText=a;this.ready&&this.movie.setText(a)},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a])this.handlers[a]=[];this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;this.ready&&this.movie.setHandCursor(a)},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(b,c){b=b.toString().toLowerCase().replace(/^on/,"");switch(b){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var e=this;setTimeout(function(){e.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var e=this;setTimeout(function(){e.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");this.recoverActive&&this.domElement.addClass("active")}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":this.domElement&&this.cssEffects&&this.domElement.addClass("active");break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}}if(this.handlers[b])for(var d=0,f=this.handlers[b].length;d<f;d++){var a=this.handlers[b][d];if(typeof a=="function")a(this,c);else if(typeof a=="object"&&a.length==2)a[0][a[1]](this,c);else typeof a=="string"&&window[a](this,c)}}}
