/*	BysMoo WCMS, Copyright (c) ByYourSite since 2008. All rights reserved.

	This source file is free software; you can redistribute it and/or
	modify it under the terms of the MOO Public License as published
	by the MOO Development Group; either version 1.1 of the License, or
	(at your option) any later version.
*/
if(window.opera)window.opera95=(parseFloat(opera.version())>=9.5);else if(window.ActiveXObject)window.ie=0 /*@cc_on+@_jscript_version @*/ * 10;else if(navigator.vendor=="KDE")window.khtml=parseFloat((navigator.userAgent.match(/KHTML\/([\d.]+)/i)||[3,3])[1]);else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=parseFloat((navigator.userAgent.match(/WebKit\/([\d.]+)/i)||[1,1])[1]);else if(document.getBoxObjectFor!=null)window.gecko=parseInt((navigator.userAgent.match(/Gecko\/([\d]+)/i)||[1])[1]);window[(navigator.platform.match(/mac|win|linux/i)||['other'])[0].toLowerCase()]=true;if(window.ie){window.ie-=50;window.trident3=(window.ie&&window.ie<8)}var $LNG=new Array(),$ga_id=null;function defined(v){return("undefined"!=v&&"undefined"!=typeof(v))}(function(){if(window.loadFirebugConsole)window.loadFirebugConsole();if(!window.console)window.console={};var i,names=["assert","debug","error","info","log","profile","profileEnd","warn","count","dir","dirxml","group","groupEnd","time","timeEnd","trace"];for(i=0;i<names.length;++i){if(!console[names[i]])try{console[names[i]]=window.debug?debug:(2==i?function(e){MOO.msg.error(e.message?e.message:e)}:function(){})}catch(e){}}if(window.opera&&window.opera.postError){console.error=opera.postError}})();var $A=Array.from=function(iterable){if(!iterable){return[]}if(iterable.toArray){return iterable.toArray()}else{var i,results=[];for(i=0;i<iterable.length;++i){results.push(iterable[i])}return results}};Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)))}};DATE_ISO8601='Y-m-d\\TH:i:sO';DATE_RFC2822='D,d M Y H:i:s O';Date.prototype.getISODay=function(){var d=this.getDay();return d>0?d:7};Date.prototype.getISOYear=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate()-((this.getDay()+6)% 7)+3).getFullYear()};Date.prototype.getDayOfYear=function(){return Math.floor((Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),1)-Date.UTC(this.getFullYear(),0,1,0))/ 86400000)};Date.prototype.getWeek=function(){var d=new Date(this.getFullYear(),0,1),wd=d.getISODay(),w=Math.ceil((this.getDayOfYear()+wd)/ 7);if(4<wd){--w}if(1>w){w=(new Date(this.getFullYear()-1,11,31)).getWeek()}else if(52<w&&4>this.getISODay()){w=1}return w};Date.prototype.isDaylightSavingTime=function(){return this.getTimezoneOffset()!=Math.max(new Date(this.getFullYear(),0,1).getTimezoneOffset(),new Date(this.getFullYear(),6,1).getTimezoneOffset())};Date.prototype.format=function(format,txtRep){var x=this;txtRep=txtRep||{shortMonths:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],longMonths:['January','February','March','April','May','June','July','August','September','October','November','December'],shortDays:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],longDays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']};return!format?this.toString():format.replace(/\\?[a-zA-Z]/g,function(m){if(m.charAt(0)==="\\"){return m.replace("\\","")}switch(m){case "d":return(''+x.getDate()).pad(2,'0',0);case "D":return txtRep.shortDays[x.getDay()];case "j":return x.getDate();case "l":return txtRep.longDays[x.getDay()];case "N":return x.getISODay();case "S":return(x.getDate()% 10==1&&x.getDate()!=11?'st':(x.getDate()% 10==2&&x.getDate()!=12?'nd':(x.getDate()% 10==3&&x.getDate()!=13?'rd':'th')));case "w":return x.getDay();case "z":return x.getDayOfYear();case "W":return x.getWeek();case "F":return txtRep.longMonths[x.getMonth()];case "m":return(''+(x.getMonth()+1)).pad(2,'0',0);case "M":return txtRep.shortMonths[x.getMonth()];case "n":return x.getMonth()+1;case "t":return x.getDaysInMonth();case "L":return(((x.getFullYear()%4==0)&&(x.getFullYear()%100!=0))||(x.getFullYear()%400==0))?'1':'0';case "o":return x.getISOYear();case "Y":return x.getFullYear();case "y":return(''+x.getFullYear()).substr(2);case "a":return x.getHours()<12?'am':'pm';case "A":return x.getHours()<12?'AM':'PM';case "g":return x.getHours()% 12||12;case "G":return x.getHours();case "h":return(''+(x.getHours()% 12||12)).pad(2,'0',0);case "H":return(''+x.getHours()).pad(2,'0',0);case "i":return(''+x.getMinutes()).pad(2,'0',0);case "s":return(''+x.getSeconds()).pad(2,'0',0);case "I":return x.isDaylightSavingTime()?1:0;case "O":return(x.getTimezoneOffset()>0?'-':'+')+(''+Math.abs(x.getTimezoneOffset()/ 60)).pad(2,'0',0)+'00';case "P":return(x.getTimezoneOffset()>0?'-':'+')+(''+Math.abs(x.getTimezoneOffset()/ 60)).pad(2,'0',0)+':'+(''+Math.abs(x.getTimezoneOffset()% 60)).pad(2,'0',0);case "T":return new Date(x.getFullYear(),0,1).toTimeString().replace(/^.+\(?([^\)]+)\)?$/,'$1');case "Z":return-x.getTimezoneOffset()* 60;case "c":return x.format(DATE_ISO8601);case "r":return x.format(DATE_RFC2822);case "U":return x.getTime()/ 1000}return m})};String.prototype.addQueryParam=function(key,value){return(this==""?"":this+"&")+key+"="+encodeURIComponent(value)};String.prototype.trim=function(){return this.replace(/^\s+/,'').replace(/\s+$/,'')};STR_PAD_LEFT=0;STR_PAD_RIGHT=1;STR_PAD_BOTH=2;String.prototype.pad=function(len,pad,dir){if(!defined(len)){len=0}if(!defined(pad)){pad=' '}if(!defined(dir)){dir=1}if(len+1>=this.length){switch(dir){case STR_PAD_LEFT:return Array(len+1-this.length).join(pad)+this;case STR_PAD_BOTH:var right=Math.ceil((padlen=len-this.length)/ 2),left=padlen-right;return Array(left+1).join(pad)+this+Array(right+1).join(pad)}return this+Array(len+1-this.length).join(pad)}return this};extendObjectWith=function(target,obj){if("object"!=typeof(obj)){obj=new obj};var p,v;for(p in obj){if(obj[p]!=Object.prototype[p]){v=obj[p];try{switch(p){case "style":for(p in v){target.style[p]=v[p]}break;case "className":MOO.setNodeClass(target,v);break;case "innerHTML":MOO.setNodeHTML(target,defined(typeof(obj.namespaceURI))?"<![CDATA["+v+"]]>":v);break;case "htmlFor":target.setAttribute("for",v);default:(defined(target[p])?target.setAttribute(p,v):target[p]=v)}}catch(e){}}}};function $(id){try{return document.getElementById(id)}catch(e){}}function $B(n){n=$D(n);return n.body||n.documentElement}function $C(tagname){return MOO.$C(document,tagname,arguments[1])}function $D(o){return(9==o.nodeType?o:(o.ownerDocument?o.ownerDocument:(o.document?o.document:document)))}function $W(o){return(o.parentWindow?o.parentWindow:($Doc(o)?$Doc(o).parentWindow:$D(o).parentWindow))||(o.defaultView?o.defaultView:($Doc(o)?$Doc(o).defaultView:$D(o).defaultView))}function $Doc(o){return(o.contentWindow?o.contentWindow.document:(o.contentDocument?o.contentDocument:(9==o.nodeType?o:null)))}function $E(){var i=0,n,result=new Array();while(n=arguments[i++]){if("string"==typeof(n)){n=$(n)}if(1==arguments.length){return n}result.push(n)}return result}function $T(tagname,parentNode){return(parentNode||document).getElementsByTagName(tagname)}function point(x,y){this.x=x;this.y=y}var Events={add:function(obj,type,fn,o){if(o){fn=fn.bind(o)}if("submit"==type){this.addBeforeSubmit(obj)}if(obj.addEventListener){obj.addEventListener(type,fn,false)}else{this.IE_add(obj,type,fn)}if(window.ie&&"DOMAttrModified"==type){this.add(obj,"propertychange",fn)}return obj},remove:function(obj,type,fn){if(obj.removeEventListener){obj.removeEventListener(type,fn,false)}else{this.IE_remove(obj,type,fn)}},stop:function(e,keepPropagation){if(!e){e=window.event}e.preventDefault?e.preventDefault():e.returnValue=false;if(!keepPropagation){e.stopPropagation?e.stopPropagation():e.cancelBubble=true}return false},exec:function(f,e){var l=f.length,i=-1;while(++i<l){if(f[i])f[i](e)}},simulate:function(obj,type,bubbles,cancelable){if(document.createEvent){var evt=document.createEvent("HTMLEvents");evt.initEvent(type,2<arguments.length?arguments[2]:true/*bubbles*/,3<arguments.length?arguments[3]:true/*cancelable*/);obj.dispatchEvent(evt)}else if(document.createEventObject){obj.fireEvent('on'+type)}else{}},addBeforeSubmit:function(obj,fn){if(!obj||"form"!=MOO.getNodeName(obj)){return false}if(!obj.beforesubmit){obj.beforesubmit=[];this.add(obj,"submit",this._before)}if(fn)obj.beforesubmit.push(fn);return true},_before:function(e){Events.exec(e.currentTarget.beforesubmit,e)},IE_Listeners:[],IE_add:function(obj,type,fn){if(!obj.events){obj.events=[]}if(!obj.events[type]){var ev="on"+type;obj.events[type]=[];if("load"==type&&obj.attachEvent){this.IE_attach(obj,ev,this.IE_onload)}else{if(obj[ev]){alert(ev+" removed from "+obj.nodeName)}obj[ev]=this.IE_onevent}}var f=obj.events[type],i=f.length;while(i--){if(fn==f[i]){return}}obj.events[type].push(fn)},IE_remove:function(obj,type,fn){if(obj.events&&obj.events[type]){var f=obj.events[type],i=f.length,l;while(i--){if(fn==f[i]){l=f.length-1;while(i<l){f[i]=f[i+1];obj.events[type][i]=obj.events[type][++i]}--f.length}}}},IE2DOM:function(e,o,exec){if(!e){e=(o?$W(o):window).event}if(!document.addEventListener)try{e.target=e.srcElement;o=o?o:e.target;while(o&&o.nodeType&&1!=o.nodeType&&9!=o.nodeType){o=o.parentNode}e.currentTarget=o;e.metaKey=e.ctrlKey;e.cancelable=true;e.preventDefault=function(){this.returnValue=false};e.stopPropagation=function(){this.cancelBubble=true};e.pageX=0;e.pageY=0;e.relatedTarget=null;e.time=(new Date).getTime();e.which=1;switch(e.type){case "mouseout":e.relatedTarget=e.toElement;break;case "mouseover":e.relatedTarget=e.fromElement;break;case "keypress":e.which=e.charCode=e.keyCode;break;case "keydown":case "keyup":e.which=e.keyCode;e.charCode=0;break}if(e.wheelDelta){e.detail=-event.wheelDelta/120*3}if(e.propertyName){e.attrName=e.propertyName.replace(/([^\.]+).*/,"$1")}if(o){var doc=((9==o.nodeType)?o:(o.document?o.document:null));if(e.clientX!=null&&doc){var s=MOO.getDocScroll(doc),doce=doc.documentElement,body=doc.body;e.pageX=e.clientX+intval(doce.clientLeft||body.clientLeft)+s.x;e.pageY=e.clientY+intval(doce.clientTop||body.clientTop)+s.y}if(exec){Events.exec(o.events[e.type],e)}}}catch(e){}return e},IE_onload:function(e){e=this.event;Events.IE2DOM(e,e.srcElement?e.srcElement:this,true)},IE_onevent:function(e){Events.IE2DOM(e,this,true)},IE_attach:function(obj,type,fn){var el=this.IE_Listeners,i=el.length;if(!i){window.attachEvent("onunload",function(){for(var i=0;i<el.length;++i)try{el[i][0].detachEvent(el[i][1],el[i][2])}catch(e){}Events.IE_Listeners=null;window.detachEvent('onunload',arguments.callee)})}el[i]=[obj,type,fn];obj.attachEvent(type,fn)}};function addEvent(obj,type,fn,o){return Events.add(obj,type,fn,o)}function removeEvent(obj,type,fn){Events.remove(obj,type,fn)}function stopEvent(e,keepPropagation){return Events.stop(e,keepPropagation)}var pageTracker=null, MOO={NS:null,HOST:null,PATH:null,TPL:null,JS_PATH:null,CSS_PATH:null,_version:"$Revision:1.24 $",base_uri:function(){return MOO.HOST+MOO.PATH},init:function(){MOO.NS=document.documentElement.namespaceURI;MOO.msg.box=$("messagesbox");if(MOO.Flash){var fv=MOO.Flash.getFlashPlayerVersion()}MOO.init_paths();var x,y,z,rows,nodes=$T("tbody");for(x=0;x<nodes.length;++x){if(hasClassName(nodes[x].parentNode,"fancy")){rows=$T("tr",nodes[x]);for(y=1;y<rows.length;y+=2){addClassName(rows[y],"s")}}}nodes=document.links;for(x=0;x<nodes.length;++x){if(nodes[x].getAttribute("href")&&MOO.strContains(nodes[x].getAttribute("rel"),"external")){nodes[x].target="_blank"}}if($ga_id&&defined(typeof(_gat))){pageTracker=_gat._getTracker($ga_id);pageTracker._trackPageview()}if(window.trident3){function set_zIndexes(nodes){var i,x,z=20*nodes.length;for(x=0;x<nodes.length;++x){i=parseInt(MOO.getCSSPropertyValue(nodes[x],"z-index"));nodes[x].style.zIndex=(isNaN(i)||!i)?z:i+z;z-=20;if(hasClassName(nodes[x],"menu")){set_zIndexes($T("li",nodes[x]));set_zIndexes($T("ul",nodes[x]))}}}set_zIndexes($T("div"))}},init_paths:function(){MOO.HOST=self.location.protocol+"//"+self.location.host;var x=(new RegExp("([^\"']*/)([^/]+\.php/)?css/([^/]+)/[^\"']*style")).exec($T("head")[0].innerHTML);x=x||["","/"];x[2]=x[2]||"";x[3]=x[3]||"default";if(!MOO.PATH)MOO.PATH=x[1];if(!MOO.CSS_PATH)MOO.CSS_PATH=x[1]+x[2]+"css/"+x[3]+"/";if(!MOO.JS_PATH)MOO.JS_PATH=x[1]+x[2]+"js/";if(!MOO.TPL)MOO.TPL=x[3]},capsLock:function(e){kc=e.keyCode||e.which;sk=e.shiftKey?e.shiftKey:(kc==16);return(((kc>=65&&kc<=90)&&!sk)||((kc>=97&&kc<=122)&&sk))},key_numerical:function(e,o){e=Events.IE2DOM(e,o);if("keypress"!=e.type){return}var kc=e.keyCode,cc=e.which;if(8==kc||9==kc||13==kc||35==kc||36==kc||37==kc||39==kc||46==kc||(!e.shiftKey&&cc>=48&&cc<=57)){return true}var n=e.currentTarget,v=intval(n.value?n.value:0);if(43==cc){n.value=v+1}if(45==cc){n.value=v-1}if(33==kc){n.value=v+10}if(34==kc){n.value=v-10}},getElementsByClassName:function(className,nodeName,parentNode){var result=[],i=-1,s=$T(nodeName||'*',parentNode),re=new RegExp('(^|\\s)'+className+'(\\s|$)');while(s[++i]){if(re.test(s[i].className))result.push(s[i])}return result},getFormInputsByType:function(type,form){var result=[],i=-1,s=$T("input",form),re=new RegExp('^'+type+'$');while(s[++i]){if(re.test(s[i].type))result.push(s[i])}return result},addNodeAfter:function(node,refNode){refNode.parentNode.insertBefore(node,refNode.nextSibling)},getNodeByName:function(name,tag,o){var i,n=$T(tag||"input",o);for(i=0;i<n.length;++i){if(n[i].name==name){return n[i]}}},getNodeHasFixed:function(o){var fixed=false;while(o){o.fixed_pos=((!window.ie||window.ie>6)&&"fixed"==MOO.getCSSPropertyValue(o,"position"));fixed|=o.fixed_pos;o=o.offsetParent}return fixed},getBoundingClientRect:function(n,stopat){var x=0,y=0,o=n,fixed;while(o){x+=o.offsetLeft;y+=o.offsetTop;fixed=("fixed"==MOO.getCSSPropertyValue(o,"position"));if(fixed){break}o=o.offsetParent;if(o&&o.offsetParent){x-=o.scrollLeft;y-=o.scrollTop}if(stopat==o){break}}if(!fixed&&!stopat){o=MOO.getDocScroll($D(n));x-=o.x;y-=o.y}if(fixed&&window.opera&&"9.51"==opera.version()){}return({top:y,right:x+n.offsetWidth,bottom:y+n.offsetHeight,left:x})},getNodeBoundingRect:function(n,stopat){var br=(!stopat&&n.getBoundingClientRect)?n.getBoundingClientRect():MOO.getBoundingClientRect(n,stopat);return new MOO.rectangle(br.left,br.top,br.right,br.bottom)},getNodeAbsLeft:function(o,stopat){if(!stopat&&o.getBoundingClientRect){return o.getBoundingClientRect().left}var x=0,op,ol,is_body,fixed_pos=false,has_fixed_pos=MOO.getNodeHasFixed(o),doc=o.ownerDocument,doce=doc.documentElement,body=$B(doc);while(o){op=o.offsetParent;is_body=(op&&(op==body||op==doce));fixed_pos|=o.fixed_pos;ol=o.offsetLeft;if(!stopat||stopat!=op){if(op&&!fixed_pos&&!window.opera&&!is_body){ol-=op.scrollLeft}if((is_body&&!fixed_pos)||(window.opera&&has_fixed_pos)){ol-=MOO.getDocScroll(doc).x;has_fixed_pos=false}}x+=(is_body?ol:Math.max(ol,0));if(fixed_pos||is_body||stopat==op){break}o=op}return Math.max(x,0)},getNodeAbsTop:function(o,stopat){if(!stopat&&o.getBoundingClientRect){return o.getBoundingClientRect().top}var y=0,op,ot,is_body,fixed_pos=false,has_fixed_pos=MOO.getNodeHasFixed(o),doc=o.ownerDocument,doce=doc.documentElement,body=$B(doc);while(o){op=o.offsetParent;is_body=(op&&(op==body||op==doce));fixed_pos|=o.fixed_pos;ot=o.offsetTop;if(!stopat||stopat!=op){if(op&&!fixed_pos&&!window.opera&&!is_body){ot-=op.scrollTop}if((is_body&&!fixed_pos)||(window.opera&&has_fixed_pos)){ot-=MOO.getDocScroll(doce).y;has_fixed_pos=false}}y+=(is_body?ot:Math.max(ot,0));if(fixed_pos||is_body||stopat==op){break}o=op}return Math.max(y,0)},getNodeWidth:function(o,def){return Math.max(o.offsetWidth,(def?def:100))-intval(MOO.getCSSPropertyValue(o,"padding-left"))-intval(MOO.getCSSPropertyValue(o,"padding-right"));-intval(MOO.getCSSPropertyValue(o,"border-left-width"))-intval(MOO.getCSSPropertyValue(o,"border-right-width"))},getNodeHeight:function(o,def){return Math.max(o.offsetHeight,(def?def:100))-intval(MOO.getCSSPropertyValue(o,"padding-top"))-intval(MOO.getCSSPropertyValue(o,"padding-bottom"));-intval(MOO.getCSSPropertyValue(o,"border-top-width"))-intval(MOO.getCSSPropertyValue(o,"border-bottom-width"))},getNodeName:function(o){return(o.nodeName?o.nodeName.toLowerCase():null)},getNodeClass:function(o){var cn;try{cn=o.getAttribute(window.trident3?"className":"class")}catch(e){}return cn?cn:o.className},setNodeClass:function(o,v){var a=window.trident3?"className":"class";o.className=v;try{(v?o.setAttribute(a,v):o.removeAttribute(a))}catch(e){}},appendNodeHTML:function(o,txt){return this.setNodeHTML(o,o.innerHTML+txt)},setNodeHTML:function(o,txt){try{o.innerHTML=txt;return true}catch(e){try{var xml=new DOMParser().parseFromString(txt,"text/xml");if(MOO.getNodeName(xml.documentElement)=='parsererror'){}else{var node=document.importNode(xml.documentElement,true);o.appendChild(node)}}catch(e){}}return false},getNextNode:function(o,same){var n=o;while(n=n.nextSibling){if(!same||n.nodeName==o.nodeName){return n}}},getPrevNode:function(o,same){var n=o;while(n=n.previousSibling){if(!same||n.nodeName==o.nodeName){return n}}},getRChildNode:function(o,type,r,min){if(!min){min=r+1}var n=$T(type,o);return(n.length>=min)?n[n.length-1-r]:null},getMousePos:function(e,n){var br=MOO.getNodeBoundingRect(n);return new point(e.clientX-br.left,e.clientY-br.top)},getDocScroll:function(doc){doc=(doc?doc:document);var w=$W(doc),doce=doc.documentElement,body=doc.body;if("number"==typeof(w.pageYOffset)){return new point(w.pageXOffset,w.pageYOffset)}if(body&&(body.scrollLeft||body.scrollTop)){return new point(body.scrollLeft,body.scrollTop)}if(doce&&(doce.scrollLeft||doce.scrollTop)){return new point(doce.scrollLeft,doce.scrollTop)}return new point(0,0)},strContains:function(src,str){return(src&&(str==src||src.match(new RegExp("(^|\\s)"+str+"(\\s|$)"))))},getRenderMode:function(){var m=document.compatMode;return(m=='BackCompat'?'Quirks':(m=='CSS1Compat'?'Standards Compliance':m))},getCSSMediaType:function(){var o=$("messagesbox");if(o){switch(intval(MOO.getCSSPropertyValue(o,"z-index"))-10000){case 1:return "aural";case 2:return "braille";case 3:return "embossed";case 4:return "handheld";case 5:return "print";case 6:return "projection";case 7:return "screen";case 8:return "tty";case 9:return "tv"}}return "all"},getCSSPropertyValue:function(o,rule){try{var win=$W(o);if(win&&win.getComputedStyle){return win.getComputedStyle(o,"").getPropertyValue(rule)}if(o.currentStyle){return o.currentStyle[rule.replace(/\-(\w)/g,function(strMatch,p1){return p1.toUpperCase()})]}}catch(e){}return null},$C:function(doc,tagname){var p,a=arguments[2],ns=doc.documentElement.namespaceURI,o=((doc.createElementNS&&ns)?doc.createElementNS(ns,tagname.toLowerCase()):doc.createElement(tagname));if(a){extendObjectWith(o,a)}return o},version:function(){return MOO._version.replace(/[^0-9\.]+([0-9\.]+).*/,"$1")}};MOO.msg={box:null,error:function(msg){return this.show(msg,"error")},loading:function(msg){return this.show(msg,"loading")},ok:function(msg){return this.show(msg,"ok",10)},warning:function(msg){this.show(msg,"warning")},show:function(msg,type,close){var n,o;if(o=this.box){n=$C("div",{className:type,innerHTML:msg});Events.add(n,"click",this.close.bind(this));o.appendChild(n);o.style.visibility="visible";if(close){setTimeout(function(){MOO.msg.close(n)},close*1000)}return n}},close:function(n){if(this.box){n=n.currentTarget?n.currentTarget:n;var o=n.parentNode;if(o){try{o.removeChild(n)}catch(e){}if(!o.hasChildNodes()&&o.style){o.style.visibility="hidden"}}}}};MOO.rectangle=function(l,t,r,b){this.top=t;this.right=r;this.bottom=b;this.left=l;this.width=function(){return this.right-this.left};this.height=function(){return this.bottom-this.top};this.contains=function(p){return(p.x>=this.left&&p.x<this.right&&p.y>=this.top&&p.y<this.bottom)}};MOO.Resizer=function(o,w,h,wo,ho){this.obj=o;this.w_obj=wo;this.h_obj=ho;this.min_w=w;this.min_h=h;this.getCursor=function(e,o){var c="";if(o==this.obj){var p=MOO.getMousePos(e,o);if(p.x>=0&&p.x<o.offsetWidth&&p.y>=0&&p.y<o.offsetHeight){if(this.h_obj&&p.y>o.offsetHeight-10){c="s"}if(this.w_obj&&p.x>o.offsetWidth-10){c="e"}if(this.h_obj&&this.w_obj&&p.x>o.offsetWidth-20&&p.y>o.offsetHeight-20){c="se"}}}return c};this.hover=function(e){if(!MOO.mouseOffset){var o=this.obj,s=$B(document).style,c=this.getCursor(e,e.currentTarget);if(c){c+="-resize"}if(c!=o.cursor||c!=s.cursor){s.cursor=o.cursor=c;stripClassName(o,"[se]+\-resize");if(""!=c){addClassName(o,c)}}Events.stop(e)}};this.onmousedown=null;this.mousedown=function(e){if(!this.getCursor(e,e.currentTarget))return;var w=0,h=0,wo=this.w_obj,ho=this.h_obj;if(wo){w=wo.clientWidth-intval(MOO.getCSSPropertyValue(wo,"padding-left"),0)-intval(MOO.getCSSPropertyValue(wo,"padding-right"),0)}if(ho){h=ho.clientHeight-intval(MOO.getCSSPropertyValue(ho,"padding-top"),0)-intval(MOO.getCSSPropertyValue(ho,"padding-bottom"),0)}MOO.mouseOffset=new point(e.pageX-w,e.pageY-h);var d=document;d.old_onmousemove=d.onmousemove;d.old_onmouseup=d.onmouseup;d.onmousemove=this.mousemove.bind(this);d.onmouseup=this.mouseup.bind(this);if(this.onmousedown)this.onmousedown(e);Events.stop(e)};this.onresize=null;this.mousemove=function(e){if(MOO.mouseOffset){e=e||Events.IE2DOM(e,this.obj);var ws=(this.w_obj?this.w_obj:this.obj).style,hs=(this.h_obj?this.h_obj:this.obj).style,s=new point(e.pageX-MOO.mouseOffset.x,e.pageY-MOO.mouseOffset.y),m=this.obj.cursor.replace("-resize","");if(this.onresize)this.onresize(e,s,m);s.x=Math.max(this.min_w,s.x);s.y=Math.max(this.min_h,s.y);switch(m){case "e":ws.width=s.x+"px";break;case "s":hs.height=s.y+"px";break;case "se":hs.height=s.y+"px";ws.width=s.x+"px";break}Events.stop(e)}};this.onmouseup=null;this.mouseup=function(e){if(MOO.mouseOffset){e=e||Events.IE2DOM(e,this.obj);var d=document;d.onmousemove=d.old_onmousemove;d.onmouseup=d.old_onmouseup;$B(d).style.cursor="";MOO.mouseOffset=null;if(this.onmouseup)this.onmouseup(e);Events.stop(e)}};Events.add(o,"mouseout",this.hover,this);Events.add(o,"mousemove",this.hover,this);Events.add(o,"mousedown",this.mousedown,this)};function hasClassName(o,name){var cn=MOO.getNodeClass(o);return(cn&&MOO.strContains(cn,name))}function addClassName(o,name){if(!hasClassName(o,name)){MOO.setNodeClass(o,(o.className?o.className+" ":"")+name)}}function replaceClassName(o,from,to){MOO.setNodeClass(o,(o.className?o.className:"").replace(from,to))}function stripClassName(o,name){var cn=MOO.getNodeClass(o);if(cn){if(isNaN(name)){cn=(name==cn)?"":cn.replace(new RegExp("(^|\\s+)"+name+"(\\s+|$)"),"$2")}else{cn=cn.substr(0,name)}MOO.setNodeClass(o,cn)}}function _(txt){return($LNG[txt]?$LNG[txt]:txt)}function intval(v,def){var i=parseInt(v);if(isNaN(i)){}return(isNaN(i)?(def?def:0):i)}function floatval(v,def){var i=parseFloat(v);if(isNaN(i)){}return(isNaN(i)?(def?def:0):i)}function switch_display(o){if(o=$(o)){o.style.display=("none"==o.style.display)?"":"none"}}function switch_title(obj){obj.title=obj.options[obj.selectedIndex].title}function switch_visibility(o,sender){if(!(o=$(o))){return}if("collapse"==o.style.visibility||"none"==o.style.display){if("collapse"==o.style.visibility){o.style.visibility="visible"}else{o.style.display=""}if(sender){sender.className=sender.className.replace("collapsed","expanded")}}else{try{o.style.visibility="collapse"}catch(e){o.style.display="none"}if(sender){sender.className=sender.className.replace("expanded","collapsed")}}}var onDomLoad={Loaded:null,timer:null,callFn:[],init:function(){if(document.addEventListener){addEvent(document,"DOMContentLoaded",this.callFunctions,this)}if(window.ie){try{document.write("<scr"+'ipt defer src="//:" onreadyStatechange="if(\'complete\'==this.readyState){this.parentNode.removeChild(this);onDomLoad.callFunctions()}"></scr'+"ipt>")}catch(e){}}if(((window.webkit&&window.webkit<525)||window.khtml)&&defined(document.readyState)){this.timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){onDomLoad.callFunctions()}},10)}addEvent(window,"load",this.callFunctions,this)},addEvent:function(fn,o){if(o){fn=fn.bind(o)}return(this.Loaded?fn():this.callFn.push(fn))},callFunctions:function(){if(this.Loaded){return}this.Loaded=true;if(this.timer){clearInterval(this.timer);this.timer=null}var i=-1,fn=this.callFn;while(++i<fn.length){try{fn[i]()}catch(e){}}this.callFn=null}};onDomLoad.init();onDomLoad.addEvent(function(){MOO.init()});if(!window.DOMParser){DOMParser=function(){};DOMParser.prototype.parseFromString=function(str,contentType){var o;if(window.XMLHttpRequest){o=new XMLHttpRequest;if(!contentType){contentType="application/xml"}o.open("GET","data:"+contentType+";charset=utf-8,"+encodeURIComponent(str),false);if(o.overrideMimeType){o.overrideMimeType(contentType)}o.send(null);o=o.responseXML}else if(window.ActiveXObject){o=new ActiveXObject("MSXML.DomDocument");o.async=false;o.loadXML(str)}return o}}function extendWithClass(descendant,target){eval(target.toString().replace(/}\s*$/,descendant.toString().replace(/^[^{]+{/,"")).replace(/^\s*function\s*(.*)\(/,'$1=function(')+";")}function extendWithFunction(descendant,target){eval(target.toString().replace(/}\s*$/,descendant.toString()+'}').replace(/^\s*function\s*(.*)\(/,'$1=function(')+";")}function Ajax(){var cb=null;function getTransport(){try{return new XMLHttpRequest()}catch(e){}try{return new ActiveXObject('Msxml2.request')}catch(e){}try{return new ActiveXObject('Microsoft.request')}catch(e){}return false};this.onStateChange=function(){if(this.request.readyState==4){if(typeof cb=='function')try{cb(this)}catch(e){}stripClassName(document.body,"ajax_loading")}};this.get=function(url,callback){if(!this.request){return false}addClassName(document.body,'ajax_loading');cb=callback;this.request.open('get',url,true);this.request.setRequestHeader('X-Requested-With','XMLHttpRequest');this.request.send(null);return true};this.post=function(url,data,callback){if(!this.request){return false}addClassName(document.body,'ajax_loading');cb=callback;this.request.open('post',url,true);this.request.setRequestHeader('X-Requested-With','XMLHttpRequest');this.request.setRequestHeader('Accept',(document.documentElement.namespaceURI?'application/xhtml+xml':'text/html')+',application/xml;q=0.9,*/*;q=0.8');this.request.setRequestHeader('Content-type','application/x-www-form-urlencoded');this.request.setRequestHeader('Content-Length',data.length);this.request.send(data);return true};this.request=getTransport();if(!this.request){return}this.request.onreadystatechange=this.onStateChange.bind(this)}function menu_display(o){if(hasClassName(o,"collapsed")){stripClassName(o,"collapsed")}else{addClassName(o,"collapsed")}}var main_index_column1;function news_over_img(o){var target=$('main_index_col1'),img=$T('img',o);if(target){if(!defined(typeof(main_index_column1))){main_index_column1=[target.innerHTML,target.style.backgroundImage]}if(img.length)with(target){style.backgroundImage="url("+img[0].src+")";innerHTML=''}}}function news_out_img(o){var target=$('main_index_col1');if(target)with($('main_index_col1')){style.backgroundImage=main_index_column1[1];innerHTML=main_index_column1[0]}}function show_faq_item(item){MOO.setNodeHTML($("container_right_content"),"<h3>"+item.innerHTML+"</h3>"+$T("div",item.parentNode)[0].innerHTML);return false}function contact_form_fill_in(){var i,forms=$T('form',$('contact_form')),f,n,x,y,query=window.location.href.split(/[\?&]+/),$_GET=new Array();for(i=1;i<query.length;++i){n=query[i].split('=');$_GET[n[0]]=decodeURIComponent(n[1].replace(/\+/g,'%20'))}for(i=0;i<forms.length;++i){x=0;f=forms[i];while(n=f.elements[x++]){if(!n.name||!defined($_GET[n.name])){continue}switch(n.type){case "text":case "hidden":case "password":case "textarea":n.value=$_GET[n.name];break;case "radio":case "checkbox":n.checked=true;break;case "select-one":case "select-multiple":if(n.options.length){for(y=0;y<n.options.length;++y){if($_GET[n.name]==n.options[y].value){n.options[y].selected=true}}}break}}}}onDomLoad.addEvent(function(){contact_form_fill_in()});if(document.getElementById){onDomLoad.addEvent(News)}function News(){init();function init(){var next=$("news_next");if(next){addEvent(next,"click",show_next)}}function show_next(e){show_cb(e.currentTarget.href);return stopEvent(e)}function show_cb(ajax){var z,li=ajax.li,n;if(ajax.request.status==200){for(z=0;z<li.childNodes.length;++z){n=li.childNodes[z];if("div"==MOO.getNodeName(n)&&hasClassName(n,"news_next")){if(MOO.setNodeHTML(n,ajax.request.responseText)){stripClassName(li,"ajax")}break}}}else{MOO.msg.error(ajax.request.responseText)}delete li.ajax;li.ajax=null}}var submitform={msg:null,http:null,btn:null,now:function(e,submit_msg){return submitform.submit(e,submit_msg)},callback:function(ajax){return submitform.check_cb(ajax.request)},submit:function(e,msg){var f=e.target,data="",n,x=0,y,changed=false;if(this.http||!f||"form"!=MOO.getNodeName(f)){this.btn=null;return stopEvent(e)}if(!msg){msg=f.title?f.title:_("Submitting")}while(n=f.elements[x++]){if(!n.name){continue}switch(n.type){case "text":case "select-one":case "hidden":case "password":case "textarea":if(n.defaultValue!=n.value){changed=true}data=data.addQueryParam(n.name,n.value);break;case "radio":case "checkbox":if(n.defaultChecked!=n.checked){changed=true}if(n.checked){data=data.addQueryParam(n.name,n.value)}break;case "select-multiple":if(n.options.length){for(y=0;y<n.options.length;++y){changed=(changed||!n.oldselected||n.oldselected[y]!=n.options[y].selected);if(n.options[y].selected){data=data.addQueryParam(n.name,n.options[y].value)}}}break;case "file":if(n.value){MOO.msg.loading(msg);return true}}}if(!changed){MOO.msg.warning(_("Nothing changed"));this.btn=null;return stopEvent(e)}if(this.btn){data=data.addQueryParam(this.btn.name,"");this.btn=null}this.enable_btns(f,false);this.http=new Ajax();this.http.msgbox=MOO.msg.loading(msg);this.http.msgbox.form=f;if(!f.action){f.action=document.location.href}if(this.http.post(f.action,data,this.callback)){return stopEvent(e)}this.enable(f);return true},enable:function(f){MOO.msg.close(this.http.msgbox);delete this.http;this.http=null;this.enable_btns(f,true)},check_cb:function(request){var f=this.http.msgbox.form;this.enable(f);if(typeof(this.onComplete)!="function"||!this.onComplete(request)){switch(request.status){case 200:this.store_values(f);this.msg=MOO.msg.ok(request.responseText);break;case 201:f.reset();if(request.getResponseHeader("location")){self.location.href=request.getResponseHeader("location")}break;case 202:f.reset();self.location.reload(true);break;case 205:f.reset();this.msg=MOO.msg.ok(request.responseText);break;case 302:case 303:case 307:if(request.getResponseHeader("location")){self.location.href=request.getResponseHeader("location");break}case 304:case 400:this.msg=MOO.msg.error(request.responseText);break;default:this.msg=MOO.msg.error(request.status+':'+_("Submit failed"));break}}this.onComplete=null},store_values:function(f){var n,x=0,y;while(n=f.elements[x++]){switch(n.type){case "text":case "select-one":case "hidden":case "password":case "textarea":n.defaultValue=n.value;break;case "radio":case "checkbox":n.defaultChecked=n.checked;break;case "select-multiple":if(!n.options.length){continue}n.oldselected=new Array();for(y=0;y<n.options.length;++y){n.oldselected[y]=n.options[y].selected}break}}},enable_btns:function(f,enable){var n,x=0;while(n=f.elements[x++]){if("submit"==n.type){n.disabled=(enable!=true)}}},btn_click:function(e){submitform.btn=e.currentTarget},init:function(){var i=-1,x,s,forms=MOO.getElementsByClassName("async","form");while(forms[++i]){submitform.store_values(forms[i]);forms[i].onsubmit=null;addEvent(forms[i],"submit",submitform.now);s=$T("button",forms[i]);x=-1;while(s[++x]){if("reset"!=s[x].type){addEvent(s[x],"click",submitform.btn_click)}}s=MOO.getFormInputsByType("submit",forms[i]);x=-1;while(s[++x]){addEvent(s[x],"click",submitform.btn_click)}}}};onDomLoad.addEvent(submitform.init);function do_login(e){if(!e.target){e=Events.IE2DOM(e,this)}submitform.onComplete=function(request){if(request.status!=202){submitform.msg=MOO.msg.error(request.responseText)}return(request.status!=202)};return submitform.now(e)}MOO.Flash=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,regObjArr=[],objIdArr=[],script,storedAltContent=null,storedAltContentId=null,isExpressInstallActive=false, ua=function(){var playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=intval(d.replace(/^(.*)\..*$/,"$1"));playerVersion[1]=intval(d.replace(/^.*\.(.*)\s.*$/,"$1"));playerVersion[2]=/r/.test(d)?intval(d.replace(/^.*r(.*)$/,"$1")):0}}else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[intval(d[0]),intval(d[1]),intval(d[2])]}}catch(e){}}}return{pv:playerVersion,webkit:(window.webkit?parseFloat(nav.userAgent.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false),ie:!!(window.ie),win:!!(window.win),mac:!!(window.mac)}}();function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=$(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=$T(OBJECT,obj)[0];if(nestedObj){var e=$C("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressInstall(regObj){isExpressInstallActive=true;var obj=$(regObj.id);if(obj){if(regObj.altContentId){var ac=$(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent=abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&intval(regObj.width)<310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&intval(regObj.height)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+"-Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=$C("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addEvent(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=$C("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj)};addEvent(win,"onload",fn)}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=$C("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj=$T(OBJECT,obj)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return ac}function createSWF(attObj,parObj,id){var r,el=$(id);if(el){if(typeof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i]}else if(i.toLowerCase()=="className"){att+=' class="'+attObj[i]+'"'}else if(i.toLowerCase()!="classid"){att+=' '+i+'="'+attObj[i]+'"'}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';objIdArr[objIdArr.length]=attObj.id;r=$(attObj.id)}else if(ua.webkit&&ua.webkit<312){var e=$C("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else if(k.toLowerCase()=="className"){e.setAttribute("class",attObj[k])}else if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=$C(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="className"){o.setAttribute("class",attObj[m])}else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}return r}function createObjParam(el,pName,pValue){var p=$C("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=$(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=$(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=intval(v[0]);v[1]=intval(v[1]);v[2]=intval(v[2]);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=$T("head",doc)[0],s=$C("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+"{"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(onDomLoad.Loaded&&$(id)){$(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in MOO.Flash){MOO.Flash[l]=null}MOO.Flash=null})}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!objectIdStr||!swfVersionStr){return}var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null,o=$(objectIdStr),n;if(o){n=$T(OBJECT,o)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}else if(typeof n.SetVariable!=UNDEF){r=n}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}xiSwfUrlStr=MOO.PATH+'media/flash/expressInstall.swf';widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(flashvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}onDomLoad.addEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}});return true}else if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){isExpressInstallActive=true;setVisibility(replaceElemIdStr,false);onDomLoad.addEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)});return true}},loadSWF:function(){var i=-1,o,vars,objects=MOO.getElementsByClassName("flash","a"),par={wmode:'transparent',allowScriptAccess:'always'};while(o=objects[++i]){try{eval("vars={"+o.title+"};");if(!o.id){o.id=o.href.replace(/[^a-zA-Z0-9]+/g,"-")}if(/youtube.*fs=1/.test(o.href)){par.allowFullScreen="true"}if(!this.embedSWF(o.href,o.id,o.style.width,o.style.height,'8.0.22',null,vars,par)){o.href="http://get.adobe.com/flashplayer/"}}catch(e){}}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){return createSWF(attObj,parObj,replaceElemIdStr)},removeSWF:function(objElemIdStr){removeSWF(objElemIdStr)},createCSS:function(sel,decl){createCSS(sel,decl)},getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}return ""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=$(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();onDomLoad.addEvent(function(){MOO.Flash.loadSWF()});var WYSIWYG_VALUE_PROMPT=1, WYSIWYG_VALUE_FUNCTION=2;function WYSIWYG(){if(!document.getElementById||!(document.designMode||defined($B(document).contentEditable))){return}var WYSIWYG_MIN_HEIGHT=100, WYSIWYG_MIN_WIDTH=320, WYSIWYG_CE_MODE=false, colors=new Array("FCC","FFC","CFC","CFF","CCF","FCF","","F88","FF8","8F8","8FF","88F","F8F","FFF","F44","FF4","4F4","4FF","44F","F4F","CCC","F00","FF0","0F0","0FF","00F","F0F","999","C00","CC0","0C0","0CC","00C","C0C","666","800","880","080","088","008","808","333","400","440","040","044","004","404","000"), smilies=new Array(['smile',':)'],['biggrin',':D'],['wink',';)'],['',''],['cool','B)'],['razz',':p'],['surprised',':o'],['kiss',':x'],['redface',':">'],['holy','o:)'],['mad','x('],['sad',':('],['cry',':\'('],['confused',':/'],['quiet',':$'],['worried',':s']);this.init=function(){(arguments[0]?createControl(arguments[0]):createControls());if($T("FRAMESET",top.document).length){try{self.document.close();top.document.close()}catch(e){setTimeout(function(){top.stop()},5000)}}wysiwyg_elementMap.push([new RegExp('="'+MOO.PATH+"inc/","g"),'="inc/'])};function createControls(){var i=-1,n,textareas=MOO.getElementsByClassName("wysiwyg","textarea");while(textareas[++i]){n=textareas[i].form;createControl(textareas[i]);if(n&&!n.wysiAttached){n.wysiAttached=Events.addBeforeSubmit(n,wysiwygSubmit)}}}function getSel(win){return win.getSelection?win.getSelection():win.document.selection}function getRng(win){var s=getSel(win),r,doc=win.document;try{if(s){r=s.rangeCount>0?s.getRangeAt(0):(s.createRange?s.createRange():doc.createRange())}}catch(e){}if(!r){r=window.ie?doc.body.createTextRange():doc.createRange()}return r}function getNode(win,store){if(!win){win=window}var t=this,r=getRng(win),s=getSel(win),e;if(!window.ie){if(!r){return $B(win.document)}e=r.commonAncestorContainer;if(!r.collapsed){if(window.webkit&&s.anchorNode&&s.anchorNode.nodeType==1)return s.anchorNode.childNodes[s.anchorOffset];if(r.startContainer==r.endContainer){if(r.startOffset-r.endOffset<2){if(r.startContainer.hasChildNodes())e=r.startContainer.childNodes[r.startOffset]}}}while(e&&e.nodeType!=1){e=e.parentNode}return e}else if(store){win.sel_range=r}return r.item?r.item(0):r.parentElement()}function onNodePath(e){setNodePath(e.currentTarget,true)}function setNodePath(o,store){var path='',n=getNode($W(o),store),tag,w=o.wysiwyg,i=0,btn,btns=w.buttons,css,cn;while(btn=btns[i++]){if(btn.commandValue!=WYSIWYG_VALUE_FUNCTION)stripClassName(btn,"active")}if(n){tag=MOO.getNodeName(n);while(n&&n!=o&&'body'!=tag){i=0;cn=tag;css=n.style.cssText;if(css){if(css.indexOf('bold')>0){cn+="|strong"}if(css.indexOf('italic')>0){cn+="|em"}}cn="("+cn+")";while(btn=btns[i++]){if(hasClassName(btn,cn)){addClassName(btn,"active")}}if(n.href){tag+="="+n.href+""}path='/'+tag+path;n=n.parentNode;tag=MOO.getNodeName(n)}}MOO.setNodeHTML(w.statusbar,path)}function loadWysiwyg(e){var o=e.currentTarget;initWysiwygCtrl($Doc(o),o.wysiwyg)}function loadCodePress(e){var o=e.currentTarget,w=o.wysiwyg;w.CodePress=$Doc(o).CodePress;w.CodePress.setCode("html",w.textarea.value)}function initWysiwygCtrl(o,w){o.wysiwyg=w;wysiwygUpdate(w);activateDesignMode(o)}function reactivateDesignMode(e){activateDesignMode(e.currentTarget)}function activateDesignMode(o){try{var n=(9==o.nodeType)?$B(o):o;removeEvent(o,"mousedown",reactivateDesignMode);addEvent(o,"mouseup",onNodePath);addEvent(o,"keydown",onNodePath);addEvent(o,"keyup",onNodePath);if(defined(o.contentEditable)){o.contentEditable='true'}else{$D(o).designMode="on"}if(window.opera){addEvent(o,"mouseup",onNodePath);addEvent(o,"keydown",onNodePath);addEvent(o,"keyup",onNodePath)}}catch(e){addEvent(o,"mousedown",reactivateDesignMode)}}function wr_mousemove(e){return e.currentTarget.wysiwyg.resizer.mousemove(e)}function wr_mouseup(e){return e.currentTarget.wysiwyg.resizer.mouseup(e)}function wr_mouse(e){var d=$Doc(currentCtrl(this.obj)),f=("mousedown"==e.type)?addEvent:removeEvent;f(d,"mousemove",wr_mousemove);f(d,"mouseup",wr_mouseup)}function wr_onresize(e,s){if(e.currentTarget==$Doc(currentCtrl(this.obj))){s.x=e.pageX;s.y=e.pageY}}function createControl(textarea){var o,tw=Math.max(textarea.offsetWidth,WYSIWYG_MIN_WIDTH),th=Math.max(textarea.offsetHeight,WYSIWYG_MIN_HEIGHT,intval(MOO.getCSSPropertyValue(textarea,"height"))),w=$C("fieldset",{className:"wysiwyg",syntax:null,textarea:textarea});createToolbars(w);o=w.ctrl=$C("div",{className:"iframes"});o.style.height=th+"px";w.appendChild(o);w.resizer=new MOO.Resizer(w,WYSIWYG_MIN_WIDTH,WYSIWYG_MIN_HEIGHT,w,o);if(WYSIWYG_CE_MODE&&o.contentEditable&&(!window.ie||window.ie>6)){o=w.content=$C("div",{className:"editable"});initWysiwygCtrl(o,w)}else{o=w.content=$C("iframe",{wysiwyg:w/*,src:MOO.JS_PATH+"wysiwyg.html?tpl="+MOO.TPL*/});addEvent(o,"load",loadWysiwyg);with(w.resizer){onmousedown=wr_mouse;onmouseup=wr_mouse;onresize=wr_onresize}}w.ctrl.appendChild(o);textarea.style.display="none";textarea.className="";textarea.wysiwyg=w;textarea.parentNode.replaceChild(w,textarea);w.ctrl.appendChild(textarea);w.appendChild(w.statusbar=$C("div",{className:"toolbar statusbar"}));write_iframe(o,MOO.CSS_PATH+'style;tabs;wysiwyg_base.css',null)}function createToolbars(w){w.buttons=[];var tb,bar=-1,i=-1,btn,tbtn;while(tbtn=wysiwyg_toolbarButtons[++i]){if(window.ie&&window.ie<7&&"togglesize"==tbtn[5]){continue}btn=null;if(tbtn.length>=3){btn=w.buttons[++bar]=createButton(w,tbtn)}else if("div"==tbtn[0]){btn=$C("div",{className:"divider"})}else if(tb){clearFloats(tb);w.appendChild(tb)}if(!tb||!btn){tb=$C("div",{className:"toolbar toolbar"+bar})}if(btn)tb.appendChild(btn)}clearFloats(tb);w.appendChild(tb)}function createButton(wysiwyg,tbtn){var btn=$C("button",{command:tbtn[0],type:"button"});btn.appendChild(document.createTextNode(tbtn[1]));addEvent(btn,"click",execCommand);if(tbtn[2])btn.commandValue=tbtn[2];if(tbtn[3])btn.title=tbtn[3];if(tbtn[4])btn.className=tbtn[4];btn.param1=tbtn[5]||"";btn.param2=tbtn[6]||"";btn.wysiwyg=wysiwyg;addEvent(btn,"mouseover",function(o){o=o.currentTarget;MOO.setNodeHTML(o.wysiwyg.statusbar,o.title)});addEvent(btn,"mouseout",function(o){o=o.currentTarget.wysiwyg.content;setNodePath($Doc(o)||o)});return btn}this.choose_color=function(btn){var o,i,w=btn.wysiwyg,pop=w.clrp;if(!pop){w.clrp=pop=this.newPopup(w,"colorpalette");for(i=0;i<colors.length;++i){o=$C("div");if(i==6){o.innerHTML="X"}else{o.value="#"+colors[i];o.style.backgroundColor="#"+colors[i];o.onmouseover=function(){this.style.borderColor=this.style.backgroundColor};o.onmouseout=function(){this.style.cssText="background-color:"+this.style.backgroundColor}}addPopupClick(o);pop.appendChild(o)}}this.popupDiv(btn,w,pop,btn.command)};this.choose_smiley=function(btn){var o,i,w=btn.wysiwyg,pop=w.smilies,img;if(!pop){w.smilies=pop=this.newPopup(w,"smilies");for(i=0;i<smilies.length;++i){o=$C("div",{title:smilies[i][1]});if(i==3){o.innerHTML="X"}else{o.className=smilies[i][0];o.value='<img src="'+MOO.PATH+'tpl/'+MOO.TPL+'/images/smilies/'+smilies[i][0]+'.png" alt="'+smilies[i][1]+'" title="'+smilies[i][1]+'"/>'}addPopupClick(o);pop.appendChild(o)}}this.popupDiv(btn,w,pop,btn.command)};this.newPopup=function(w,cn){var n=$C("div",{className:cn||"popup",style:{display:"none"}});return w.appendChild(n)};this.popupDiv=function(btn,w,n,cmd){var br=MOO.getNodeBoundingRect(btn,btn.offsetParent),v="block";if(n.btn)stripClassName(n.btn,"active");if("none"!=n.style.display&&n.command==cmd)v="none";n.btn=btn;n.command=cmd;n.wysiwyg=w;with(n.style){left=br.left+"px";top=br.bottom+"px";display=v}if("block"==v){addClassName(btn,"active")}};this.runCommand=function(cmd,value,w){runCommand(cmd,value,w)};function addPopupClick(n){n.onclick=function(){var o=this.parentNode;o.style.display="none";stripClassName(o.btn,"active");runCommand(o.command,this.value,o.wysiwyg)}}function clearFloats(tb){var br=tb.appendChild($C("div"));br.style.clear="both"}function execCommand(e){var o=e.currentTarget,w=o.wysiwyg,value=null,cmd=o.command;stopEvent(e);o.blur();switch(o.commandValue){case WYSIWYG_VALUE_PROMPT:if("createlink"==cmd&&hasClassName(o,"active")){cmd="unlink"}else value=prompt(o.param1,o.param2);break;case WYSIWYG_VALUE_FUNCTION:try{if("function"==typeof o.param1){o.param1(o)}else if("function"==typeof MOO.WYSIWYG[o.param1]){MOO.WYSIWYG[o.param1](o)}else{eval(o.param1+"(o);")}}catch(e){}return;default:value=o.commandValue}runCommand(cmd,value,w)}function runCommand(cmd,value,w){focus(w);if(cmd){if("inserthtml"==cmd){value=value+"<br/>"}if((!value||''==value)&&/^(inserthtml|formatblock|forecolor|backcolor|createlink|insertimage)$/.test(cmd))return;if(value){if("backcolor"==cmd&&(window.opera||window.gecko)){cmd="hilitecolor"}if(window.ie){if("backcolor"==cmd||"forecolor"==cmd){value=value.replace(/^#([0-9A-Z])([0-9A-Z])([0-9A-Z])$/gi,'#$1$1$2$2$3$3')}if("inserthtml"==cmd){if(w.content.selection){w.content.selection.pasteHTML(value)}return}}}try{($Doc(w.content)||$D(w.content)).execCommand(cmd,false,value)}catch(e){}setNodePath($Doc(w.content)||w.content)}}function currentCtrl(w){var c=w.syntax;return(c&&"none"!=c.style.display)?c:w.content}function focus(w){var c=currentCtrl(w);(c.contentWindow||c).focus();if(c.selection){c.selection.select()}}function toggleView(btn){var w=btn.wysiwyg,txt=btn.firstChild,content=w.content,syntax=w.syntax,css=content.style;if(syntax!=currentCtrl(w)){btn.className="Page";btn.htmlTitle=txt.data;txt.data=btn.param2;textareaUpdate(w);css.display="none";if(((!window.find&&!$B(document).createTextRange)||window.opera)&&!window.opera95){syntax=btn.wysiwyg.syntax=w.textarea;syntax.style.display="block"}else if(!syntax){syntax=btn.wysiwyg.syntax=$C("iframe",{wysiwyg:w/*,src:MOO.JS_PATH+"codepress.html?tpl="+MOO.TPL*/});addEvent(syntax,"load",loadCodePress);w.ctrl.appendChild(syntax);write_iframe(syntax,MOO.CSS_PATH+'syntaxhighlight;wysiwyg_code.css',MOO.JS_PATH+'codepress;syntaxhighlight.js')}else{syntax.style.display="block";w.CodePress.setCode("html",w.textarea.value)}}else{txt.data=btn.htmlTitle;btn.className="PageCode";if(w.CodePress)w.textarea.value=w.CodePress.getCode().trim();syntax.style.display="none";css.display="block";wysiwygUpdate(w)}setButtonsActivation(w,"block"==css.display)}function toggleSize(btn){var w=btn.wysiwyg,f=w.ctrl,txt=btn.firstChild,tb=f.previousSibling;focus(w);if(hasClassName(w,"wysiwyg_maximized")){$B(w).parentNode.style.overflow="auto";txt.data=btn.maximizeTitle;f.style.cssText="";stripClassName(w,"wysiwyg_maximized");w.style.width=w.oldwidth;f.style.height=w.oldheight;stripClassName($B(w),"wysiwyg_is_maximized")}else{$B(w).parentNode.style.overflow="hidden";btn.maximizeTitle=txt.data;txt.data=btn.param2;w.oldwidth=w.style.width;w.oldheight=f.style.height;addClassName($B(w),"wysiwyg_is_maximized");w.style.width="";f.style.cssText="top:"+(tb.offsetTop+tb.offsetHeight)+"px";addClassName(w,"wysiwyg_maximized")}}function setButtonsActivation(w,active){var i=0,btn;while(btn=w.buttons[i++]){if("toggleView"!=btn.param1&&"toggleSize"!=btn.param1){if(active){if(btn.oldClick){btn.onclick=btn.oldClick}stripClassName(btn,"disabled")}else{btn.oldClick=btn.onclick;btn.onclick=null;addClassName(btn,"disabled")}}}}function textareaUpdate(w){var i=-1,c=w.content,html=($Doc(c)?$B($Doc(c)):c).innerHTML;while(wysiwyg_elementMap[++i]){html=html.replace(wysiwyg_elementMap[i][0],wysiwyg_elementMap[i][1])}w.textarea.value=html.trim()}function wysiwygUpdate(w){var n=w.content;if("iframe"==MOO.getNodeName(n)){n=$B($Doc(n));if(!n){return setTimeout(function(){wysiwygUpdate(w)},1)}$W(n).wysiwyg=w}var txt=w.textarea.value.trim().replace(/="inc\//g,'="'+MOO.PATH+"inc/").replace("{BASE_PATH}",MOO.PATH);MOO.setNodeHTML(n,txt+"\n");if(window.ie){n.onblur=function(){var r=getRng(this);this.sel_range=w.content.selection=(r.boundingWidth?r:this.sel_range)}}}function wysiwygSubmit(e){var i=0,n,divs=MOO.getElementsByClassName("wysiwyg","fieldset",e.currentTarget);while(n=divs[i++]){if(n.syntax!=currentCtrl(n)){textareaUpdate(n)}else if(n.CodePress){n.textarea.value=n.CodePress.getCode().trim()}}}function write_iframe(iframe,css,js){var doc=$Doc(iframe),id=iframe.wysiwyg.textarea.id,html='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head></head><body id="'+(id?id:'content')+'" class="wysiwyg"></body></html>';if(defined(document.all)){if(css){html=html.replace('</head>','<link type="text/css" href="'+css+'" rel="stylesheet" media="screen"></head>')}if(js){html=html.replace('</head>','<script type="text/javascript" src="'+js+'"></script></head>')}}doc.open();doc.write(html);doc.close();if(!defined(document.all)){var head=$T("head",doc)[0];if(css){head.appendChild(MOO.$C(doc,"link",{rel:"stylesheet",type:"text/css",href:css}))}if(js){head.appendChild(MOO.$C(doc,"script",{type:"text/javascript",src:js}))}}}}if(!wysiwyg_toolbarButtons){var wysiwyg_toolbarButtons=new Array([null,_("Maximize"),WYSIWYG_VALUE_FUNCTION,_("Switch size"),"Maximize","toggleSize",_("Normalize")],[null,_("Source"),WYSIWYG_VALUE_FUNCTION,_("Switch views"),"PageCode","toggleView",_("Compose")],["bold",_("Strong"),null,_("Give text strength"),"strong"],["italic",_("Emphasis"),null,_("Give text emphasis"),"em"],["div"],["JustifyLeft",_("Align Left"),null,_("Align left"),"JustifyLeft"],["JustifyCenter",_("Align Center"),null,_("Align center"),"JustifyCenter"],["JustifyRight",_("Align Right"),null,_("Align right"),"JustifyRight"],["JustifyFull",_("Justify"),null,_("Justify"),"JustifyFull"],["div"],["formatblock",_("Heading 1"),"<H1>",_("Make top level heading"),"h1"],["formatblock",_("Heading 2"),"<H2>",_("Make 2nd level heading"),"h2"],["formatblock",_("Heading 3"),"<H3>",_("Make 3rd level heading"),"h3"],["div"],["formatblock",_("Paragraph"),"<P>",_("Make a paragraph"),"p"],["formatblock",_("Monospace"),"<PRE>",_("Make paragraph monospaced text"),"pre"],["div"],["subscript",_("Subscript"),null,_("Set as subscript"),"sub"],["superscript",_("Superscript"),null,_("Set as superscript"),"sup"],["div"],["undo",_("Undo"),null,_("Undo"),"Undo"],["redo",_("Redo"),null,_("Redo"),"Redo"],["div"],["insertunorderedlist",_("List"),null,_("Make an unordered list"),"ul"],["insertorderedlist",_("Ordered List"),null,_("Make an ordered list"),"ol"],["div"],["createlink",_("Link"),WYSIWYG_VALUE_PROMPT,_("Create a hyperlink"),"a",_("Enter the URL:"),"http://"],["insertimage",_("Image"),WYSIWYG_VALUE_PROMPT,_("Insert an image"),"img",_("Enter the URL of the image:"),"http://"],["div"],["forecolor",_("Color"),WYSIWYG_VALUE_FUNCTION,_("Text color"),"Color","choose_color"],["backcolor",_("Back color"),WYSIWYG_VALUE_FUNCTION,_("Background color"),"BackColor","choose_color"],["div"],["inserthtml",_("Fieldset"),"\n<fieldset><legend>title</legend><br/></fieldset>\n",_("Insert a fieldset"),"fieldset"],["inserthorizontalrule",_("Rule"),null,_("Insert horizontal rule"),"hr"])}if(!wysiwyg_elementMap){var wysiwyg_elementMap=new Array([/(<[\/A-Z0-9]+)/gim,function(d,tag){return tag.toLowerCase()}],[/<head>.*?<\/head>/gm,''],[/<\/?(html|head|body|link|meta)[^>]*>/gm,''],[/\s+(xmlns="|class="apple|_moz_dirty=")[^"]*"/gi,''],[/\s*(font(-[a-z]+)?:[^;]*;|<title>[^<]*<\/title>|align="[^"]*")/gi,''],[/<!--\[((?:(?!-->).)*)\]-->/g,''],[/<\/?(xml|[^\s"'>]+:)[^>]*>/g,''],[/mso-[^;]+;/g,''],[/\s+class="Mso[a-z]+"/gi,''],[/(<\/?)font/g,'$1span'],[/text-decoration:\s*underline;/gm,''],[/<([^>]+)>/gm,function(d,tag){return '<'+tag.replace(/(\s[a-z-]+)\s*=\s*([^"'\s>]+)/gmi,'$1="$2"')+'>'}],[/"[\t]*([^"=\r\n><]+)[\t]*"/gm,'"$1"'],[/<([^>]+)color="(#[A-F0-9]+)"/gi,'<$1style="color:$2"'],[/<([^>]+)background-color="(#[A-F0-9]+)"/gi,'<$1style="background-color:$2"'],[/(<\/?)b([^a-z][^>]*)/gm,'$1strong$2'],[/(<\/?)i([^a-z][^>]*)/gm,'$1em$2'],[/(<\/?)s([^a-z][^>]*)/gm,'$1strike$2'],[/style="\s*"/g,''],[/<hr[^>]*>/g,'<hr/>'],[/<(br|img|input|area)([^>]*)>/g,'<$1$2/>'],[/[\s+\/]+>/g,'/>'],[/<br[^>]+>(\s*<\/?([uo]l|p|div|code|samp|pre|li))/,'$1'],[/(<br[^>]*>[\r\n]*)+$/,''],[/(<code[^>]*>.*<\/code>)/gm,function(d,str){return str.replace(/<br[^>]*>/gmi,'\n')}],[/\r/g,''])}MOO.WYSIWYG=new WYSIWYG();onDomLoad.addEvent(function(){MOO.WYSIWYG.init()});