var MooTools={version:'1.11'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}} if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';} if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}} return type;};function $merge(){var mix={};for(var i=0;i-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);} return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));} return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);} else args=options.arguments||arguments;var returns=function(){return fn.apply($pick(options.bind,fn),args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i';} el=document.createElement(el);} el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;} if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsByKevin=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i0&&fKey<13)this.key='f'+fKey;} this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;} this.fixRelatedTarget();} return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){if(type=='load'||type=='domready'){EventCenter.add(fn,'domready');return false;}this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;} if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;} return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;} return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);} return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);} return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');} return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsByKevin(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&¶m[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}} items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}} return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}} if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);} event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]el.left&&now.xel.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);} if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;} this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');$extend(this.headers,this.options.headers);for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send($pick(data,null));return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';} this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);} if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');} if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&');};Element.extend({send:function(options){return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(key,value,options){options=$merge(this.options,options);value=encodeURIComponent(value);if(options.domain)value+='; domain='+options.domain;if(options.path)value+='; path='+options.path;if(options.duration){var date=new Date();date.setTime(date.getTime()+options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();} if(options.secure)value+='; secure';document.cookie=key+'='+value;return $extend(options,{'key':key,'value':value});},get:function(key){var value=document.cookie.match('(?:^|;)\\s*'+key.escapeRegExp()+'=([^;]*)');return value?decodeURIComponent(value[1]):false;},remove:function(cookie,options){if($type(cookie)=='object')this.set(cookie.key,'',$merge(cookie,{duration:-1}));else this.set(cookie,'',$merge(options,{duration:-1}));}});var Json={toString:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';case'array':return'['+obj.map(Json.toString).join(',')+']';case'object':var string=[];for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));return'{'+string.join(',')+'}';case'number':if(isFinite(obj))break;case false:return'null';} return String(obj);},evaluate:function(str,secure){return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');}};Json.Remote=XHR.extend({initialize:function(url,options){this.url=url;this.addEvent('onSuccess',this.onComplete);this.parent(options);this.setHeader('X-Request','JSON');},send:function(obj){return this.parent(this.url,'json='+Json.toString(obj));},onComplete:function(){this.fireEvent('onComplete',[Json.evaluate(this.response.text,this.options.secure)]);}});var Asset=new Abstract({javascript:function(source,properties){properties=$merge({'onload':Class.empty},properties);var script=new Element('script',{'src':source}).addEvents({'load':properties.onload,'readystatechange':function(){if(this.readyState=='complete')this.fireEvent('load');}});delete properties.onload;return script.setProperties(properties).inject(document.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':Class.empty,'onabort':Class.empty,'onerror':Class.empty},properties);var image=new Image();image.src=source;var element=new Element('img',{'src':source});['load','abort','error'].each(function(type){var event=properties['on'+type];delete properties['on'+type];element.addEvent(type,function(){this.removeEvent(type,arguments.callee);event.call(this);});});if(image.width&&image.height)element.fireEvent('load',element,1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:Class.empty,onProgress:Class.empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter);counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Hash=new Class({length:0,initialize:function(object){this.obj=object||{};this.setLength();},get:function(key){return(this.hasKey(key))?this.obj[key]:null;},hasKey:function(key){return(key in this.obj);},set:function(key,value){if(!this.hasKey(key))this.length++;this.obj[key]=value;return this;},setLength:function(){this.length=0;for(var p in this.obj)this.length++;return this;},remove:function(key){if(this.hasKey(key)){delete this.obj[key];this.length--;} return this;},each:function(fn,bind){$each(this.obj,fn,bind);},extend:function(obj){$extend(this.obj,obj);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength();},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var keys=[];for(var property in this.obj)keys.push(property);return keys;},values:function(){var values=[];for(var property in this.obj)values.push(this.obj[property]);return values;}});function $H(obj){return new Hash(obj);};Hash.Cookie=Hash.extend({initialize:function(name,options){this.name=name;this.options=$extend({'autoSave':true},options||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;} var str=Json.toString(this.obj);if(str.length>4096)return false;Cookie.set(this.name,str,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength();}});Hash.Cookie.Methods={};['extend','set','merge','empty','remove'].each(function(method){Hash.Cookie.Methods[method]=function(){Hash.prototype[method].apply(this,arguments);if(this.options.autoSave)this.save();return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(color,type){type=type||(color.push?'rgb':'hex');var rgb,hsb;switch(type){case'rgb':rgb=color;hsb=rgb.rgbToHsb();break;case'hsb':rgb=color.hsbToRgb();hsb=color;break;default:rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();} rgb.hsb=hsb;rgb.hex=rgb.rgbToHex();return $extend(rgb,Color.prototype);},mix:function(){var colors=$A(arguments);var alpha=($type(colors[colors.length-1])=='number')?colors.pop():50;var rgb=this.copy();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};Array.extend({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;} return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}} return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.mousemover=([window,document].contains(element))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener('mousemove',this.coord);},stop:function(){this.mousemover.removeListener('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.element==window)?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var el=this.element.getSize();var pos=this.element.getPosition();var change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&el.scroll[z]!=0) change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(el.size[z]+pos[z])&&el.scroll[z]+el.size[z]!=el.scrollSize[z]) change[z]=(this.page[z]-el.size[z]+this.options.area-pos[z])*this.options.velocity;} if(change.y||change.x)this.fireEvent('onChange',[el.scroll.x+change.x,el.scroll.y+change.y]);}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(pos){this.knob.setStyle(this.p,pos);},mode:'horizontal',steps:100,offset:0},initialize:function(el,knob,options){this.element=$(el);this.knob=$(knob);this.setOptions(options);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bindWithEvent(this));var mod,offset;switch(this.options.mode){case'horizontal':this.z='x';this.p='left';mod={'x':'left','y':false};offset='offsetWidth';break;case'vertical':this.z='y';this.p='top';mod={'x':false,'y':'top'};offset='offsetHeight';} this.max=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.half=this.knob[offset]/2;this.getPos=this.element['get'+this.p.capitalize()].bind(this.element);this.knob.setStyle('position','relative').setStyle(this.p,-this.options.offset);var lim={};lim[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:lim,modifiers:mod,snap:0,onStart:function(){this.draggedKnob();}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize)this.options.initialize.call(this);},set:function(step){this.step=step.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent('onTick',this.toPosition(this.step));return this;},clickedElement:function(event){var position=event.page[this.z]-this.getPos()-this.half;position=position.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(position);this.checkStep();this.end();this.fireEvent('onTick',position);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('onChange',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('onComplete',this.step+'');}},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps);},toPosition:function(step){return this.max*step/this.options.steps;}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(options){this.parent(window,options);this.links=(this.options.links)?$$(this.options.links):$$(document.links);var location=window.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!window.webkit419)this.addEvent('onComplete',function(){window.location.hash=this.anchor;});},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(element,ghost){ghost.setStyle('opacity',0.7);element.setStyle('opacity',0.7);},onDragComplete:function(element,ghost){element.setStyle('opacity',1);ghost.remove();this.trash.remove();}},initialize:function(list,options){this.setOptions(options);this.list=$(list);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={'start':[],'moveGhost':this.moveGhost.bindWithEvent(this)};for(var i=0,l=this.handles.length;i0);var prev=this.active.getPrevious();var next=this.active.getNext();if(prev&&up&&nownext.getCoordinates().top)this.active.injectAfter(next);this.previous=now;},serialize:function(converter){return this.list.getChildren().map(converter||function(el){return this.elements.indexOf(el);},this);},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);} this.fireEvent('onComplete',this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},maxTitleChars:30,showDelay:100,hideDelay:100,className:'tool',offsets:{'x':16,'y':16},fixed:false},initialize:function(elements,options){this.setOptions(options);this.toolTip=new Element('div',{'class':this.options.className+'-tip','styles':{'position':'absolute','top':'0','left':'0','visibility':'hidden'}}).inject(document.body);this.wrapper=new Element('div').inject(this.toolTip);$$(elements).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this);},build:function(el){el.$tmp.myTitle=(el.href&&el.getTag()=='a')?el.href.replace('http://',''):(el.rel||false);if(el.title){var dual=el.title.split('::');if(dual.length>1){el.$tmp.myTitle=dual[0].trim();el.$tmp.myText=dual[1].trim();}else{el.$tmp.myText=el.title;} el.removeAttribute('title');}else{el.$tmp.myText=false;} if(el.$tmp.myTitle&&el.$tmp.myTitle.length>this.options.maxTitleChars)el.$tmp.myTitle=el.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"…";el.addEvent('mouseenter',function(event){this.start(el);if(!this.options.fixed)this.locate(event);else this.position(el);}.bind(this));if(!this.options.fixed)el.addEvent('mousemove',this.locate.bindWithEvent(this));var end=this.end.bind(this);el.addEvent('mouseleave',end);el.addEvent('trash',end);},start:function(el){this.wrapper.empty();if(el.$tmp.myTitle){this.title=new Element('span').inject(new Element('div',{'class':this.options.className+'-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);} if(el.$tmp.myText){this.text=new Element('span').inject(new Element('div',{'class':this.options.className+'-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);} $clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},position:function(element){var pos=element.getPosition();this.toolTip.setStyles({'left':pos.x+this.options.offsets.x,'top':pos.y+this.options.offsets.y});},locate:function(event){var win={'x':window.getWidth(),'y':window.getHeight()};var scroll={'x':window.getScrollLeft(),'y':window.getScrollTop()};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var prop={'x':'left','y':'top'};for(var z in prop){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>win[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.toolTip.setStyle(prop[z],pos);};},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent('onShow',[this.toolTip]);},hide:function(){this.fireEvent('onHide',[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});window.ff=navigator.userAgent.search("Firefox")>=0;window.ff3=navigator.userAgent.search("Firefox/3")>=0;Sortables=Sortables.extend({initialize:function(list,options){this.parent(list,options);this.last_state=this.serialize_string();},moveGhost:function(event){var value=event.page.y-this.offset;value=value.limit(this.coordinates.top,this.coordinates.bottom);this.ghost.setStyle('top',value);event.stop();},serialize_string:function(){var serial='';this.list.getChildren().each(function(el,i){serial+=el.id+',';},this);return serial;},serialize:function(){var serial=[];this.list.getChildren().each(function(el,i){serial[serial.length]=el.id;},this);return serial;},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);} this.cur_state=this.serialize_string();if(this.last_state!=this.cur_state&&this.last_state!=''){this.last_state=this.cur_state;this.fireEvent('onComplete',this.active);}}});Element.extend({toggle:function(){if(this.getStyle('display')!='none')this.setStyle('display','none');else this.setStyle('display','');},lift:function(){this.toggle();},toggleVis:function(){if(this.getStyle('visibility')!='hidden')this.setStyle('visibility','hidden');else this.setStyle('visibility','visible');},hide:function(){this.setStyle('display','none');},show:function(){this.setStyle('display','');},moveToBottom:function(){var w=this.clone();this.remove();$(document.body).adopt(w);},disable:function(txt){if(this.type=='button'||this.type=='submit'){this.addClass('grey_button');if(txt)this.value=txt;this.disabled=true;this.blur();return;} $$('#'+this.id+' select, #'+this.id+' input').setProperty('disabled',true);if(!window.ie){this.setStyle('position','relative');if(!$(this.id+'_disable')){var coords=this.getSize();this.adopt(new Element('div',{'id':this.id+'_disable','styles':{'background-color':'#fff','width':coords.size.x,'height':coords.size.y,'top':'0','left':'0','position':'absolute','opacity':0.7}}));}}else{this.addClass('grey_out');if(txt)this.value=txt;}},enable:function(txt){if(this.type=='button'||this.type=='submit'){this.disabled=false;this.removeClass('grey_button');if(txt)this.value=txt;return;} $$('#'+this.id+' select, #'+this.id+' input').setProperty('disabled',false);if(!window.ie){this.setStyle('position','');if($(this.id+'_disable')){$(this.id+'_disable').remove();}}else{this.removeClass('grey_out');}},setWidth:function(w){this.setStyle('width',w+'px');},getWidth:function(){return this.getStyle('width').toInt();},setHeight:function(h){this.setStyle('height',h+'px');},getHeight:function(){return this.getStyle('height').toInt();},setTop:function(t){this.setStyle('top',t+'px');},setLeft:function(l){this.setStyle('left',l+'px');}});Fx.Slide.implement({getStatus:function(){return this.wrapper.offsetHeight==0||this.wrapper.offsetWidth==0;}});var EventCenterClass=new Class({options:{onLoad:Class.empty},initialize:function(){this.types=['global'];this.calls=[];this.calls[0]=[];},add:function(fn,type){if(!type){type='global';} var index=this.types.indexOf(type) if(index<0){index=this.types.length;this.types[index]=type;this.calls[index]=[];} if($type(fn)=='function'){this.calls[index][this.calls[index].length]=fn;}},fire:function(type){if(!type){type='global';} var index=this.types.indexOf(type);if(index>=0){for(var i=0;i0));this.fireEvent(hide?'onBackground':'onActive',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);},showThisHideOpen:function(index){return this.display(index);}});Fx.Accordion=Accordion;function helpWindowPopup(id) {var url='/faq/media:'+id;$('lightbox').innerHTML="
Loading
";var top=window.getScrollTop()+50;showLightbox(url,1000,top,221,250);} function handleSelect(result){$('faq_'+result.topic_id+'_entries').setStyle('display','') window.scrollTo(0,$('subtopic_'+result.id).getPosition().y);} function faqJump(faq) {document.location=faq.link;} function toggle_topics(display) {topics=$('content_holder').getElements('ul[class=entries]');topics.each(function(topic){topic.setStyle('display',display);});$('open_topics').toggle();$('close_topics').toggle();} function question_select(id) {$('question_number').value=id;val=$(id).innerHTML;$('input_subject').value=val;$('subject').setHTML(val);if(id!='question_10'){for(j=1;j<10;j++) $('question_'+j+'_solutions').hide();$('solutions').show();$(id+'_solutions').show();$('part_three').hide();$('question_container').show();$('question_container_sent').hide();$('input_subject').hide();$('subject').show();} else{$('solutions').hide();$('part_three').show();$('subject').hide();$('input_subject').show();$('input_subject').value='';}} function send_question() {if($('ticket_body').value){$('ticket_submit_button').disable('Sending...');refresh_page({url:'/ajax/help/send_question',jdata:{version:getVersionInfo()},form:'contact_question',onComplete:function(){$('question_container').hide();$('question_container_sent').show();$('ticket_body').value='';$('ticket_url').value='';$('ticket_submit_button').enable('Send');}});}else{alert('You need to describe your problem!');}} var Forage=new Class({options:{initial_pool:{results:[]},initial_bucket:{results:[]},container:'',everyone:false,search_everyone:true,show_finish:true,show_clear:true,add_email:false,bucket_action:{text:'',callback:Class.empty},onComplete:Class.empty,onAdd:Class.empty,onRemove:Class.empty,loggedIn:false,delay_image_load:false},initialize:function(options){this.setOptions(options);this.el_container=$(this.options.container);this.el_left=$E('.forage_left',this.el_container);this.el_right=$E('.forage_right',this.el_container);this.el_search_input=$E('.forage_search_input',this.el_container);this.el_search_clear_btn=$E('.forage_input_clear',this.el_container);this.el_bucket=$E('.forage_bucket',this.el_container);this.el_pool=$E('.forage_pool',this.el_container);this.el_buttonhole=$E('.forage_buttonhole',this.el_container);this.el_bucket_clear_btn=$E('.forage_bucket_clear',this.el_container);this.el_bucket_finish_btn=$E('.forage_bucket_finish',this.el_container);this.el_message=$E('.forage_message',this.el_container);this.el_search_what=$E('.forage_slctbox',this.el_container);this.pool=[];this.bucket=[];this.filter=[];this.everyone=[];this.everyone_poll=new Poll(this.el_search_input,this.searchEveryone,{allow_empty:true,bind:this});this.everyone_poll.stop();this.everyone_ajax=false;this.images_loaded=false;this.search_str='';this.opt_everyone=this.options.everyone;this.opt_bucket_action_text=this.options.bucket_action.text;this.opt_bucket_action_callback=this.options.bucket_action.callback;this.el_search_clear_btn.addEvent('click',this.input_clear.bind(this));if(this.el_bucket_finish_btn){if(this.options.show_finish)this.el_bucket_finish_btn.addEvent('click',this.finish.bind(this));else this.el_bucket_finish_btn.remove();} if(this.options.show_clear)this.el_bucket_clear_btn.addEvent('click',this.clear_bucket.bind(this));else this.el_bucket_clear_btn.remove();this.layout_adjust();this.input_clear();this.pool=this.options.initial_pool.results?this.options.initial_pool.results:[];this.bucket=this.options.initial_bucket.results;if(!this.bucket)this.bucket=[];if(this.bucket.length)this.bucket_redraw();if(this.pool.length||this.options.add_email){this.pool_redraw();new Poll(this.el_search_input,this.search,{bind:this,interval:250,allow_empty:true});}else{this.pool_redraw();this.el_pool.getFirst().setHTML('No contacts found!');} if(!this.options.delay_image_load){this.loadImages();}},layout_adjust:function(){if(this.el_right.style.display=='none')return false;var padding=this.el_right.getStyle('padding-top').toInt();if(!window.ie) this.el_right.setStyle('height',this.el_left.getCoordinates().height-(padding*2)-5);this.el_bucket.setStyle('top',this.el_message.getCoordinates().height+padding*2);if(!window.ie) this.el_bucket.setStyle('height',this.el_buttonhole.getCoordinates().top-this.el_bucket.getCoordinates().top-padding+5);},loadImages:function(){if(!this.images_loaded){this.images_loaded=true;var portraits=$ES('.portrait',this.el_pool);for(var i=0;i
Share this again? or close window');}});} function share_reset() {$('share_btn').enable('Share');$('or_cancel').setHTML('or cancel');} function share_submit() {share_forager.finish();} function myspace_share(title,content,url,loc) {var target_url='http://www.myspace.com/Modules/PostTo/Pages/?' +'t='+encodeURIComponent(title) +'&c='+encodeURIComponent(content) +'&u='+encodeURIComponent(url) +'&l='+loc;window.open(target_url);} var MooRainbow=new Class({options:{id:'mooRainbow',input:false,prefix:'moor-',imgPath:'http://bitcast.vimeo.com/vimeo/assets/images/moorainbow/',startColor:[255,0,0],wheel:false,onOpen:Class.empty,onClose:Class.empty,onChange:Class.empty,onCancel:Class.empty,onComplete:Class.empty},initialize:function(el,options){this.element=$(el);if(!this.element)return;this.setOptions(options);this.sliderPos=0;this.pickerPos={x:0,y:0};this.backupColor=this.options.startColor;this.currentColor=this.options.startColor;this.sets={rgb:[],hsb:[],hex:[]};this.pickerClick=this.sliderClick=false;if(!this.layout)this.doLayout();this.OverlayEvents();this.sliderEvents();this.backupEvent();if(this.options.wheel)this.wheelEvents();this.element.addEvent('click',function(e){this.toggle(e);}.bind(this));this.layout.overlay.setStyle('background-color',this.options.startColor.rgbToHex());this.layout.backup.setStyle('background-color',this.backupColor.rgbToHex());this.pickerPos.x=this.snippet('curPos').l+this.snippet('curSize','int').w;this.pickerPos.y=this.snippet('curPos').t+this.snippet('curSize','int').h;this.manualSet(this.options.startColor);this.pickerPos.x=this.snippet('curPos').l+this.snippet('curSize','int').w;this.pickerPos.y=this.snippet('curPos').t+this.snippet('curSize','int').h;this.sliderPos=this.snippet('arrPos')-this.snippet('arrSize','int');if(window.khtml)this.hide();},toggle:function(){this[this.visible?'hide':'show']()},show:function(){this.fireEvent('onOpen',[this.sets,this]);this.rePosition();this.layout.setStyle('display','block');this.layout.setStyle('zIndex',100005);this.visible=true;if(this.options.input) this.manualSet($(this.options.input).value,'hex');},hide:function(){this.fireEvent('onClose',[this.sets,this]);this.layout.setStyles({'display':'none'});this.visible=false;},manualSet:function(color,type){if(!type||(type!='hsb'&&type!='hex'))type='rgb';var rgb,hsb,hex;if(type=='rgb'){rgb=color;hsb=color.rgbToHsb();hex=color.rgbToHex();} else if(type=='hsb'){hsb=color;rgb=color.hsbToRgb();hex=rgb.rgbToHex();} else{hex=color;rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();} this.setMooRainbow(rgb);this.autoSet(hsb);},autoSet:function(hsb){var curH=this.snippet('curSize','int').h;var curW=this.snippet('curSize','int').w;var oveH=this.layout.overlay.height;var oveW=this.layout.overlay.width;var sliH=this.layout.slider.height;var arwH=this.snippet('arrSize','int');var hue;var posx=Math.round(((oveW*hsb[1])/100)-curW);var posy=Math.round(-((oveH*hsb[2])/100)+oveH-curH);var c=Math.round(((sliH*hsb[0])/360));c=(c==360)?0:c;var position=sliH-c+this.snippet('slider')-arwH;hue=[this.sets.hsb[0],100,100].hsbToRgb().rgbToHex();this.layout.cursor.setStyles({'top':posy,'left':posx});this.layout.arrows.setStyle('top',position);this.layout.overlay.setStyle('background-color',hue);this.sliderPos=this.snippet('arrPos')-arwH;this.pickerPos.x=this.snippet('curPos').l+curW;this.pickerPos.y=this.snippet('curPos').t+curH;},setMooRainbow:function(color,type){if(!type||(type!='hsb'&&type!='hex'))type='rgb';var rgb,hsb,hex;if(type=='rgb'){rgb=color;hsb=color.rgbToHsb();hex=color.rgbToHex();} else if(type=='hsb'){hsb=color;rgb=color.hsbToRgb();hex=rgb.rgbToHex();} else{hex=color;rgb=color.hexToRgb();hsb=rgb.rgbToHsb();} this.sets={rgb:rgb,hsb:hsb,hex:hex};if(!$chk(this.pickerPos.x)) this.autoSet(hsb);this.RedInput.value=rgb[0];this.GreenInput.value=rgb[1];this.BlueInput.value=rgb[2];this.HueInput.value=hsb[0];this.SatuInput.value=hsb[1];this.BrighInput.value=hsb[2];this.hexInput.value=hex;this.currentColor=rgb;this.chooseColor.setStyle('background-color',rgb.rgbToHex());},parseColors:function(x,y,z){var s=Math.round((x*100)/this.layout.overlay.width);var b=100-Math.round((y*100)/this.layout.overlay.height);var h=360-Math.round((z*360)/this.layout.slider.height)+this.snippet('slider')-this.snippet('arrSize','int');h-=this.snippet('arrSize','int');h=(h>=360)?0:(h<0)?0:h;s=(s>100)?100:(s<0)?0:s;b=(b>100)?100:(b<0)?0:b;return[h,s,b];},OverlayEvents:function(){var lim,curH,curW,inputs;curH=this.snippet('curSize','int').h;curW=this.snippet('curSize','int').w;inputs=this.arrRGB.copy().concat(this.arrHSB,this.hexInput);document.addEvent('click',function(){if(this.visible)this.hide(this.layout);}.bind(this));inputs.each(function(el){el.addEvent('keydown',this.eventKeydown.bindWithEvent(this,el));el.addEvent('keyup',this.eventKeyup.bindWithEvent(this,el));},this);[this.element,this.layout].each(function(el){el.addEvents({'click':function(e){new Event(e).stop();},'keyup':function(e){e=new Event(e);if(e.key=='esc'&&this.visible)this.hide(this.layout);}.bind(this)},this);},this);lim={x:[0-curW,(this.layout.overlay.width-curW)],y:[0-curH,(this.layout.overlay.height-curH)]};this.layout.drag=new Drag.Base(this.layout.cursor,{limit:lim,onStart:this.overlayDrag.bind(this),onDrag:this.overlayDrag.bind(this),snap:0});this.layout.overlay2.addEvent('mousedown',function(e){e=new Event(e);this.layout.cursor.setStyles({'top':e.page.y-this.layout.overlay.getTop()-curH,'left':e.page.x-this.layout.overlay.getLeft()-curW});this.layout.drag.start(e);}.bind(this));this.okButton.addEvent('click',function(){if(this.currentColor==this.options.startColor){this.fireEvent('onComplete',[this.sets,this]);this.hide();} else{this.backupColor=this.currentColor;this.layout.backup.setStyle('background-color',this.backupColor.rgbToHex());this.fireEvent('onComplete',[this.sets,this]);this.hide();}}.bind(this));},overlayDrag:function(){var curH=this.snippet('curSize','int').h;var curW=this.snippet('curSize','int').w;this.pickerPos.x=this.snippet('curPos').l+curW;this.pickerPos.y=this.snippet('curPos').t+curH;this.setMooRainbow(this.parseColors(this.pickerPos.x,this.pickerPos.y,this.sliderPos),'hsb');this.fireEvent('onChange',[this.sets,this]);},sliderEvents:function(){var arwH=this.snippet('arrSize','int'),lim;lim=[0+this.snippet('slider')-arwH,this.layout.slider.height-arwH+this.snippet('slider')];this.layout.sliderDrag=new Drag.Base(this.layout.arrows,{limit:{y:lim},modifiers:{x:false},onStart:this.sliderDrag.bind(this),onDrag:this.sliderDrag.bind(this),snap:0});this.layout.slider.addEvent('mousedown',function(e){e=new Event(e);this.layout.arrows.setStyle('top',e.page.y-this.layout.slider.getTop()+this.snippet('slider')-arwH);this.layout.sliderDrag.start(e);}.bind(this));},sliderDrag:function(){var arwH=this.snippet('arrSize','int'),hue;this.sliderPos=this.snippet('arrPos')-arwH;this.setMooRainbow(this.parseColors(this.pickerPos.x,this.pickerPos.y,this.sliderPos),'hsb');hue=[this.sets.hsb[0],100,100].hsbToRgb().rgbToHex();this.layout.overlay.setStyle('background-color',hue);this.fireEvent('onChange',[this.sets,this]);},backupEvent:function(){this.layout.backup.addEvent('click',function(){this.manualSet(this.backupColor);this.fireEvent('onChange',[this.sets,this]);}.bind(this));},wheelEvents:function(){var arrColors=this.arrRGB.copy().extend(this.arrHSB);arrColors.each(function(el){el.addEvents({'mousewheel':this.eventKeys.bindWithEvent(this,el),'keydown':this.eventKeys.bindWithEvent(this,el)});},this);[this.layout.arrows,this.layout.slider].each(function(el){el.addEvents({'mousewheel':this.eventKeys.bindWithEvent(this,[this.arrHSB[0],'slider']),'keydown':this.eventKeys.bindWithEvent(this,[this.arrHSB[0],'slider'])});},this);},eventKeys:function(e,el,id){var wheel,type;id=(!id)?el.id:this.arrHSB[0];if(e.type=='keydown'){if(e.key=='up')wheel=1;else if(e.key=='down')wheel=-1;else return;}else if(e.type==Element.Events.mousewheel.type)wheel=(e.wheel>0)?1:-1;if(this.arrRGB.test(el))type='rgb';else if(this.arrHSB.test(el))type='hsb';else type='hsb';if(type=='rgb'){var rgb=this.sets.rgb,hsb=this.sets.hsb,prefix=this.options.prefix,pass;var value=el.value.toInt()+wheel;value=(value>255)?255:(value<0)?0:value;switch(el.className){case prefix+'rInput':pass=[value,rgb[1],rgb[2]];break;case prefix+'gInput':pass=[rgb[0],value,rgb[2]];break;case prefix+'bInput':pass=[rgb[0],rgb[1],value];break;default:pass=rgb;} this.manualSet(pass);this.fireEvent('onChange',[this.sets,this]);}else{var rgb=this.sets.rgb,hsb=this.sets.hsb,prefix=this.options.prefix,pass;var value=el.value.toInt()+wheel;if(el.className.test(/(HueInput)/))value=(value>359)?0:(value<0)?0:value;else value=(value>100)?100:(value<0)?0:value;switch(el.className){case prefix+'HueInput':pass=[value,hsb[1],hsb[2]];break;case prefix+'SatuInput':pass=[hsb[0],value,hsb[2]];break;case prefix+'BrighInput':pass=[hsb[0],hsb[1],value];break;default:pass=hsb;} this.manualSet(pass,'hsb');this.fireEvent('onChange',[this.sets,this]);} e.stop();},eventKeydown:function(e,el){var n=e.code,k=e.key;if((!el.className.test(/hexInput/)&&!(n>=48&&n<=57))&&(k!='backspace'&&k!='tab'&&k!='delete'&&k!='left'&&k!='right')) e.stop();},eventKeyup:function(e,el){var n=e.code,k=e.key,pass,prefix,chr=el.value.charAt(0);if(!$chk(el.value))return;if(el.className.test(/hexInput/)){if(chr!="#"&&el.value.length!=6)return;if(chr=='#'&&el.value.length!=7)return;}else{if(!(n>=48&&n<=57)&&(!['backspace','tab','delete','left','right'].test(k))&&el.value.length>3)return;} prefix=this.options.prefix;if(el.className.test(/(rInput|gInput|bInput)/)){if(el.value<0||el.value>255)return;switch(el.className){case prefix+'rInput':pass=[el.value,this.sets.rgb[1],this.sets.rgb[2]];break;case prefix+'gInput':pass=[this.sets.rgb[0],el.value,this.sets.rgb[2]];break;case prefix+'bInput':pass=[this.sets.rgb[0],this.sets.rgb[1],el.value];break;default:pass=this.sets.rgb;} this.manualSet(pass);this.fireEvent('onChange',[this.sets,this]);} else if(!el.className.test(/hexInput/)){if(el.className.test(/HueInput/)&&el.value<0||el.value>360)return;else if(el.className.test(/HueInput/)&&el.value==360)el.value=0;else if(el.className.test(/(SatuInput|BrighInput)/)&&el.value<0||el.value>100)return;switch(el.className){case prefix+'HueInput':pass=[el.value,this.sets.hsb[1],this.sets.hsb[2]];break;case prefix+'SatuInput':pass=[this.sets.hsb[0],el.value,this.sets.hsb[2]];break;case prefix+'BrighInput':pass=[this.sets.hsb[0],this.sets.hsb[1],el.value];break;default:pass=this.sets.hsb;} this.manualSet(pass,'hsb');this.fireEvent('onChange',[this.sets,this]);}else{pass=el.value.hexToRgb(true);if(isNaN(pass[0])||isNaN(pass[1])||isNaN(pass[2]))return;if($chk(pass)){this.manualSet(pass);this.fireEvent('onChange',[this.sets,this]);}}},doLayout:function(){var id=this.options.id,prefix=this.options.prefix;var idPrefix=id+' .'+prefix;this.layout=new Element('div',{'styles':{'display':'block','position':'absolute'},'id':id}).inject(document.body);var box=new Element('div',{'styles':{'position':'relative'},'class':prefix+'box'}).inject(this.layout);var div=new Element('div',{'styles':{'position':'absolute','overflow':'hidden'},'class':prefix+'overlayBox'}).inject(box);var ar=new Element('div',{'styles':{'position':'absolute','zIndex':1},'class':prefix+'arrows'}).inject(box);ar.width=ar.getStyle('width').toInt();ar.height=ar.getStyle('height').toInt();var ov=new Element('img',{'styles':{'background-color':'#fff','position':'relative','zIndex':2},'src':this.options.imgPath+'moor_woverlay.png','class':prefix+'overlay'}).inject(div);var ov2=new Element('img',{'styles':{'position':'absolute','top':0,'left':0,'zIndex':2},'src':this.options.imgPath+'moor_boverlay.png','class':prefix+'overlay'}).inject(div);if(window.ie6){div.setStyle('overflow','');var src=ov.src;ov.src=this.options.imgPath+'blank.gif';ov.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";src=ov2.src;ov2.src=this.options.imgPath+'blank.gif';ov2.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";} ov.width=ov2.width=div.getStyle('width').toInt();ov.height=ov2.height=div.getStyle('height').toInt();var cr=new Element('div',{'styles':{'overflow':'hidden','position':'absolute','zIndex':2},'class':prefix+'cursor'}).inject(div);cr.width=cr.getStyle('width').toInt();cr.height=cr.getStyle('height').toInt();var sl=new Element('img',{'styles':{'position':'absolute','z-index':2},'src':this.options.imgPath+'moor_slider.png','class':prefix+'slider'}).inject(box);this.layout.slider=$E('#'+idPrefix+'slider');sl.width=sl.getStyle('width').toInt();sl.height=sl.getStyle('height').toInt();new Element('div',{'styles':{'position':'absolute'},'class':prefix+'colorBox'}).inject(box);new Element('div',{'styles':{'zIndex':2,'position':'absolute'},'class':prefix+'chooseColor'}).inject(box);this.layout.backup=new Element('div',{'styles':{'zIndex':2,'position':'absolute','cursor':'pointer'},'class':prefix+'currentColor'}).inject(box);var R=new Element('label').inject(box).setStyle('position','absolute');var G=R.clone().inject(box).addClass(prefix+'gLabel').appendText('G: ');var B=R.clone().inject(box).addClass(prefix+'bLabel').appendText('B: ');R.appendText('R: ').addClass(prefix+'rLabel');var inputR=new Element('input');var inputG=inputR.clone().inject(G).addClass(prefix+'gInput');var inputB=inputR.clone().inject(B).addClass(prefix+'bInput');inputR.inject(R).addClass(prefix+'rInput');var HU=new Element('label').inject(box).setStyle('position','absolute');var SA=HU.clone().inject(box).addClass(prefix+'SatuLabel').appendText('S: ');var BR=HU.clone().inject(box).addClass(prefix+'BrighLabel').appendText('B: ');HU.appendText('H: ').addClass(prefix+'HueLabel');var inputHU=new Element('input');var inputSA=inputHU.clone().inject(SA).addClass(prefix+'SatuInput');var inputBR=inputHU.clone().inject(BR).addClass(prefix+'BrighInput');inputHU.inject(HU).addClass(prefix+'HueInput');SA.appendText(' %');BR.appendText(' %');new Element('span',{'styles':{'position':'absolute'},'class':prefix+'ballino'}).setHTML(" °").injectAfter(HU);var hex=new Element('label').inject(box).setStyle('display','none').addClass(prefix+'hexLabel').appendText('#hex: ').adopt(new Element('input').addClass(prefix+'hexInput'));var or=new Element('label',{'class':prefix+'orLabel'}).inject(box).appendText('or');var cancel=new Element('a',{'class':prefix+'cancelButton'}).appendText('cancel').inject(box);var arrow=new Element('div',{'class':prefix+'arrow'}).inject(box);var ok=new Element('input',{'styles':{'position':'absolute'},'type':'button','value':'Select','class':prefix+'okButton blue_button'}).inject(box);this.rePosition();var overlays=$$('#'+idPrefix+'overlay');this.layout.overlay=overlays[0];this.layout.overlay2=overlays[1];this.layout.cursor=$E('#'+idPrefix+'cursor');this.layout.arrows=$E('#'+idPrefix+'arrows');this.chooseColor=$E('#'+idPrefix+'chooseColor');this.layout.backup=$E('#'+idPrefix+'currentColor');this.RedInput=$E('#'+idPrefix+'rInput');this.GreenInput=$E('#'+idPrefix+'gInput');this.BlueInput=$E('#'+idPrefix+'bInput');this.HueInput=$E('#'+idPrefix+'HueInput');this.SatuInput=$E('#'+idPrefix+'SatuInput');this.BrighInput=$E('#'+idPrefix+'BrighInput');this.hexInput=$E('#'+idPrefix+'hexInput');this.arrRGB=[this.RedInput,this.GreenInput,this.BlueInput];this.arrHSB=[this.HueInput,this.SatuInput,this.BrighInput];this.okButton=$E('#'+idPrefix+'okButton');if(!window.khtml)this.hide();this.cancelButton=$E('#'+idPrefix+'cancelButton');this.cancelButton.addEvent('click',function(){this.fireEvent('onCancel',[this.sets,this]);this.hide();this.fireEvent('onClose',[this.sets,this]);}.bind(this));},rePosition:function(){var coords=this.element.getCoordinates();this.layout.setStyles({'left':coords.left+coords.width,'top':coords.top-13});},snippet:function(mode,type){var size;type=(type)?type:'none';switch(mode){case'arrPos':var t=this.layout.arrows.getStyle('top').toInt();size=t;break;case'arrSize':var h=this.layout.arrows.height;h=(type=='int')?(h/2).toInt():h;size=h;break;case'curPos':var l=this.layout.cursor.getStyle('left').toInt();var t=this.layout.cursor.getStyle('top').toInt();size={'l':l,'t':t};break;case'slider':var t=this.layout.slider.getStyle('marginTop').toInt();size=t;break;default:var h=this.layout.cursor.height;var w=this.layout.cursor.width;h=(type=='int')?(h/2).toInt():h;w=(type=='int')?(w/2).toInt():w;size={w:w,h:h};};return size;}});MooRainbow.implement(new Options);MooRainbow.implement(new Events);function embed_preview(clip_id){if(!clip_id) clip_id=$('embed_clip_id').value;var color=$('embed_color').value;var width=$('embed_width').value;var height=$('embed_height').value;if(width>400){width=400;height=Math.round(width/($('embed_orig_width').value/$('embed_orig_height').value));if($('embed_preview').getStyle('display')!='none') $('size_embed_alert').show();$('embed_preview_width').innerHTML=$('embed_width').value;} else{$('size_embed_alert').hide();} new Moogaloop('embed_preview',{clip_id:clip_id,server:$('embed_server').value,width:width,height:height,show_title:$('embed_title').checked?1:0,show_byline:$('embed_byline').checked?1:0,show_portrait:$('embed_portrait').checked?1:0,color:color.substr(0,1)=='#'?color.substr(1):color,force_embed:1});} function embed_preview_api(id,value){try{switch(id){default:document.getElementById('vimeo_clip_'+$('embed_clip_id').value).api_toggleElement(id,value);break;case'color':if(value.substr(0,1)=='#')value=value.substr(1);document.getElementById('vimeo_clip_'+$('embed_clip_id').value).api_changeColor(value);break;}}catch(e){}} function embed_update(clip_id){if($('embed_width').value==''||$('embed_height').value=='')embed_size_reset();if(!clip_id)clip_id=$('embed_clip_id').value;if($('embed_link').checked||$('embed_caption').checked){$('desc_embed_alert').show();$('embed_link_txt').hide();$('embed_desc_txt').hide();$('embed_desc_and_link_txt').hide();if($('embed_link').checked&&$('embed_caption').checked){$('embed_desc_and_link_txt').show();} else if($('embed_caption').checked){$('embed_desc_txt').show();} else if($('embed_link').checked){$('embed_link_txt').show();}}else $('desc_embed_alert').hide();refresh_page({jdata:{clip_id:clip_id,width:$('embed_width').value,height:$('embed_height').value,title:$('embed_title').checked,byline:$('embed_byline').checked,portrait:$('embed_portrait').checked,link:$('embed_link').checked,caption:$('embed_caption').checked,color:$('embed_color').value},url:'/ajax/clip/embed_code',onComplete:function(data){$('embed_code').value=data;$('embed_code').focus();$('embed_code').select();}});} function embed_resize_width(width){if(width=='')return false;width=width.toInt();if(width){$('embed_height').value=Math.round(width*($('embed_orig_height').value/$('embed_orig_width').value));}else{embed_size_reset();}} function embed_resize_height(height){if(height=='')return false;height=height.toInt();if(height){$('embed_width').value=Math.round(height*($('embed_orig_width').value/$('embed_orig_height').value));}else{embed_size_reset();}} function embed_size_reset(){$('embed_height').value=$('embed_orig_height').value;$('embed_width').value=$('embed_orig_width').value;} function embed_reset_to_defaults(){$('embed_width').value=400;$('embed_height').value=Math.floor(400/($('embed_orig_width').value/$('embed_orig_height').value));if(!$('embed_portrait').disabled)$('embed_portrait').setProperty('checked','');if(!$('embed_title').disabled)$('embed_title').setProperty('checked','checked');if(!$('embed_byline').disabled)$('embed_byline').setProperty('checked','checked');if($('embed_color_dropdown')){$('embed_color').value='#00ADEF';$('embed_color_dropdown').setStyle('color','#00ADEF');} embed_preview();embed_update();} var isIE=window.ie;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion() {var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){} if(!version) {try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}} if(!version) {try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}} if(!version) {try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}} if(!version) {try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}} return version;} function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];if(descArray[3]!=""){var splitter=descArray[3].indexOf("d")!=-1?'d':'r';tempArrayMinor=descArray[3].split(splitter);}else{var splitter=descArray[4].indexOf("d")!=-1?'d':'r';tempArrayMinor=descArray[4].split(splitter);} var versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}} else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();} return flashVer;} function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision) {versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(window.ie&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");} var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer)) return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision)) return true;}} return false;}} function AC_AddExtension(src,ext) {if(src.indexOf('?')!=-1) return src.replace(/\?/,ext+'?');else return src+ext;} function AC_Generateobj(objAttrs,params,embedAttrs) {var str='';if(isIE&&isWin&&!isOpera) {str+=' ';str+='>';}else{str+='7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;