/*  JS Resource: cms/js/cms-include.js  */

if(typeof cmsinclude=='undefined'){cmsinclude=true;if(typeof cms=='undefined'){cms={};}
cms.getBaseURL=function(){return window.location.protocol +"//" +window.location.host;};cms_js_includes=[];cms_js_includes_pop=false;__ci_createElement=function(tag){var ns,de=document.documentElement;ns=(de?de.namespaceURI:false);if(ns){return document.createElementNS(ns,tag);}
else{return document.createElement(tag);}};__ci_getAjaxTransport=function(){if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}else{try{return new XMLHttpRequest();}catch(e){}}
return null;};cms.populateJSIncludes=function(){cms_js_includes_pop=true;var h,script,asl=document.scripts;if(!asl){asl=document.getElementsByTagName("script");}
for(h=0;h<asl.length;h++){script=asl[h];script.loaded=true;cms_js_includes.push(script);}
if(window.detachEvent){window.detachEvent("onload",cms.populateJSIncludes);}else{window.removeEventListener("load",cms.populateJSIncludes,true);}};if(window.attachEvent){window.attachEvent("onload",cms.populateJSIncludes);}else{window.addEventListener("load",cms.populateJSIncludes,true);}
cms.addJSInclude=function(url){var i,found=false;for(i=0;i<cms_js_includes.length;i++){if(cms_js_includes[i].src==url){found=true;break;}}
if(!found){var script=__ci_createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",url);script.loaded=true;cms_js_includes.push(script);}};cms.includeJS=function(url,allowDuplicates){var src,h,bound,allowDups=(allowDuplicates=='true')||allowDuplicates===true||false;var rx=/(https?:)?\/\/[A-Za-z0-9.\-]+(:[0-9]+)?/;if(!allowDups){var curl=url.replace(rx,'');var js_list=(cms_js_includes_pop?cms_js_includes:document.getElementsByTagName("script"));for(h=0;h<js_list.length;h++){var script=js_list[h];if(!script.src){continue;}
src=script.src;src=src.replace(rx,'');if(src==url||('/' +src)==curl){return script;}}}
var external,ajax,scr=__ci_createElement("script");scr.setAttribute("type","text/javascript");scr.setAttribute("src",url);cms_js_includes.push(scr);scr.loaded=false;external=rx.test(url)&&(url.indexOf(location.protocol.replace(/:$/,'') +'://' +location.hostname)!=0);ajax=__ci_getAjaxTransport();if(ajax&&!external){ajax.open("GET",scr.src,false);try{ajax.send('');if(ajax.status==200||ajax.status===0){if(typeof execScript!='undefined'){execScript(ajax.responseText,"JavaScript");}
else{window.eval(ajax.responseText);}
scr.loaded=true;}}catch(e){if(typeof console!='undefined'){console.error("Unable to load and parse javascript: " +scr.src +"\n" +e.stackTrace);}}}
if(!scr.loaded){var head=document.getElementsByTagName("head");if(head==null||head.length==0)head=document;else head=head[0];head.appendChild(scr);scr.loaded=true;}
return scr;};cms.includeCSS=function(url,type,mediaType){var p=location.protocol,head,rel="stylesheet",media="all";if(p.indexOf(':')!=null)p=p.replace(':','');if(url.indexOf('//')==0)
url=p +':' +url;if(type){rel=type.toLowerCase();}
if(mediaType){media=mediaType;}
head=document.getElementsByTagName("head");if(head==null||head.length==0)head=document;else head=head[0];var base=cms.getBaseURL();var allCSS=[],h,el,src;el=document.getElementsByTagName("link")
for(h=0;h<el.length;h++){allCSS.push(el[h])}
for(h=0;h<allCSS.length;h++){el=allCSS[h];if(!el.href||!el.rel){continue;}
src=el.href;if(src.indexOf(base)===0){src=src.substring(base.length);}
if(el.rel.toLowerCase()==rel&&(src==url||('/'+src)==url)){return el;}}
var link=__ci_createElement("link");link.setAttribute("rel",rel);link.setAttribute("type","text/css");link.setAttribute("href",url);link.setAttribute("media",media);head.appendChild(link);return link;};}
/*  JS Resource: lib/i2rd-util.js  */

if(typeof __i2rd_initted=='undefined'){__i2rd_initted=true;if(!Array.prototype.push){Array.prototype.push=function(i){if(i){this[this.length]=i;}};}
if(!Array.prototype.pop){Array.prototype.pop=function(){if(this.length==0){return;}
var i,n=this.length -1;i=this[n];delete this[n];this.length=n;return i;};}
Array.prototype.pushAll=function(list){for(var h=0,hb=list.length;h<hb;h++)this.push(list[h]);};if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};}
if(typeof __i2rd_domupdate_event=='undefined'){__i2rd_domupdate_event="dom:update";__i2rd_domupdate_handlers=[];__i2rd_domupdate_fire=function(element,e){var i,h,a=[];if(e){a.push(e);}
for(i=0;(h=__i2rd_domupdate_handlers[i]);i++){try{h.apply(element,a);}catch(e){}}};}
log4js={_log:function(msg,e){if(typeof console!='undefined'&&console.log){console.log(msg);if(e)console.log(e);}}};log4js.logger={log:log4js._log,debug:log4js._log,info:log4js._log,warn:log4js._log,error:log4js._log};if(typeof i2rd=='undefined'){window.i2rd={};}
i2rd.isIE=!+'\v1';i2rd.getConfigMap=function(el){if(typeof el=='string')el=document.getElementById(el);if(!el)return{};var e=el.childNodes,b={},n=0,mx=e.length;for(;n<mx;n++)b[e[n].className]=e[n].innerHTML;return b;};i2rd.xmlToString=function(xml){var str='',ib,i=0,cn;if(typeof xml!='string'){cn=xml.childNodes;if(xml.xml){for(ib=cn.length;i<ib;i++){str+=cn[i].xml;}}else{var xs=new XMLSerializer();for(ib=cn.length;i<ib;i++){str+=xs.serializeToString(cn[i]);}}}else{str=xml;}
return str;};i2rd.scriptRX=/<script[^>]*>([\S\s]*?)<\/script>/gim;i2rd.stripScripts=function(h){return{html:h.replace(i2rd.scriptRX,''),scripts:(function(){try{i2rd.scriptRX.lastIndex=0;}catch(e){}
var m=[],i,arr;while((arr=i2rd.scriptRX.exec(h))){if(arr[1]){m[m.length]=arr[1].replace(/^\s*<!\[CDATA\[/,'').replace(/\]\]>\s*$/,'');}}
return m;})(),addScripts:function(){var e,t,i,s=this.scripts,h=document.getElementsByTagName("head")[0];if(!s||s.length<1)return;for(i=0;t=s[i];i++){e=document.createElement("script");e.setAttribute("type","text/javascript");e.text=t;h.appendChild((s[i]=e));}
setTimeout(function(){for(var i=0;i<s.length;i++)h.removeChild(s[i]);},30000);}};};i2rd.acopy=function(s,sp,d){var i=sp;for(;i<s.length;i++)d.push(s[i]);return d;}
i2rd._dl='dom:loaded';i2rd.w3cevt=!!document.addEventListener;i2rd.ieevt=!!document.attachEvent;i2rd.addEvent=function(el,type,handler){if(type==__i2rd_domupdate_event){__i2rd_domupdate_handlers.push(handler);}else if(type==i2rd._dl&&i2rd.rdy){handler.call(el,i2rd.createEvent('HTMLEvents',i2rd._dl,false,false));}else if(i2rd.w3cevt){el.addEventListener(type,handler,false);}else{if(!handler.$$guid){handler.$$guid=i2rd.addEvent_guid++;}
if(!el.events){el.events={};}
var handlers=el.events[type];if(!handlers){handlers=el.events[type]={};if(el["on" +type]){handlers[0]=el["on" +type];}}
handlers[handler.$$guid]=handler;el["on" +type]=i2rd.handleEvent;}};i2rd.createEvent=function(module,type){var d=document,a=i2rd.acopy(arguments,2,[type]);if(i2rd.w3cevt){d=d.createEvent(module);d['init'+module.replace(/(HTML)?([A-Z][a-z]*vent)s?/,'$2')].apply(d,a);return d;}else if(i2rd.ieevt){d=d.createEventObject();d.type=type;i2rd.fixEvent(d);return d;}else{return{type:type};}};i2rd.createMouseEvent=function(type,p){p=p||{};return i2rd.createEvent('MouseEvents',type,p.canBubble||true,p.cancelable||true,p.view||window,p.detail||1,p.screenX||0,p.screenY||0,p.clientX||0,p.clientY||0,p.ctrlKey||false,p.altKey||false,p.shiftKey||false,p.metaKey||false,p.button||0,p.relatedTarget||null);};i2rd.fireEvent=function(el,evt){var a=i2rd.acopy(arguments,2,['HTMLEvents',evt]);if(typeof evt=='string'){if(arguments.length==2)a=a.concat([false,false]);evt=i2rd.createEvent.apply(this,a);}
if(i2rd.w3cevt)el.dispatchEvent(evt);else if(evt.cancelBubble===false){try{el.fireEvent('on'+evt.type,evt);}catch(e){i2rd.handleEvent.call(el,evt);}}else i2rd.handleEvent.call(el,evt);};i2rd.removeEvent=function(el,type,handler){if(type==__i2rd_domupdate_event){var hl=[];for(i=0;(h=__i2rd_domupdate_handlers[i]);i++){if(h!==handler){hl.push(h);}}
__i2rd_domupdate_handlers=hl;}else if(i2rd.w3cevt){el.removeEventListener(type,handler,false);}else{if(el.events&&el.events[type]){delete el.events[type][handler.$$guid];}}};i2rd.addEvent_guid=1;i2rd.handleEvent=function(event){if(!this.events)return;var i,hl,rv=true;event=event||i2rd.fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);hl=this.events[event.type];for(i in hl){if(hl[i].call(this,event)==false){rv=false;}}
return rv;};i2rd.fixEvent=function(event){event.preventDefault=i2rd.fixEvent_preventDefault;event.stopPropagation=i2rd.fixEvent_stopPropagation;return event;};i2rd.fixEvent_preventDefault=function(){this.returnValue=false;};i2rd.fixEvent_stopPropagation=function(){this.cancelBubble=true;};i2rd.rdy=document.readyState=='complete';i2rd.DOMCL=function(){if(i2rd.rdy)return;if(i2rd.w3cevt){i2rd.rdy=true;document.removeEventListener("DOMContentLoaded",i2rd.DOMCL,false);window.removeEventListener("load",i2rd.DOMCL,false);}else if(i2rd.ieevt){if(document.readyState==="complete"){i2rd.rdy=true;document.detachEvent("onreadystatechange",i2rd.DOMCL);window.detachEvent("onload",i2rd.DOMCL);}}
i2rd.fireEvent(document,i2rd._dl);};if(i2rd.w3cevt){document.addEventListener("DOMContentLoaded",i2rd.DOMCL,false);window.addEventListener("load",i2rd.DOMCL,false);}else if(i2rd.ieevt){document.attachEvent("onreadystatechange",i2rd.DOMCL);window.attachEvent("onload",i2rd.DOMCL);}
i2rd.getAjaxTransport=function(){try{return new XMLHttpRequest();}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
return null;};i2rd.bind=function(m,caller){var a=i2rd.acopy(arguments,2,[]),_m=m,obj=caller;return function(){_m.apply(obj,i2rd.acopy(arguments,0,a));};};i2rd.bindAsEventListener=function(m,caller){var a=i2rd.acopy(arguments,2,[]),_m=m,obj=caller;return function(evt){i2rd.acopy(arguments,0,a)
_m.apply(obj,[evt||window.event].concat(a));};};i2rd.eventElement=function(evt){evt=evt||window.event;return(evt.target||evt.srcElement);};i2rd.getInnerText=function(el){if(typeof el=="string"){return el;}
var cn,i,str="",children=el.childNodes;for(i=0;(cn=children[i]);i++){switch(cn.nodeType){case 1:str +=i2rd.getInnerText(cn);break;case 3:case 4:str +=cn.nodeValue;break;}}
return str;};i2rd._p={x:0,y:0};i2rd._mt=false;i2rd.coord=function(e){var x=0,y=0;e=e||window.event;if(e.pageX||e.pageY){x=evt.pageX;y=evt.pageY;}
else if(e.clientX||e.clientY){var d=document,b=d.body,de=d.documentElement;x=evt.clientX +de.scrollLeft +b.scrollLeft;y=evt.clientY +de.scrollTop +b.scrollLeft;}
return i2rd._p={x:x,y:y};};i2rd.getMouseCoord=function(e){if(!i2rd._mt){i2rd._mt=true;if((e=e||window.event)){i2rd.coord(e);}
i2rd.addEvent(document,'mousemove',i2rd.coord);setTimeout(function(){i2rd._mt=false;i2rd.removeEvent(document,'mousemove',i2rd.coord);},60000);}
return i2rd._p;};i2rd.addClassName=function(el,cn){var cn=cn.trim();if(!i2rd.hasClassName(el,cn))
el.className=((el.className||'') +' ' +cn).trim();};i2rd.removeClassName=function(el,cn){if(!i2rd.hasClassName(el,cn))return;el.className=(el.className||'').replace(RegExp("(^|\\s+)" +cn.trim() +"(\\s+|$)",'g'),' ').trim();};i2rd.hasClassName=function(el,cn){var cur=(el.className||'');return cur==cn||(RegExp("(^|\\s+)"+cn+"(\\s+|$)").test(cur));};i2rd.getCookie=function(name){var i=0,c,cn=name+"=",ca=document.cookie.split(';');for(;c=ca[i];i++){while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(cn)==0)return c.substring(cn.length,c.length);}
return null;};i2rd.setCookie=function(name,value,expires,path,domain,secure){document.cookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"")+
((secure)?"; secure":"");};i2rd.deleteCookie=function(name,path,domain){document.cookie=name+"; expires=Thu, 01-Jan-1970 00:00:01 GMT" +((path)?"; path="+path:"") +((domain)?"; domain="+domain:"");};i2rd.owfDefault={menubar:false,location:false,toolbar:false,scrollbars:true,statusbar:false};i2rd.openWindow=function(url,name,dim,features,pbMesg,evt){name=name||'_blank';features=features||i2rd.owfDefault;pbMesg=pbMesg||'Please disable any popup blockers for this site.';var fstr='';for(var key in features){var val=i2rd.getOWFeature(features,key);if(val!=null){fstr +=','+key+'='+(val?'yes':'no');}}
if(dim){if(dim.x&&dim.x>0){dim.x+=30;fstr+=',width='+dim.x;}
if(dim.y&&dim.y>0){dim.y+=50;fstr+=',height='+dim.y;}}
if(fstr.length>0){fstr=fstr.substring(1);}
var nw=window.open(url,name,fstr);if(name!='_top'&&name!='_parent'&&name!='_self'){if(nw.opener!=window){alert(pbMesg);}}
try{nw.focus();if(dim&&dim.x&&dim.y){if(dim.x>0&&dim.y>0){nw.resizeTo(dim.x,dim.y);}}}catch(e){}
evt=evt||window.event;if(evt){if(evt.preventDefault){evt.preventDefault();evt.stopPropagation();}
else{evt.cancelBubble=true;evt.returnValue=false;}}
return false;};i2rd.getOWFeature=function(m,prop){var val=m[prop];if(typeof val=='undefined'||val==null){return null;}
else{return!!val;}};i2rd.each=function(array,fn,filter){var ct=0,all=(typeof filter!=='function');for(var i=0,mx=array.length;i<mx;i++){var el=array[i];if(all||filter.call(el,i,el,ct)){fn.call(el,i,el,ct++);}}};i2rd.serialize=function(form){var t,e,i,s=[];for(i=0;e=form.elements[i];i++){t=e.type;if(e.serializeValue)e.serializeValue(form,s,e.name,e.value);else if(e.name&&!e.disabled&&t!='submit'&&t!='file'){switch(e.nodeName.toLowerCase()){case'input':switch(t){case'checkbox':case'radio':if(e.checked)i2rd.serializeValue(form,s,e.name,e.value);break;case'button':break;default:i2rd.serializeValue(form,s,e.name,e.value);break;}
break;case'select':for(var o,j=0;o=e.options[j];j++)if(o.selected)i2rd.serializeValue(form,s,e.name,o.value);break;case'button':break;default:i2rd.serializeValue(form,s,e.name,e.value);break;}}}
return s.join('&');};i2rd.serializeValue=function(f,s,n,v){if(n&&v!=null){s.push(encodeURIComponent(n) +'=' +encodeURIComponent(v));}};i2rd._lf=null;i2rd.focusListener=function(evt){var el=i2rd.eventElement(evt);if(i2rd._lf){i2rd.removeClassName(i2rd._lf,"focused");}
i2rd.lastFocus=el;i2rd.addClassName(el,"focused");};i2rd.addEvent(window,'load',function(){var i=0,j,e,f,el,fl=document.forms;if(!fl)return;for(;f=fl[i];i++){el=f.elements;for(j=0;e=el[j];j++){if(e.type=='hidden')continue;i2rd.addEvent(e,'focus',i2rd.focusListener);if(e.nodeName.toLowerCase()=='select'&&i2rd.hasClassName(e,'autosubmitselect'))
e.onchange=function(evt){this.form.submit();};}}});}
/*  JS Resource: cms/js/cms-iefix.js  */

if(typeof cmsiepermiatefix=='undefined'){cmsiepermiatefix=true;if(typeof cms=='undefined'){cms={};}
cms_hiddenElements=[];cms.hideObscuredElements=function(exclude){if(!(navigator.userAgent.match(/MSIE [456]/)&&!window.opera)){return;}
if(!exclude){return;}
cms.showObscuredElements();var elements=[];elements.pushAll(document.body.childNodes);var el;while((el=elements.pop())){if(el==exclude){continue;}
elements.pushAll(el.childNodes);if(el.nodeType==1){if(el.nodeName.toLowerCase()=="select"){try{el.style.visibility="hidden";cms_hiddenElements.push(el);}catch(e){log4js.logger.error("Error accessing element in hideObscuredElement.",e);}}}}};cms.showObscuredElements=function(){var el;while((el=cms_hiddenElements.pop())){try{el.style.visibility="visible";}catch(e){log4js.logger.error("Error accessing element in showObscuredElement.",e);}}};cms.__fixIEButtonHandling=function(evt){try{var button=(evt.target||evt.srcElement);var form=button.form,name=button.name,value=button.value;var alt=$(button.id +"_value");if(alt&&alt.value){value=alt.value;}
for(var h=0;h<form.elements.length;h++){var el=form.elements[h];if(el.nodeName.toLowerCase()=='button'){var type=el.getAttribute('type');if(type=='submit'){el.parentNode.removeChild(el);}}}
if(!form[name]){var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name",name);input.setAttribute("id",name);input.setAttribute("value",value);form.appendChild(input);}else{}
form.submit();}catch(ee){log4js.logger.error("Caught error manipulating form.",ee);}
return true;};cms.__fixIEButtonInit=function(){var i,ib,type,cn,el,buttons=document.getElementsByTagName("button");for(i=0,ib=buttons.length;i<ib;i++){el=buttons[i];type=el.getAttribute('type');cn=el.className||"";if(cn.match("fixie")&&(!type||type=='submit')){if(typeof el.iesetup=='undefined'){i2rd.addEvent(el,'click',cms.__fixIEButtonHandling);el.iesetup=true;}}}};if((navigator.userAgent.match(/MSIE [4567]/)&&!window.opera)){i2rd.addEvent(window,'onload',cms.__fixIEButtonInit);window.setTimeout(cms.__fixIEButtonInit,750);}}
/*  JS Resource: cms/js/cms-dim.js  */

if(typeof cmsdim=='undefined'){cmsdim=true;if(typeof cms=='undefined'){cms={};}
cms.getStyle=function(el,sp){var v;if(el.currentStyle){v=el.currentStyle[sp];}
else if(window.getComputedStyle){v=document.defaultView.getComputedStyle(el,null).getPropertyValue(sp);}
else{v=el.style[sp];}
return v;}
cms.getScrollOffset=function(){var x,y;if(self.pageYOffset){x=self.pageXOffset;y=self.pageYOffset;}else{var b=document.body,de=document.documentElement;if(de&&de.scrollTop){x=de.scrollLeft;y=de.scrollTop;}else if(b){x=b.scrollLeft;y=b.scrollTop;}}
return{x:x,y:y};};cms.getDocumentDim=function(){var b=document.body,de=document.documentElement;var x=(de?de.scrollWidth:b.scrollWidth);var y=(de?de.scrollHeight:b.scrollHeight);var x2=0,y2=0;if(self.innerHeight){x2=self.innerWidth;y2=self.innerHeight;}else if(de.clientHeight){x2=de.clientWidth;y2=de.clientHeight;}else if(b){x2=b.clientWidth;y2=b.clientHeight;}
var max=x*y;var max2=x2*y2;if(max2>max){x=x2;y=y2;}
return{x:x,y:y};};cms.getWindowDim=function(){var x,y;if(self.innerHeight){x=self.innerWidth;y=self.innerHeight;}else{var b=document.body,de=document.documentElement;if(de&&de.clientHeight){x=de.clientWidth;y=de.clientHeight;}
else if(b){x=b.clientWidth;y=b.clientHeight;}}
return{x:x,y:y};};cms.positionAtEvt=function(evt,el){var els=el.style,vis=(cms.getStyle(el,"visibility")||"visible"),disp=(cms.getStyle(el,"display")||"block");if(vis!='hidden'){els.visibility="hidden";}
if(disp=='none'){els.display='block';}
var coord=i2rd.getMouseCoord(evt),wdim=cms.getWindowDim(),x=coord.x,y=coord.y,eh=el.clientHeight,ew=el.clientWidth;if((x+ew)>wdim.x){x=x -ew -10;if(x<0){x=0;}}
el.style.left=x +10 +"px";el.style.top=y +10 +"px";els.visibility=vis;els.display=disp;};cms.positionAtCenter=function(el){var els=el.style,vis=(cms.getStyle(el,"visibility")||"visible"),disp=(cms.getStyle(el,"display")||"block");if(vis!='hidden'){els.visibility="hidden";}
if(disp=='none'){els.display='block';}
if(!els.left){els.left="0px";}
if(!els.top){els.top="0px";}
var wdim=cms.getWindowDim(),offset=cms.getScrollOffset(),ddim=cms.getDocumentDim(),eh=el.clientHeight,ew=el.clientWidth,x=0,y=0;if(ew<wdim.x){x=(ddim.x -ew)/2;y=((wdim.y/2) -(eh/2));}
if(x<0){x=0;}
if(y<0){y=0;}
x=x +offset.x;y=y +offset.y;els.left=x +"px";els.top=y +"px";els.visibility=vis;els.display=disp;};}
/*  JS Resource: cms/js/cms-pageeffect.js  */

if(typeof cms_page_effect=='undefined'){cms_page_effect=true;if(typeof cms=='undefined')cms={};cms.bg=null;cms.bg_clickEvent=null;cms.bg_loadingCN="content_loading";cms.setBackgroundLoading=function(tf){if(tf)i2rd.addClassName(cms.bg,cms.bg_loadingCN);else i2rd.removeClassName(cms.bg,cms.bg_loadingCN);};cms.resizeBackground=function(){if(cms.bg){var dv=cms.bg.style.display||"none",cb=cms.bg;cb.style.display="block";var dim=cms.getScrollOffset();cb.style.display=dv;cb.style.top=dim.y +"px";}};cms.createBackground=function(){if(cms.bg)return;var d=window.document;var bg=d.createElement("div");bg.style.textAlign="center";bg.style.position="absolute";bg.style.left=0;bg.style.top=0;bg.style.height="100%";bg.style.width="100%";bg.className="page_background";bg.style.display="none";d.body.appendChild(bg);cms.bg=bg;};cms.showBackground=function(cn,zIndex,clickEvent){cms.createBackground();cms.bg.style.zIndex=zIndex||((zIndex===0)?0:501);cms.bg.className="page_background";if(cn&&!cms.bg.className.match(' ' +cn)){cms.bg.className +=(" " +cn);}
cms.bg.style.display="block";i2rd.addEvent(window,"resize",cms.resizeBackground);i2rd.addEvent(window,"scroll",cms.resizeBackground);cms.bg_clickEvent=clickEvent;if(clickEvent)i2rd.addEvent(cms.bg,'click',clickEvent);cms.resizeBackground();};cms.hideBackground=function(){if(!cms.bg)return;i2rd.removeEvent(window,"resize",cms.resizeBackground);i2rd.removeEvent(window,"scroll",cms.resizeBackground);cms.bg.style.display="none";if(cms.bg_clickEvent)i2rd.removeEvent(cms.bg,'click',cms.bg_clickEvent);};}
/*  JS Resource: cms/js/bean/emailpage.js  */

if(typeof EP=='undefined'){EP={};EP.Popup=function(beanNode,formDiv,form,link,cancelBtn,statusCon){this.beanNode=beanNode;this.formDiv=formDiv;this.form=form;this.link=link;this.cancelBtn=cancelBtn;this.statusCon=statusCon;this.init();};EP.Popup.prototype={init:function(){var body=document.body;this.background=document.createElement("div");this.background.className="ep_popup_background";this.background.style.display="none";body.appendChild(this.background);this.background.style.position="absolute";this.background.style.left=0;this.background.style.top=0;this.background.style.bottom=0;this.background.style.right=0;this.background.style.zIndex="599";this.popup=document.createElement("div");this.popup.style.display="none";body.appendChild(this.popup);this.popup.appendChild(this.formDiv);this.popup.style.zIndex="600";this.popup.id="popup_" +this.beanNode.id;this.popup.className="ep_popup";if(document.createComment)
this.popup.appendChild(document.createComment("Auto generated popup for EmailPage component."));this.link.href="#";this.checkEscFunc=i2rd.bind(this.checkEsc,this);this.hideFunc=i2rd.bind(this.hide,this);i2rd.addEvent(this.link,"click",i2rd.bind(this.toggle,this));i2rd.addEvent(this.background,"click",this.hideFunc);i2rd.addEvent(this.cancelBtn,"click",this.hideFunc);i2rd.addEvent(this.form,"submit",i2rd.bind(this.submitForm,this));},toggle:function(evt){evt.stopPropagation();evt.preventDefault();if(this.popup.style.display=="none")
this.show();else
this.hide();},checkEsc:function(evt){if(evt.keyCode==27||evt.which==27){this.hide();}},show:function(){cms.showBackground("ep_popup_background","599",this.hideFunc);this.popup.style.display="block";var el=this.form.getElementsByTagName("input")[0];i2rd.addEvent(document,"keypress",this.checkEscFunc);this.scrollTo(this.popup);if(window.scrollBy)
window.scrollBy(0, -20);cms.hideObscuredElements(this.popup);try{el.focus();}catch(e){}},scrollTo:function(element){var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);},hide:function(){cms.showObscuredElements();this.popup.style.display="none";this.form.reset();this.statusCon.innerHTML="<span>&#160;</span>";i2rd.removeEvent(document,"keypress",this.checkEscFunc);cms.hideBackground();},serialize:function(){var enc,fe,i,ib,el=this.form.elements;;enc='';for(i=0,ib=el.length;(fe=el[i]);i++){if(!fe.name){continue;}
enc +='&' +fe.name +'=' +escape(fe.value);}
return enc.substring(1);},submitForm:function(evt){if(evt){evt.stopPropagation();evt.preventDefault();}
this.form.onsubmit=function(){return false;};var encodedForm=this.serialize();this.ajax=i2rd.getAjaxTransport();this.ajax.onreadystatechange=i2rd.bind(this.handleResponse,this);this.ajax.open("POST",this.form.action,true);this.ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');this.ajax.send(encodedForm);},handleResponse:function(){if(this.ajax.readyState!=4){return;}
if(!(this.ajax.status==200||this.ajax.status==0))
alert("Unable to send email. Please try again later.");try{var success=true;var resp=this.ajax.responseText||this.ajax.responseXML;var processed=i2rd.stripScripts(i2rd.xmlToString(resp));var success=processed.html.match(/success/ig);this.statusCon.innerHTML=processed.html;if(success){this.hide();}
this.ajax.onreadystatechange=null;delete this.ajax;}catch(e){log4js.logger.error("Unable to process AJAX response.",e);}},cleanup:function(){delete this.checkEscFunc;}};EP.init=function(evt){var divList=document.getElementsByTagName("div");for(var el=null,idx=0;(el=divList[idx]);idx++){var cn=el.className||"";cn=cn.toLowerCase();if(cn.match(/ep_email_form/)){if(el.ep_configured)continue;el.ep_configured=true;var epNode=el.parentNode;var epForm=epNode.getElementsByTagName("form")[0];var epDiv=epForm.parentNode;if(epDiv&&epDiv.processed)continue;epDiv.processed=true;var epLink=epNode.getElementsByTagName("span")[0].getElementsByTagName("a")[0];var epCancel=null;var epStatusCon=null;var elList=epForm.getElementsByTagName("input");for(var el2=null,idx2=0;(el2=elList[idx2]);idx2++){if(el2.type=="button"&&el2.name=="ep_cancel"){epCancel=el2;break;}}
elList=epDiv.getElementsByTagName("div");for(var el2=null,idx2=0;(el2=elList[idx2]);idx2++){var cn2=el2.className||"";cn2=cn2.toLowerCase();if(cn2=="status_messages"){epStatusCon=el2;break;}}
if(!epForm||!epLink||!epCancel||!epStatusCon){if(!el.id)el.id="check_" +idx;}else{var popup=new EP.Popup(epNode,epDiv,epForm,epLink,epCancel,epStatusCon);i2rd.addEvent(window,'unload',function(evt){popup.cleanup();delete popup;});}}}};i2rd.addEvent(window,'load',EP.init);}
/*  JS Resource: lib/prototype.js  */

__i2rd_fixIELeak=function(domNode,skipRoot){}
if(typeof __i2rd_domupdate_event=='undefined'){__i2rd_domupdate_event="i2rd:domupdate";__i2rd_domupdate_handlers=[];__i2rd_domupdate_fire=function(element,evt){var i,h,args=[];if(evt)args.push(evt);for(i=0;h=__i2rd_domupdate_handlers[i];i++)
try{h.apply(element,args);}catch(e){}}}
var Prototype={Version:'1.7',Browser:(function(){var ua=navigator.userAgent;var isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{IE:!!window.attachEvent&&!isOpera,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/')> -1,Gecko:ua.indexOf('Gecko')> -1&&ua.indexOf('KHTML')=== -1,MobileSafari:/Apple.*Mobile/.test(ua)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var constructor=window.Element||window.HTMLElement;return!!(constructor&&constructor.prototype);})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=='undefined')
return true;var div=document.createElement('div'),form=document.createElement('form'),isSupported=false;if(div['__proto__']&&(div['__proto__']!==form['__proto__'])){isSupported=true;}
div=form=null;return isSupported;})()},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)
Prototype.BrowserFeatures.SpecificElementExtensions=false;var Abstract={};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
return returnValue;}};var Class=(function(){var IS_DONTENUM_BUGGY=(function(){for(var p in{toString:1}){if(p==='toString')return false;}
return true;})();function subclass(){};function create(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))
parent=properties.shift();function klass(){this.initialize.apply(this,arguments);}
Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);}
for(var i=0,length=properties.length;i<length;i++)
klass.addMethods(properties[i]);if(!klass.prototype.initialize)
klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}
function addMethods(source){var ancestor=this.superclass&&this.superclass.prototype,properties=Object.keys(source);if(IS_DONTENUM_BUGGY){if(source.toString!=Object.prototype.toString)
properties.push("toString");if(source.valueOf!=Object.prototype.valueOf)
properties.push("valueOf");}
for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames()[0]=="$super"){var method=value;value=(function(m){return function(){return ancestor[m].apply(this,arguments);};})(property).wrap(method);value.valueOf=method.valueOf.bind(method);value.toString=method.toString.bind(method);}
this.prototype[property]=value;}
return this;}
return{create:create,Methods:{addMethods:addMethods}};})();(function(){var _toString=Object.prototype.toString,NULL_TYPE='Null',UNDEFINED_TYPE='Undefined',BOOLEAN_TYPE='Boolean',NUMBER_TYPE='Number',STRING_TYPE='String',OBJECT_TYPE='Object',FUNCTION_CLASS='[object Function]',BOOLEAN_CLASS='[object Boolean]',NUMBER_CLASS='[object Number]',STRING_CLASS='[object String]',ARRAY_CLASS='[object Array]',DATE_CLASS='[object Date]',NATIVE_JSON_STRINGIFY_SUPPORT=window.JSON&&typeof JSON.stringify==='function'&&JSON.stringify(0)==='0'&&typeof JSON.stringify(Prototype.K)==='undefined';function Type(o){switch(o){case null:return NULL_TYPE;case(void 0):return UNDEFINED_TYPE;}
var type=typeof o;switch(type){case'boolean':return BOOLEAN_TYPE;case'number':return NUMBER_TYPE;case'string':return STRING_TYPE;}
return OBJECT_TYPE;}
function extend(destination,source){for(var property in source)
destination[property]=source[property];return destination;}
function inspect(object){try{if(isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object);}catch(e){if(e instanceof RangeError)return'...';throw e;}}
function toJSON(value){return Str('',{'':value},[]);}
function Str(key,holder,stack){var value=holder[key],type=typeof value;if(Type(value)===OBJECT_TYPE&&typeof value.toJSON==='function'){value=value.toJSON(key);}
var _class=_toString.call(value);switch(_class){case NUMBER_CLASS:case BOOLEAN_CLASS:case STRING_CLASS:value=value.valueOf();}
switch(value){case null:return'null';case true:return'true';case false:return'false';}
type=typeof value;switch(type){case'string':return value.inspect(true);case'number':return isFinite(value)?String(value):'null';case'object':for(var i=0,length=stack.length;i<length;i++){if(stack[i]===value){throw new TypeError();}}
stack.push(value);var partial=[];if(_class===ARRAY_CLASS){for(var i=0,length=value.length;i<length;i++){var str=Str(i,value,stack);partial.push(typeof str==='undefined'?'null':str);}
partial='[' +partial.join(',') +']';}else{var keys=Object.keys(value);for(var i=0,length=keys.length;i<length;i++){var key=keys[i],str=Str(key,value,stack);if(typeof str!=="undefined"){partial.push(key.inspect(true)+':' +str);}}
partial='{' +partial.join(',') +'}';}
stack.pop();return partial;}}
function stringify(object){return JSON.stringify(object);}
function toQueryString(object){return $H(object).toQueryString();}
function toHTML(object){return object&&object.toHTML?object.toHTML():String.interpret(object);}
function keys(object){if(Type(object)!==OBJECT_TYPE){throw new TypeError();}
var results=[];for(var property in object){if(object.hasOwnProperty(property)){results.push(property);}}
return results;}
function values(object){var results=[];for(var property in object)
results.push(object[property]);return results;}
function clone(object){return extend({},object);}
function isElement(object){return!!(object&&object.nodeType==1);}
function isArray(object){return _toString.call(object)===ARRAY_CLASS;}
var hasNativeIsArray=(typeof Array.isArray=='function')&&Array.isArray([])&&!Array.isArray({});if(hasNativeIsArray){isArray=Array.isArray;}
function isHash(object){return object instanceof Hash;}
function isFunction(object){return _toString.call(object)===FUNCTION_CLASS;}
function isString(object){return _toString.call(object)===STRING_CLASS;}
function isNumber(object){return _toString.call(object)===NUMBER_CLASS;}
function isDate(object){return _toString.call(object)===DATE_CLASS;}
function isUndefined(object){return typeof object==="undefined";}
extend(Object,{extend:extend,inspect:inspect,toJSON:NATIVE_JSON_STRINGIFY_SUPPORT?stringify:toJSON,toQueryString:toQueryString,toHTML:toHTML,keys:Object.keys||keys,values:values,clone:clone,isElement:isElement,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isDate:isDate,isUndefined:isUndefined});})();Object.extend(Function.prototype,(function(){var slice=Array.prototype.slice;function update(array,args){var arrayLength=array.length,length=args.length;while(length--)array[arrayLength +length]=args[length];return array;}
function merge(array,args){array=slice.call(array,0);return update(array,args);}
function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,'').replace(/\s+/g,'').split(',');return names.length==1&&!names[0]?[]:names;}
function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a);}}
function bindAsEventListener(context){var __method=this,args=slice.call(arguments,1);return function(event){var a=update([event||window.event],args);return __method.apply(context,a);}}
function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a);}}
function delay(timeout){var __method=this,args=slice.call(arguments,1);timeout=timeout*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);}
function defer(){var args=update([0.01],arguments);return this.delay.apply(this,args);}
function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a);}}
function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a);};}
return{argumentNames:argumentNames,bind:bind,bindAsEventListener:bindAsEventListener,curry:curry,delay:delay,defer:defer,wrap:wrap,methodize:methodize}})());(function(proto){function toISOString(){return this.getUTCFullYear() +'-' +
(this.getUTCMonth() +1).toPaddedString(2) +'-' +
this.getUTCDate().toPaddedString(2) +'T' +
this.getUTCHours().toPaddedString(2) +':' +
this.getUTCMinutes().toPaddedString(2) +':' +
this.getUTCSeconds().toPaddedString(2) +'Z';}
function toJSON(){return this.toISOString();}
if(!proto.toISOString)proto.toISOString=toISOString;if(!proto.toJSON)proto.toJSON=toJSON;})(Date.prototype);RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},execute:function(){this.callback(this);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false;}catch(e){this.currentlyExecuting=false;throw e;}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,(function(){var NATIVE_JSON_PARSE_SUPPORT=window.JSON&&typeof JSON.parse==='function'&&JSON.parse('{"test": true}').test;function prepareReplacement(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};}
function gsub(pattern,replacement){var result='',source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern))
pattern=RegExp.escape(pattern);if(!(pattern.length||pattern.source)){replacement=replacement('');return replacement +source.split('').join(replacement) +replacement;}
while(source.length>0){if(match=source.match(pattern)){result +=source.slice(0,match.index);result +=String.interpret(replacement(match));source=source.slice(match.index +match[0].length);}else{result +=source,source='';}}
return result;}
function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});}
function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this);}
function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?'...':truncation;return this.length>length?this.slice(0,length -truncation.length) +truncation:String(this);}
function strip(){return this.replace(/^\s+/,'').replace(/\s+$/,'');}
function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,'');}
function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');}
function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,'img'),matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});}
function evalScripts(){return this.extractScripts().map(function(script){return eval(script)});}
function escapeHTML(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}
function unescapeHTML(){return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}
function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}
else hash[key]=value;}
return hash;});}
function toArray(){return this.split('');}
function succ(){return this.slice(0,this.length -1) +
String.fromCharCode(this.charCodeAt(this.length -1) +1);}
function times(count){return count<1?'':new Array(count +1).join(this);}
function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():'';});}
function capitalize(){return this.charAt(0).toUpperCase() +this.substring(1).toLowerCase();}
function underscore(){return this.replace(/::/g,'/').replace(/([A-Z]+)([A-Z][a-z])/g,'$1_$2').replace(/([a-z\d])([A-Z])/g,'$1_$2').replace(/-/g,'_').toLowerCase();}
function dasherize(){return this.replace(/_/g,'-');}
function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character];}
return'\\u00' +character.charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"' +escapedString.replace(/"/g,'\\"') +'"';return"'" +escapedString.replace(/'/g,'\\\'') +"'";}
function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,'$1');}
function isJSON(){var str=this;if(str.blank())return false;str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@');str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,'');return(/^[\],:{}\s]*$/).test(str);}
function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(cx.test(json)){json=json.replace(cx,function(a){return'\\u' +('0000' +a.charCodeAt(0).toString(16)).slice(-4);});}
try{if(!sanitize||json.isJSON())return eval('(' +json +')');}catch(e){}
throw new SyntaxError('Badly formed JSON string: ' +this.inspect());}
function parseJSON(){var json=this.unfilterJSON();return JSON.parse(json);}
function include(pattern){return this.indexOf(pattern)> -1;}
function startsWith(pattern){return this.lastIndexOf(pattern,0)===0;}
function endsWith(pattern){var d=this.length -pattern.length;return d>=0&&this.indexOf(pattern,d)===d;}
function empty(){return this=='';}
function blank(){return/^\s*$/.test(this);}
function interpolate(object,pattern){return new Template(this,pattern).evaluate(object);}
return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate};})());var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(object&&Object.isFunction(object.toTemplateReplacements))
object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return(match[1] +'');var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3],pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].replace(/\\\\]/g,']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);}
return before +String.interpret(ctx);});}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function each(iterator,context){var index=0;try{this._each(function(value){iterator.call(context,value,index++);});}catch(e){if(e!=$break)throw e;}
return this;}
function eachSlice(number,iterator,context){var index= -number,slices=[],array=this.toArray();if(number<1)return array;while((index +=number)<array.length)
slices.push(array.slice(index,index+number));return slices.collect(iterator,context);}
function all(iterator,context){iterator=iterator||Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator.call(context,value,index);if(!result)throw $break;});return result;}
function any(iterator,context){iterator=iterator||Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator.call(context,value,index))
throw $break;});return result;}
function collect(iterator,context){iterator=iterator||Prototype.K;var results=[];this.each(function(value,index){results.push(iterator.call(context,value,index));});return results;}
function detect(iterator,context){var result;this.each(function(value,index){if(iterator.call(context,value,index)){result=value;throw $break;}});return result;}
function findAll(iterator,context){var results=[];this.each(function(value,index){if(iterator.call(context,value,index))
results.push(value);});return results;}
function grep(filter,iterator,context){iterator=iterator||Prototype.K;var results=[];if(Object.isString(filter))
filter=new RegExp(RegExp.escape(filter));this.each(function(value,index){if(filter.match(value))
results.push(iterator.call(context,value,index));});return results;}
function include(object){if(Object.isFunction(this.indexOf))
if(this.indexOf(object)!= -1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;}
function inGroupsOf(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});}
function inject(memo,iterator,context){this.each(function(value,index){memo=iterator.call(context,memo,value,index);});return memo;}
function invoke(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});}
function max(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value>=result)
result=value;});return result;}
function min(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value<result)
result=value;});return result;}
function partition(iterator,context){iterator=iterator||Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator.call(context,value,index)?trues:falses).push(value);});return[trues,falses];}
function pluck(property){var results=[];this.each(function(value){results.push(value[property]);});return results;}
function reject(iterator,context){var results=[];this.each(function(value,index){if(!iterator.call(context,value,index))
results.push(value);});return results;}
function sortBy(iterator,context){return this.map(function(value,index){return{value:value,criteria:iterator.call(context,value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b? -1:a>b?1:0;}).pluck('value');}
function toArray(){return this.map();}
function zip(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});}
function size(){return this.toArray().length;}
function inspect(){return'#<Enumerable:' +this.toArray().inspect() +'>';}
return{each:each,eachSlice:eachSlice,all:all,every:all,any:any,some:any,collect:collect,map:collect,detect:detect,findAll:findAll,select:findAll,filter:findAll,grep:grep,include:include,member:include,inGroupsOf:inGroupsOf,inject:inject,invoke:invoke,max:max,min:min,partition:partition,pluck:pluck,reject:reject,sortBy:sortBy,toArray:toArray,entries:toArray,zip:zip,size:size,inspect:inspect,find:detect};})();function $A(iterable){if(!iterable)return[];if('toArray'in Object(iterable))return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;}
function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];}
Array.from=$A;(function(){var arrayProto=Array.prototype,slice=arrayProto.slice,_each=arrayProto.forEach;function each(iterator,context){for(var i=0,length=this.length>>>0;i<length;i++){if(i in this)iterator.call(context,this[i],i,this);}}
if(!_each)_each=each;function clear(){this.length=0;return this;}
function first(){return this[0];}
function last(){return this[this.length -1];}
function compact(){return this.select(function(value){return value!=null;});}
function flatten(){return this.inject([],function(array,value){if(Object.isArray(value))
return array.concat(value.flatten());array.push(value);return array;});}
function without(){var values=slice.call(arguments,0);return this.select(function(value){return!values.include(value);});}
function reverse(inline){return(inline===false?this.toArray():this)._reverse();}
function uniq(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))
array.push(value);return array;});}
function intersect(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});}
function clone(){return slice.call(this,0);}
function size(){return this.length;}
function inspect(){return'[' +this.map(Object.inspect).join(', ') +']';}
function indexOf(item,i){i||(i=0);var length=this.length;if(i<0)i=length +i;for(;i<length;i++)
if(this[i]===item)return i;return -1;}
function lastIndexOf(item,i){i=isNaN(i)?this.length:(i<0?this.length +i:i) +1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i -n -1;}
function concat(){var array=slice.call(this,0),item;for(var i=0,length=arguments.length;i<length;i++){item=arguments[i];if(Object.isArray(item)&&!('callee'in item)){for(var j=0,arrayLength=item.length;j<arrayLength;j++)
array.push(item[j]);}else{array.push(item);}}
return array;}
Object.extend(arrayProto,Enumerable);if(!arrayProto._reverse)
arrayProto._reverse=arrayProto.reverse;Object.extend(arrayProto,{_each:_each,clear:clear,first:first,last:last,compact:compact,flatten:flatten,without:without,reverse:reverse,uniq:uniq,intersect:intersect,clone:clone,toArray:clone,size:size,inspect:inspect});var CONCAT_ARGUMENTS_BUGGY=(function(){return[].concat(arguments)[0][0]!==1;})(1,2)
if(CONCAT_ARGUMENTS_BUGGY)arrayProto.concat=concat;if(!arrayProto.indexOf)arrayProto.indexOf=indexOf;if(!arrayProto.lastIndexOf)arrayProto.lastIndexOf=lastIndexOf;})();function $H(object){return new Hash(object);};var Hash=Class.create(Enumerable,(function(){function initialize(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);}
function _each(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}
function set(key,value){return this._object[key]=value;}
function get(key){if(this._object[key]!==Object.prototype[key])
return this._object[key];}
function unset(key){var value=this._object[key];delete this._object[key];return value;}
function toObject(){return Object.clone(this._object);}
function keys(){return this.pluck('key');}
function values(){return this.pluck('value');}
function index(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;}
function merge(object){return this.clone().update(object);}
function update(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});}
function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key +'=' +encodeURIComponent(String.interpret(value));}
function toQueryString(){return this.inject([],function(results,pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values)){var queryValues=[];for(var i=0,len=values.length,value;i<len;i++){value=values[i];queryValues.push(toQueryPair(key,value));}
return results.concat(queryValues);}}else results.push(toQueryPair(key,values));return results;}).join('&');}
function inspect(){return'#<Hash:{' +this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ') +'}>';}
function clone(){return new Hash(this);}
return{initialize:initialize,_each:_each,set:set,get:get,unset:unset,toObject:toObject,toTemplateReplacements:toObject,keys:keys,values:values,index:index,merge:merge,update:update,toQueryString:toQueryString,inspect:inspect,toJSON:toObject,clone:clone};})());Hash.from=$H;Object.extend(Number.prototype,(function(){function toColorPart(){return this.toPaddedString(2,16);}
function succ(){return this +1;}
function times(iterator,context){$R(0,this,true).each(iterator,context);return this;}
function toPaddedString(length,radix){var string=this.toString(radix||10);return'0'.times(length -string.length) +string;}
function abs(){return Math.abs(this);}
function round(){return Math.round(this);}
function ceil(){return Math.ceil(this);}
function floor(){return Math.floor(this);}
return{toColorPart:toColorPart,succ:succ,times:times,toPaddedString:toPaddedString,abs:abs,round:round,ceil:ceil,floor:floor};})());function $R(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
var ObjectRange=Class.create(Enumerable,(function(){function initialize(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;}
function _each(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}}
function include(value){if(value<this.start)
return false;if(this.exclusive)
return value<this.end;return value<=this.end;}
return{initialize:initialize,_each:_each,include:include};})());var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isHash(this.options.parameters))
this.options.parameters=this.options.parameters.toObject();}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=Object.isString(this.options.parameters)?this.options.parameters:Object.toQueryString(this.options.parameters);if(!['get','post'].include(this.method)){params +=(params?'&':'') +"_method=" +this.method;this.method='post';}
if(params&&this.method==='get'){this.url +=(this.url.include('?')?'&':'?') +params;}
this.parameters=params.toQueryParams();try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
this.onStateChange();}
catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType +
(this.options.encoding?'; charset=' +this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
headers['Connection']='close';}
if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push))
for(var i=0,length=extras.length;i<length;i +=2)
headers[extras[i]]=extras[i+1];else
$H(extras).each(function(pair){headers[pair.key]=pair.value});}
for(var name in headers)
this.transport.setRequestHeader(name,headers[name]);},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300)||status==304;},getStatus:function(){try{if(this.transport.status===1223)return 204;return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on' +response.status]||this.options['on' +(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);}
var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
this.evalResponse();}
try{(this.options['on' +state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on' +state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);}
if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':' +location.port:''}));},getHeader:function(name){try{return this.transport.getResponseHeader(name)||null;}catch(e){return null;}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();}
if(readyState==4){var xml=transport.responseXML;this.responseXML=Object.isUndefined(xml)?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())
return null;try{return this.responseText.evalJSON(options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=Object.clone(options);var onComplete=options.onComplete;options.onComplete=(function(response,json){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,json);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);}
else options.insertion(receiver,responseText);}
else receiver.update(responseText);}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;}
this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
elements.push($(arguments[i]));return elements;}
if(Object.isString(element))
element=document.getElementById(element);return Element.extend(element);}
if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
results.push(Element.extend(query.snapshotItem(i)));return results;};}
if(!Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});}
(function(global){function shouldUseCache(tagName,attributes){if(tagName==='select')return false;if('type'in attributes)return false;return true;}
var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX=(function(){try{var el=document.createElement('<input name="x">');return el.tagName.toLowerCase()==='input'&&el.name==='x';}
catch(err){return false;}})();var element=global.Element;global.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(HAS_EXTENDED_CREATE_ELEMENT_SYNTAX&&attributes.name){tagName='<' +tagName +' name="' +attributes.name +'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);}
if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));var node=shouldUseCache(tagName,attributes)?cache[tagName].cloneNode(false):document.createElement(tagName);return Element.writeAttribute(node,attributes);};Object.extend(global.Element,element||{});if(element)global.Element.prototype=element.prototype;})(this);Element.idCounter=1;Element.cache={};Element._purgeElement=function(element){var uid=element._prototypeUID;if(uid){Element.stopObserving(element);element._prototypeUID=void 0;delete Element.Storage[uid];}}
Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){element=$(element);element.style.display='none';return element;},show:function(element){element=$(element);element.style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:(function(){var SELECT_ELEMENT_INNERHTML_BUGGY=(function(){var el=document.createElement("select"),isBuggy=true;el.innerHTML="<option value=\"test\">test</option>";if(el.options&&el.options[0]){isBuggy=el.options[0].nodeName.toUpperCase()!=="OPTION";}
el=null;return isBuggy;})();var TABLE_ELEMENT_INNERHTML_BUGGY=(function(){try{var el=document.createElement("table");if(el&&el.tBodies){el.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var isBuggy=typeof el.tBodies[0]=="undefined";el=null;return isBuggy;}}catch(e){return true;}})();var LINK_ELEMENT_INNERHTML_BUGGY=(function(){try{var el=document.createElement('div');el.innerHTML="<link>";var isBuggy=(el.childNodes.length===0);el=null;return isBuggy;}catch(e){return true;}})();var ANY_INNERHTML_BUGGY=SELECT_ELEMENT_INNERHTML_BUGGY||TABLE_ELEMENT_INNERHTML_BUGGY||LINK_ELEMENT_INNERHTML_BUGGY;var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING=(function(){var s=document.createElement("script"),isBuggy=false;try{s.appendChild(document.createTextNode(""));isBuggy=!s.firstChild||s.firstChild&&s.firstChild.nodeType!==3;}catch(e){isBuggy=true;}
s=null;return isBuggy;})();function update(element,content){element=$(element);var purgeElement=Element._purgeElement;var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);if(content&&content.toElement)
content=content.toElement();if(Object.isElement(content))
return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName==='SCRIPT'&&SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING){element.text=content;return element;}
if(ANY_INNERHTML_BUGGY){if(tagName in Element._insertionTranslations.tags){while(element.firstChild){element.removeChild(element.firstChild);}
Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)});}else if(LINK_ELEMENT_INNERHTML_BUGGY&&Object.isString(content)&&content.indexOf('<link')> -1){while(element.firstChild){element.removeChild(element.firstChild);}
var nodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts(),true);nodes.each(function(node){element.appendChild(node)});}
else{element.innerHTML=content.stripScripts();}}
else{element.innerHTML=content.stripScripts();}
content.evalScripts.bind(content).defer();setTimeout(function(){__i2rd_domupdate_fire(element);},1);return element;}
return update;})(),replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts());}
element.parentNode.replaceChild(content,element);setTimeout(function(){__i2rd_domupdate_fire(element.parentNode);},1);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML)))
insertions={bottom:insertions};var content,insert,tagName,childNodes;for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){insert(element,content);continue;}
content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')childNodes.reverse();childNodes.each(insert.curry(element));content.evalScripts.bind(content).defer();}
setTimeout(function(){__i2rd_domupdate_fire(element);},1);return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper))
$(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode)
element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<' +element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last(),value=(element[property]||'').toString();if(value)result +=' ' +attribute +'=' +value.inspect(true);});return result +'>';},recursivelyCollect:function(element,property,maximumLength){element=$(element);maximumLength=maximumLength|| -1;var elements=[];while(element=element[property]){if(element.nodeType==1)
elements.push(Element.extend(element));if(elements.length==maximumLength)
break;}
return elements;},ancestors:function(element){return Element.recursivelyCollect(element,'parentNode');},descendants:function(element){return Element.select(element,"*");},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){var results=[],child=$(element).firstChild;while(child){if(child.nodeType===1){results.push(Element.extend(child));}
child=child.nextSibling;}
return results;},previousSiblings:function(element,maximumLength){return Element.recursivelyCollect(element,'previousSibling');},nextSiblings:function(element){return Element.recursivelyCollect(element,'nextSibling');},siblings:function(element){element=$(element);return Element.previousSiblings(element).reverse().concat(Element.nextSiblings(element));},match:function(element,selector){element=$(element);if(Object.isString(selector))
return Prototype.Selector.match(element,selector);return selector.match(element);},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=Element.ancestors(element);return Object.isNumber(expression)?ancestors[expression]:Prototype.Selector.find(ancestors,expression,index);},down:function(element,expression,index){element=$(element);if(arguments.length==1)return Element.firstDescendant(element);return Object.isNumber(expression)?Element.descendants(element)[expression]:Element.select(element,expression)[index||0];},previous:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.previousSiblings(),expression,index);}else{return element.recursivelyCollect("previousSibling",index +1)[index];}},next:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.nextSiblings(),expression,index);}else{var maximumLength=Object.isNumber(index)?index +1:1;return element.recursivelyCollect("nextSibling",index +1)[index];}},select:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element);},adjacent:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element.parentNode).without(element);},identify:function(element){element=$(element);var id=Element.readAttribute(element,'id');if(id)return id;do{id='anonymous_element_' +Element.idCounter++}while($(id));Element.writeAttribute(element,'id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}}
return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=Object.isUndefined(value)?true:value;for(var attr in attributes){name=t.names[attr]||attr;value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null)
element.removeAttribute(name);else if(value===true)
element.setAttribute(name,name);else element.setAttribute(name,value);}
return element;},getHeight:function(element){return Element.getDimensions(element).height;},getWidth:function(element){return Element.getDimensions(element).width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)" +className +"(\\s|$)").test(elementClassName)));},addClassName:function(element,className){if(!(element=$(element)))return;if(!Element.hasClassName(element,className))
element.className +=(element.className?' ':'') +className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)" +className +"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return Element[Element.hasClassName(element,className)?'removeClassName':'addClassName'](element,className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
element.removeChild(node);node=nextNode;}
return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);if(element.compareDocumentPosition)
return(element.compareDocumentPosition(ancestor)&8)===8;if(ancestor.contains)
return ancestor.contains(element)&&ancestor!==element;while(element=element.parentNode)
if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=Element.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value||value=='auto'){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}
if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value;},getOpacity:function(element){return $(element).getStyle('opacity');},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText +=';' +styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element;}
for(var property in styles)
if(property=='opacity')element.setOpacity(styles[property]);else
elementStyle[(property=='float'||property=='cssFloat')?(Object.isUndefined(elementStyle.styleFloat)?'cssFloat':'styleFloat'):property]=styles[property];return element;},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element;},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(Prototype.Browser.Opera){element.style.top=0;element.style.left=0;}}
return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden')
element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=Element.viewportOffset(source),delta=[0,0],parent=null;element=$(element);if(Element.getStyle(element,'position')=='absolute'){parent=Element.getOffsetParent(element);delta=Element.viewportOffset(parent);}
if(parent==document.body){delta[0] -=document.body.offsetLeft;delta[1] -=document.body.offsetTop;}
if(options.setLeft)element.style.left=(p[0] -delta[0] +options.offsetLeft) +'px';if(options.setTop)element.style.top=(p[1] -delta[1] +options.offsetTop) +'px';if(options.setWidth)element.style.width=source.offsetWidth +'px';if(options.setHeight)element.style.height=source.offsetHeight +'px';return element;}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(proceed,element,style){switch(style){case'height':case'width':if(!Element.visible(element))return null;var dim=parseInt(proceed(element,style),10);if(dim!==element['offset' +style.capitalize()])
return dim +'px';var properties;if(style==='height'){properties=['border-top-width','padding-top','padding-bottom','border-bottom-width'];}
else{properties=['border-left-width','padding-left','padding-right','border-right-width'];}
return properties.inject(dim,function(memo,property){var val=proceed(element,property);return val===null?memo:memo -parseInt(val,10);}) +'px';default:return proceed(element,style);}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(proceed,element,attribute){if(attribute==='title')return element.title;return proceed(element,attribute);});}
else if(Prototype.Browser.IE){Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))
if(value[1])return parseFloat(value[1])/100;return 1.0;}
if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none'))
return element['offset' +style.capitalize()] +'px';return null;}
return value;};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'');}
element=$(element);var currentStyle=element.currentStyle;if((currentStyle&&!currentStyle.hasLayout)||(!currentStyle&&element.style.zoom=='normal'))
element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element;}else if(value<0.00001)value=0;style.filter=stripAlpha(filter) +'alpha(opacity=' +(value*100) +')';return element;};Element._attributeTranslations=(function(){var classProp='className',forProp='for',el=document.createElement('div');el.setAttribute(classProp,'x');if(el.className!=='x'){el.setAttribute('class','x');if(el.className==='x'){classProp='class';}}
el=null;el=document.createElement('label');el.setAttribute(forProp,'x');if(el.htmlFor!=='x'){el.setAttribute('htmlFor','x');if(el.htmlFor==='x'){forProp='htmlFor';}}
el=null;return{read:{names:{'class':classProp,'className':classProp,'for':forProp,'htmlFor':forProp},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute);},_getAttr2:function(element,attribute){return element.getAttribute(attribute,2);},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:"";},_getEv:(function(){var el=document.createElement('div'),f;el.onclick=Prototype.emptyFunction;var value=el.getAttribute('onclick');if(String(value).indexOf('{')> -1){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;attribute=attribute.toString();attribute=attribute.split('{')[1];attribute=attribute.split('}')[0];return attribute.strip();};}
else if(value===''){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;return attribute.strip();};}
el=null;return f;})(),_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null;},style:function(element){return element.style.cssText.toLowerCase();},title:function(element){return element.title;}}}}})();Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value;},style:function(element,value){element.style.cssText=value?value:'';}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +'encType maxLength readOnly longDesc frameBorder').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr;});(function(v){Object.extend(v,{href:v._getAttr2,src:v._getAttr2,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv});})(Element._attributeTranslations.read.values);if(Prototype.BrowserFeatures.ElementExtensions){(function(){function _descendants(element){var nodes=element.getElementsByTagName('*'),results=[];for(var i=0,node;node=nodes[i];i++)
if(node.tagName!=="!")
results.push(node);return results;}
Element.Methods.down=function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();return Object.isNumber(expression)?_descendants(element)[expression]:Element.select(element,expression)[index||0];}})();}}
else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element;};}
else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1)
if(element.tagName.toUpperCase()=='IMG'&&element.width){element.width++;element.width--;}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n);}catch(e){}
return element;};}
if('outerHTML'in document.documentElement){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element;}
content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next(),fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling)
fragments.each(function(node){parent.insertBefore(node,nextSibling)});else
fragments.each(function(node){parent.appendChild(node)});}
else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};}
Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result;};Element._getContentFromAnonymousElement=function(tagName,html,force){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];var workaround=false;if(t)workaround=true;else if(force){workaround=true;t=['','',0];}
if(workaround){div.innerHTML='&nbsp;' +t[0] +html +t[1];div.removeChild(div.firstChild);for(var i=t[2];i--;){div=div.firstChild;}}
else{div.innerHTML=html;}
return $A(div.childNodes);};Element._insertionTranslations={before:function(element,node){element.parentNode.insertBefore(node,element);},top:function(element,node){element.insertBefore(node,element.firstChild);},bottom:function(element,node){element.appendChild(node);},after:function(element,node){element.parentNode.insertBefore(node,element.nextSibling);},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){var tags=Element._insertionTranslations.tags;Object.extend(tags,{THEAD:tags.TBODY,TFOOT:tags.TBODY,TH:tags.TD});})();Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return!!(node&&node.specified);}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(div){if(!Prototype.BrowserFeatures.ElementExtensions&&div['__proto__']){window.HTMLElement={};window.HTMLElement.prototype=div['__proto__'];Prototype.BrowserFeatures.ElementExtensions=true;}
div=null;})(document.createElement('div'));Element.extend=(function(){function checkDeficiency(tagName){if(typeof window.Element!='undefined'){var proto=window.Element.prototype;if(proto){var id='_' +(Math.random()+'').slice(2),el=document.createElement(tagName);proto[id]='x';var isBuggy=(el[id]!=='x');delete proto[id];el=null;return isBuggy;}}
return false;}
function extendElementWith(element,methods){for(var property in methods){var value=methods[property];if(Object.isFunction(value)&&!(property in element))
element[property]=value.methodize();}}
var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY=checkDeficiency('object');if(Prototype.BrowserFeatures.SpecificElementExtensions){if(HTMLOBJECTELEMENT_PROTOTYPE_BUGGY){return function(element){if(element&&typeof element._extendedByPrototype=='undefined'){var t=element.tagName;if(t&&(/^(?:object|applet|embed)$/i.test(t))){extendElementWith(element,Element.Methods);extendElementWith(element,Element.Methods.Simulated);extendElementWith(element,Element.Methods.ByTag[t.toUpperCase()]);}}
return element;}}
return Prototype.K;}
var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||typeof element._extendedByPrototype!='undefined'||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName.toUpperCase();if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);extendElementWith(element,methods);element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();if(document.documentElement.hasAttribute){Element.hasAttribute=function(element,attribute){return element.hasAttribute(attribute);};}
else{Element.hasAttribute=Element.Methods.Simulated.hasAttribute;}
Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods),"BUTTON":Object.clone(Form.Element.Methods)});}
if(arguments.length==2){var tagName=methods;methods=arguments[1];}
if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);}
function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName])
Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);}
function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination))
destination[property]=value.methodize();}}
function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML' +trans[tagName] +'Element';if(window[klass])return window[klass];klass='HTML' +tagName +'Element';if(window[klass])return window[klass];klass='HTML' +tagName.capitalize() +'Element';if(window[klass])return window[klass];var element=document.createElement(tagName),proto=element['__proto__']||element.constructor.prototype;element=null;return proto;}
var elementPrototype=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(F.ElementExtensions){copy(Element.Methods,elementPrototype);copy(Element.Methods.Simulated,elementPrototype,true);}
if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}}
Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()};},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};(function(viewport){var B=Prototype.Browser,doc=document,element,property={};function getRootElement(){if(B.WebKit&&!doc.evaluate)
return document;if(B.Opera&&window.parseFloat(window.opera.version())<9.5)
return document.body;return document.documentElement;}
function define(D){if(!element)element=getRootElement();property[D]='client' +D;viewport['get' +D]=function(){return element[property[D]]};return viewport['get' +D]();}
viewport.getWidth=define.curry('Width');viewport.getHeight=define.curry('Height');})(document.viewport);Element.Storage={UID:1};Element.addMethods({getStorage:function(element){if(!(element=$(element)))return;var uid;if(element===window){uid=0;}else{if(typeof element._prototypeUID==="undefined")
element._prototypeUID=Element.Storage.UID++;uid=element._prototypeUID;}
if(!Element.Storage[uid])
Element.Storage[uid]=$H();return Element.Storage[uid];},store:function(element,key,value){if(!(element=$(element)))return;if(arguments.length===2){Element.getStorage(element).update(key);}else{Element.getStorage(element).set(key,value);}
return element;},retrieve:function(element,key,defaultValue){if(!(element=$(element)))return;var hash=Element.getStorage(element),value=hash.get(key);if(Object.isUndefined(value)){hash.set(key,defaultValue);value=defaultValue;}
return value;},clone:function(element,deep){if(!(element=$(element)))return;var clone=element.cloneNode(deep);clone._prototypeUID=void 0;if(deep){var descendants=Element.select(clone,'*'),i=descendants.length;while(i--){descendants[i]._prototypeUID=void 0;}}
return Element.extend(clone);},purge:function(element){if(!(element=$(element)))return;var purgeElement=Element._purgeElement;purgeElement(element);var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);return null;}});(function(){function toDecimal(pctString){var match=pctString.match(/^(\d+)%?$/i);if(!match)return null;return(Number(match[1])/100);}
function getPixelValue(value,property,context){var element=null;if(Object.isElement(value)){element=value;value=element.getStyle(property);}
if(value===null){return null;}
if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(value)){return window.parseFloat(value);}
var isPercentage=value.include('%'),isViewport=(context===document.viewport);if(/\d/.test(value)&&element&&element.runtimeStyle&&!(isPercentage&&isViewport)){var style=element.style.left,rStyle=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=style;element.runtimeStyle.left=rStyle;return value;}
if(element&&isPercentage){context=context||element.parentNode;var decimal=toDecimal(value);var whole=null;var position=element.getStyle('position');var isHorizontal=property.include('left')||property.include('right')||property.include('width');var isVertical=property.include('top')||property.include('bottom')||property.include('height');if(context===document.viewport){if(isHorizontal){whole=document.viewport.getWidth();}else if(isVertical){whole=document.viewport.getHeight();}}else{if(isHorizontal){whole=$(context).measure('width');}else if(isVertical){whole=$(context).measure('height');}}
return(whole===null)?0:whole*decimal;}
return 0;}
function toCSSPixels(number){if(Object.isString(number)&&number.endsWith('px')){return number;}
return number +'px';}
function isDisplayed(element){var originalElement=element;while(element&&element.parentNode){var display=element.getStyle('display');if(display==='none'){return false;}
element=$(element.parentNode);}
return true;}
var hasLayout=Prototype.K;if('currentStyle'in document.documentElement){hasLayout=function(element){if(!element.currentStyle.hasLayout){element.style.zoom=1;}
return element;};}
function cssNameFor(key){if(key.include('border'))key=key +'-width';return key.camelize();}
Element.Layout=Class.create(Hash,{initialize:function($super,element,preCompute){$super();this.element=$(element);Element.Layout.PROPERTIES.each(function(property){this._set(property,null);},this);if(preCompute){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false;}},_set:function(property,value){return Hash.prototype.set.call(this,property,value);},set:function(property,value){throw"Properties of Element.Layout are read-only.";},get:function($super,property){var value=$super(property);return value===null?this._compute(property):value;},_begin:function(){if(this._prepared)return;var element=this.element;if(isDisplayed(element)){this._prepared=true;return;}
var originalStyles={position:element.style.position||'',width:element.style.width||'',visibility:element.style.visibility||'',display:element.style.display||''};element.store('prototype_original_styles',originalStyles);var position=element.getStyle('position'),width=element.getStyle('width');if(width==="0px"||width===null){element.style.display='block';width=element.getStyle('width');}
var context=(position==='fixed')?document.viewport:element.parentNode;element.setStyle({position:'absolute',visibility:'hidden',display:'block'});var positionedWidth=element.getStyle('width');var newWidth;if(width&&(positionedWidth===width)){newWidth=getPixelValue(element,'width',context);}else if(position==='absolute'||position==='fixed'){newWidth=getPixelValue(element,'width',context);}else{var parent=element.parentNode,pLayout=$(parent).getLayout();newWidth=pLayout.get('width') -
this.get('margin-left') -
this.get('border-left') -
this.get('padding-left') -
this.get('padding-right') -
this.get('border-right') -
this.get('margin-right');}
element.setStyle({width:newWidth +'px'});this._prepared=true;},_end:function(){var element=this.element;var originalStyles=element.retrieve('prototype_original_styles');element.store('prototype_original_styles',null);element.setStyle(originalStyles);this._prepared=false;},_compute:function(property){var COMPUTATIONS=Element.Layout.COMPUTATIONS;if(!(property in COMPUTATIONS)){throw"Property not found.";}
return this._set(property,COMPUTATIONS[property].call(this,this.element));},toObject:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var obj={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)obj[key]=value;},this);return obj;},toHash:function(){var obj=this.toObject.apply(this,arguments);return new Hash(obj);},toCSS:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var css={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;if(Element.Layout.COMPOSITE_PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)css[cssNameFor(key)]=value +'px';},this);return css;},inspect:function(){return"#<Element.Layout>";}});Object.extend(Element.Layout,{PROPERTIES:$w('height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height'),COMPOSITE_PROPERTIES:$w('padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height'),COMPUTATIONS:{'height':function(element){if(!this._preComputing)this._begin();var bHeight=this.get('border-box-height');if(bHeight<=0){if(!this._preComputing)this._end();return 0;}
var bTop=this.get('border-top'),bBottom=this.get('border-bottom');var pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');if(!this._preComputing)this._end();return bHeight -bTop -bBottom -pTop -pBottom;},'width':function(element){if(!this._preComputing)this._begin();var bWidth=this.get('border-box-width');if(bWidth<=0){if(!this._preComputing)this._end();return 0;}
var bLeft=this.get('border-left'),bRight=this.get('border-right');var pLeft=this.get('padding-left'),pRight=this.get('padding-right');if(!this._preComputing)this._end();return bWidth -bLeft -bRight -pLeft -pRight;},'padding-box-height':function(element){var height=this.get('height'),pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');return height +pTop +pBottom;},'padding-box-width':function(element){var width=this.get('width'),pLeft=this.get('padding-left'),pRight=this.get('padding-right');return width +pLeft +pRight;},'border-box-height':function(element){if(!this._preComputing)this._begin();var height=element.offsetHeight;if(!this._preComputing)this._end();return height;},'border-box-width':function(element){if(!this._preComputing)this._begin();var width=element.offsetWidth;if(!this._preComputing)this._end();return width;},'margin-box-height':function(element){var bHeight=this.get('border-box-height'),mTop=this.get('margin-top'),mBottom=this.get('margin-bottom');if(bHeight<=0)return 0;return bHeight +mTop +mBottom;},'margin-box-width':function(element){var bWidth=this.get('border-box-width'),mLeft=this.get('margin-left'),mRight=this.get('margin-right');if(bWidth<=0)return 0;return bWidth +mLeft +mRight;},'top':function(element){var offset=element.positionedOffset();return offset.top;},'bottom':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pHeight=parent.measure('height');var mHeight=this.get('border-box-height');return pHeight -mHeight -offset.top;},'left':function(element){var offset=element.positionedOffset();return offset.left;},'right':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pWidth=parent.measure('width');var mWidth=this.get('border-box-width');return pWidth -mWidth -offset.left;},'padding-top':function(element){return getPixelValue(element,'paddingTop');},'padding-bottom':function(element){return getPixelValue(element,'paddingBottom');},'padding-left':function(element){return getPixelValue(element,'paddingLeft');},'padding-right':function(element){return getPixelValue(element,'paddingRight');},'border-top':function(element){return getPixelValue(element,'borderTopWidth');},'border-bottom':function(element){return getPixelValue(element,'borderBottomWidth');},'border-left':function(element){return getPixelValue(element,'borderLeftWidth');},'border-right':function(element){return getPixelValue(element,'borderRightWidth');},'margin-top':function(element){return getPixelValue(element,'marginTop');},'margin-bottom':function(element){return getPixelValue(element,'marginBottom');},'margin-left':function(element){return getPixelValue(element,'marginLeft');},'margin-right':function(element){return getPixelValue(element,'marginRight');}}});if('getBoundingClientRect'in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{'right':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.right -rect.right).round();},'bottom':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.bottom -rect.bottom).round();}});}
Element.Offset=Class.create({initialize:function(left,top){this.left=left.round();this.top=top.round();this[0]=this.left;this[1]=this.top;},relativeTo:function(offset){return new Element.Offset(this.left -offset.left,this.top -offset.top);},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this);},toString:function(){return"[#{left}, #{top}]".interpolate(this);},toArray:function(){return[this.left,this.top];}});function getLayout(element,preCompute){return new Element.Layout(element,preCompute);}
function measure(element,property){return $(element).getLayout().get(property);}
function getDimensions(element){element=$(element);var display=Element.getStyle(element,'display');if(display&&display!=='none'){return{width:element.offsetWidth,height:element.offsetHeight};}
var style=element.style;var originalStyles={visibility:style.visibility,position:style.position,display:style.display};var newStyles={visibility:'hidden',display:'block'};if(originalStyles.position!=='fixed')
newStyles.position='absolute';Element.setStyle(element,newStyles);var dimensions={width:element.offsetWidth,height:element.offsetHeight};Element.setStyle(element,originalStyles);return dimensions;}
function getOffsetParent(element){element=$(element);if(isDocument(element)||isDetached(element)||isBody(element)||isHtml(element))
return $(document.body);var isInline=(Element.getStyle(element,'display')==='inline');if(!isInline&&element.offsetParent)return $(element.offsetParent);while((element=element.parentNode)&&element!==document.body){if(Element.getStyle(element,'position')!=='static'){return isHtml(element)?$(document.body):$(element);}}
return $(document.body);}
function cumulativeOffset(element){element=$(element);var valueT=0,valueL=0;if(element.parentNode){do{valueT +=element.offsetTop||0;valueL +=element.offsetLeft||0;element=element.offsetParent;}while(element);}
return new Element.Offset(valueL,valueT);}
function positionedOffset(element){element=$(element);var layout=element.getLayout();var valueT=0,valueL=0;do{valueT +=element.offsetTop||0;valueL +=element.offsetLeft||0;element=element.offsetParent;if(element){if(isBody(element))break;var p=Element.getStyle(element,'position');if(p!=='static')break;}}while(element);valueL -=layout.get('margin-top');valueT -=layout.get('margin-left');return new Element.Offset(valueL,valueT);}
function cumulativeScrollOffset(element){var valueT=0,valueL=0;do{valueT +=element.scrollTop||0;valueL +=element.scrollLeft||0;element=element.parentNode;}while(element);return new Element.Offset(valueL,valueT);}
function viewportOffset(forElement){element=$(element);var valueT=0,valueL=0,docBody=document.body;var element=forElement;do{valueT +=element.offsetTop||0;valueL +=element.offsetLeft||0;if(element.offsetParent==docBody&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(element!=docBody){valueT -=element.scrollTop||0;valueL -=element.scrollLeft||0;}}while(element=element.parentNode);return new Element.Offset(valueL,valueT);}
function absolutize(element){element=$(element);if(Element.getStyle(element,'position')==='absolute'){return element;}
var offsetParent=getOffsetParent(element);var eOffset=element.viewportOffset(),pOffset=offsetParent.viewportOffset();var offset=eOffset.relativeTo(pOffset);var layout=element.getLayout();element.store('prototype_absolutize_original_styles',{left:element.getStyle('left'),top:element.getStyle('top'),width:element.getStyle('width'),height:element.getStyle('height')});element.setStyle({position:'absolute',top:offset.top +'px',left:offset.left +'px',width:layout.get('width') +'px',height:layout.get('height') +'px'});return element;}
function relativize(element){element=$(element);if(Element.getStyle(element,'position')==='relative'){return element;}
var originalStyles=element.retrieve('prototype_absolutize_original_styles');if(originalStyles)element.setStyle(originalStyles);return element;}
if(Prototype.Browser.IE){getOffsetParent=getOffsetParent.wrap(function(proceed,element){element=$(element);if(isDocument(element)||isDetached(element)||isBody(element)||isHtml(element))
return $(document.body);var position=element.getStyle('position');if(position!=='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});positionedOffset=positionedOffset.wrap(function(proceed,element){element=$(element);if(!element.parentNode)return new Element.Offset(0,0);var position=element.getStyle('position');if(position!=='static')return proceed(element);var offsetParent=element.getOffsetParent();if(offsetParent&&offsetParent.getStyle('position')==='fixed')
hasLayout(offsetParent);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});}else if(Prototype.Browser.Webkit){cumulativeOffset=function(element){element=$(element);var valueT=0,valueL=0;do{valueT +=element.offsetTop||0;valueL +=element.offsetLeft||0;if(element.offsetParent==document.body)
if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return new Element.Offset(valueL,valueT);};}
Element.addMethods({getLayout:getLayout,measure:measure,getDimensions:getDimensions,getOffsetParent:getOffsetParent,cumulativeOffset:cumulativeOffset,positionedOffset:positionedOffset,cumulativeScrollOffset:cumulativeScrollOffset,viewportOffset:viewportOffset,absolutize:absolutize,relativize:relativize});function isBody(element){return element.nodeName.toUpperCase()==='BODY';}
function isHtml(element){return element.nodeName.toUpperCase()==='HTML';}
function isDocument(element){return element.nodeType===Node.DOCUMENT_NODE;}
function isDetached(element){return element!==document.body&&!Element.descendantOf(element,document.body);}
if('getBoundingClientRect'in document.documentElement){Element.addMethods({viewportOffset:function(element){element=$(element);if(isDetached(element))return new Element.Offset(0,0);var rect=element.getBoundingClientRect(),docEl=document.documentElement;return new Element.Offset(rect.left -docEl.clientLeft,rect.top -docEl.clientTop);}});}})();window.$$=function(){var expression=$A(arguments).join(', ');return Prototype.Selector.select(expression,document);};Prototype.Selector=(function(){function select(){throw new Error('Method "Prototype.Selector.select" must be defined.');}
function match(){throw new Error('Method "Prototype.Selector.match" must be defined.');}
function find(elements,expression,index){index=index||0;var match=Prototype.Selector.match,length=elements.length,matchIndex=0,i;for(i=0;i<length;i++){if(match(elements[i],expression)&&index==matchIndex++){return Element.extend(elements[i]);}}}
function extendElements(elements){for(var i=0,length=elements.length;i<length;i++){Element.extend(elements[i]);}
return elements;}
var K=Prototype.K;return{select:select,match:match,find:find,extendElements:(Element.extend===K)?K:extendElements,extendElement:Element.extend};})();Prototype._original_property=window.Sizzle;/*!
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}
if(!selector||typeof selector!=="string"){return results;}
var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}
if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0] +parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
selector +=parts.shift();set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length -1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
if(pop==null){pop=context;}
Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
if(!checkSet){checkSet=set;}
if(!checkSet){throw"Syntax error, unrecognized expression: " +(cur||selector);}
if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length -1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: " +expr;}else{break;}}
old=expr;}
return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" " +match[1].replace(/\\/g,"") +" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" " +elem.className +" ").indexOf(match)>=0)){if(!inplace)
result.push(elem);}else if(inplace){curLoop[i]=false;}}}
return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+" +match[2]||match[2]);match[2]=(test[1] +(test[2]||1)) -0;match[3]=test[3] -0;}
match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
if(match[2]==="~="){match[4]=" " +match[4] +" ";}
return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length -1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3] -0;},gt:function(elem,i,match){return i>match[3] -0;},nth:function(elem,i,match){return match[3] -0==i;},eq:function(elem,i,match){return match[3] -0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1)return false;}
if(type=='first')return true;node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1)return false;}
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex= ++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex -last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" " +(elem.className||elem.getAttribute("class")) +" ").indexOf(match)> -1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result +"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" " +value +" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length -check.length)===check:type==="|="?value===check||value.substr(0,check.length +1)===check +"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source +/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source +Expr.match[type].source);}
var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;}
return 0;}
var ret=a.compareDocumentPosition(b)&4? -1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;}
return 0;}
var ret=a.sourceIndex -b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;}
return 0;}
var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
(function(){var form=document.createElement("div"),id="script" +(new Date).getTime();form.innerHTML="<a name='" +id +"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
results=tmp;}
return results;};}
div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
div=null;})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
div=null;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
elem=elem[dir];}
checkSet[i]=match;}}}
var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML";};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later +=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
selector=Expr.relative[selector]?selector +"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};window.Sizzle=Sizzle;})();;(function(engine){var extendElements=Prototype.Selector.extendElements;function select(selector,scope){return extendElements(engine(selector,scope||document));}
function match(element,selector){return engine.matches(selector,[element]).length==1;}
Prototype.Selector.engine=engine;Prototype.Selector.select=select;Prototype.Selector.match=match;})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;var Form={reset:function(form){form=$(form);form.reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(Object.isUndefined(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit,accumulator,initial;if(options.hash){initial={};accumulator=function(result,key,value){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);}else result[key]=value;return result;};}else{initial='';accumulator=function(result,key,value){return result +(result?'&':'') +encodeURIComponent(key) +'=' +encodeURIComponent(value);}}
return elements.inject(initial,function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&element.type!='file'&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){result=accumulator(result,key,value);}}
return result;});}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){var elements=$(form).getElementsByTagName('*'),element,arr=[],serializers=Form.Element.Serializers;for(var i=0;element=elements[i];i++){arr.push(element);}
return arr.inject([],function(elements,child){if(serializers[child.tagName.toLowerCase()])
elements.push(Element.extend(child));return elements;})},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
continue;matchingInputs.push(Element.extend(input));}
return matchingInputs;},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form;},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form;},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled;});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return/^(?:input|select|textarea)$/i.test(element.tagName);});},focusFirstElement:function(form){form=$(form);var element=form.findFirstElement();if(element)element.activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);}
if(form.hasAttribute('method')&&!options.method)
options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}}
return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!(/^(?:button|reset|submit)$/i.test(element.type))))
element.select();}catch(e){}
return element;},disable:function(element){element=$(element);element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers=(function(){function input(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return inputSelector(element,value);default:return valueSelector(element,value);}}
function inputSelector(element,value){if(Object.isUndefined(value))
return element.checked?element.value:null;else element.checked=!!value;}
function valueSelector(element,value){if(Object.isUndefined(value))return element.value;else element.value=value;}
function select(element,value){if(Object.isUndefined(value))
return(element.type==='select-one'?selectOne:selectMany)(element);var opt,currentValue,single=!Object.isArray(value);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];currentValue=this.optionValue(opt);if(single){if(currentValue==value){opt.selected=true;return;}}
else opt.selected=value.include(currentValue);}}
function selectOne(element){var index=element.selectedIndex;return index>=0?optionValue(element.options[index]):null;}
function selectMany(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(optionValue(opt));}
return values;}
function optionValue(opt){return Element.hasAttribute(opt,'value')?opt.value:opt.text;}
return{input:input,inputSelector:inputSelector,textarea:valueSelector,select:select,selectOne:selectOne,selectMany:selectMany,optionValue:optionValue,button:valueSelector};})();Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue();},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value;}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
this.registerFormCallbacks();else
this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});(function(){var Event={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}};var docEl=document.documentElement;var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED='onmouseenter'in docEl&&'onmouseleave'in docEl;var isIELegacyEvent=function(event){return false;};if(window.attachEvent){if(window.addEventListener){isIELegacyEvent=function(event){return!(event instanceof window.Event);};}else{isIELegacyEvent=function(event){return true;};}}
var _isButton;function _isButtonForDOMEvents(event,code){return event.which?(event.which===code +1):(event.button===code);}
var legacyButtonMap={0:1,1:4,2:2};function _isButtonForLegacyEvents(event,code){return event.button===legacyButtonMap[code];}
function _isButtonForWebKit(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==2||(event.which==1&&event.metaKey);case 2:return event.which==3;default:return false;}}
if(window.attachEvent){if(!window.addEventListener){_isButton=_isButtonForLegacyEvents;}else{_isButton=function(event,code){return isIELegacyEvent(event)?_isButtonForLegacyEvents(event,code):_isButtonForDOMEvents(event,code);}}}else if(Prototype.Browser.WebKit){_isButton=_isButtonForWebKit;}else{_isButton=_isButtonForDOMEvents;}
function isLeftClick(event){return _isButton(event,0)}
function isMiddleClick(event){return _isButton(event,1)}
function isRightClick(event){return _isButton(event,2)}
function element(event){event=Event.extend(event);var node=event.target,type=event.type,currentTarget=event.currentTarget;if(currentTarget&&currentTarget.tagName){if(type==='load'||type==='error'||(type==='click'&&currentTarget.tagName.toLowerCase()==='input'&&currentTarget.type==='radio'))
node=currentTarget;}
if(!node)return null;if(node.nodeType==Node.TEXT_NODE)
node=node.parentNode;return Element.extend(node);}
function findElement(event,expression){var element=Event.element(event);if(!expression)return element;while(element){if(Object.isElement(element)&&Prototype.Selector.match(element,expression)){return Element.extend(element);}
element=element.parentNode;}}
function pointer(event){return{x:pointerX(event),y:pointerY(event)};}
function pointerX(event){var docElement=document.documentElement,body=document.body||{scrollLeft:0};return event.pageX||(event.clientX +
(docElement.scrollLeft||body.scrollLeft) -
(docElement.clientLeft||0));}
function pointerY(event){var docElement=document.documentElement,body=document.body||{scrollTop:0};return event.pageY||(event.clientY +
(docElement.scrollTop||body.scrollTop) -
(docElement.clientTop||0));}
function stop(event){Event.extend(event);event.preventDefault();event.stopPropagation();event.stopped=true;}
Event.Methods={isLeftClick:isLeftClick,isMiddleClick:isMiddleClick,isRightClick:isRightClick,element:element,findElement:findElement,pointer:pointer,pointerX:pointerX,pointerY:pointerY,stop:stop};var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m;});if(window.attachEvent){function _relatedTarget(event){var element;switch(event.type){case'mouseover':case'mouseenter':element=event.fromElement;break;case'mouseout':case'mouseleave':element=event.toElement;break;default:return null;}
return Element.extend(element);}
var additionalMethods={stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return'[object Event]'}};Event.extend=function(event,element){if(!event)return false;if(!isIELegacyEvent(event))return event;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement||element,relatedTarget:_relatedTarget(event),pageX:pointer.x,pageY:pointer.y});Object.extend(event,methods);Object.extend(event,additionalMethods);return event;};}else{Event.extend=Prototype.K;}
if(window.addEventListener){Event.prototype=window.Event.prototype||document.createEvent('HTMLEvents').__proto__;Object.extend(Event.prototype,methods);}
function _createResponder(element,eventName,handler){var registry=Element.retrieve(element,'prototype_event_registry');if(Object.isUndefined(registry)){CACHE.push(element);registry=Element.retrieve(element,'prototype_event_registry',$H());}
var respondersForEvent=registry.get(eventName);if(Object.isUndefined(respondersForEvent)){respondersForEvent=[];registry.set(eventName,respondersForEvent);}
if(respondersForEvent.pluck('handler').include(handler))return false;var responder;if(eventName.include(":")){responder=function(event){if(Object.isUndefined(event.eventName))
return false;if(event.eventName!==eventName)
return false;Event.extend(event,element);handler.call(element,event);};}else{if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED&&(eventName==="mouseenter"||eventName==="mouseleave")){if(eventName==="mouseenter"||eventName==="mouseleave"){responder=function(event){Event.extend(event,element);var parent=event.relatedTarget;while(parent&&parent!==element){try{parent=parent.parentNode;}
catch(e){parent=element;}}
if(parent===element)return;handler.call(element,event);};}}else{responder=function(event){Event.extend(event,element);handler.call(element,event);};}}
responder.handler=handler;respondersForEvent.push(responder);return responder;}
function _destroyCache(){for(var i=0,length=CACHE.length;i<length;i++){Event.stopObserving(CACHE[i]);CACHE[i]=null;}}
var CACHE=[];if(Prototype.Browser.IE)
window.attachEvent('onunload',_destroyCache);if(Prototype.Browser.WebKit)
window.addEventListener('unload',Prototype.emptyFunction,false);var _getDOMEventName=Prototype.K,translations={mouseenter:"mouseover",mouseleave:"mouseout"};if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED){_getDOMEventName=function(eventName){return(translations[eventName]||eventName);};}
function observe(element,eventName,handler){element=$(element);if(eventName==__i2rd_domupdate_event){__i2rd_domupdate_handlers.push(handler);return;}
var responder=_createResponder(element,eventName,handler);if(!responder)return element;if(eventName.include(':')){if(element.addEventListener)
element.addEventListener("dataavailable",responder,false);else{element.attachEvent("ondataavailable",responder);element.attachEvent("onlosecapture",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.addEventListener)
element.addEventListener(actualEventName,responder,false);else
element.attachEvent("on" +actualEventName,responder);}
return element;}
function stopObserving(element,eventName,handler){element=$(element);if(eventName==__i2rd_domupdate_event){__i2rd_domupdate_handlers=__i2rd_domupdate_handlers.without(handler);return;}
var registry=Element.retrieve(element,'prototype_event_registry');if(!registry)return element;if(!eventName){registry.each(function(pair){var eventName=pair.key;stopObserving(element,eventName);});return element;}
var responders=registry.get(eventName);if(!responders)return element;if(!handler){responders.each(function(r){stopObserving(element,eventName,r.handler);});return element;}
var i=responders.length,responder;while(i--){if(responders[i].handler===handler){responder=responders[i];break;}}
if(!responder)return element;if(eventName.include(':')){if(element.removeEventListener)
element.removeEventListener("dataavailable",responder,false);else{element.detachEvent("ondataavailable",responder);element.detachEvent("onlosecapture",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.removeEventListener)
element.removeEventListener(actualEventName,responder,false);else
element.detachEvent('on' +actualEventName,responder);}
registry.set(eventName,responders.without(responder));return element;}
function fire(element,eventName,memo,bubble){element=$(element);if(Object.isUndefined(bubble))
bubble=true;if(element==document&&document.createEvent&&!element.dispatchEvent)
element=document.documentElement;var event;if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent('dataavailable',bubble,true);}else{event=document.createEventObject();event.eventType=bubble?'ondataavailable':'onlosecapture';}
event.eventName=eventName;event.memo=memo||{};if(document.createEvent)
element.dispatchEvent(event);else
element.fireEvent(event.eventType,event);return Event.extend(event);}
Event.Handler=Class.create({initialize:function(element,eventName,selector,callback){this.element=$(element);this.eventName=eventName;this.selector=selector;this.callback=callback;this.handler=this.handleEvent.bind(this);},start:function(){Event.observe(this.element,this.eventName,this.handler);return this;},stop:function(){Event.stopObserving(this.element,this.eventName,this.handler);return this;},handleEvent:function(event){var element=Event.findElement(event,this.selector);if(element)this.callback.call(this.element,event,element);}});function on(element,eventName,selector,callback){element=$(element);if(Object.isFunction(selector)&&Object.isUndefined(callback)){callback=selector,selector=null;}
return new Event.Handler(element,eventName,selector,callback).start();}
Object.extend(Event,Event.Methods);Object.extend(Event,{fire:fire,observe:observe,stopObserving:stopObserving,on:on});Element.addMethods({fire:fire,observe:observe,stopObserving:stopObserving,on:on});Object.extend(document,{fire:fire.methodize(),observe:observe.methodize(),stopObserving:stopObserving.methodize(),on:on.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,Event);else window.Event=Event;})();(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearTimeout(timer);document.loaded=true;document.fire('dom:loaded');}
function checkReadyState(){if(document.readyState==='complete'){document.stopObserving('readystatechange',checkReadyState);fireContentLoadedEvent();}}
function pollDoScroll(){try{document.documentElement.doScroll('left');}
catch(e){timer=pollDoScroll.defer();return;}
fireContentLoadedEvent();}
if(document.addEventListener){document.addEventListener('DOMContentLoaded',fireContentLoadedEvent,false);}else{document.observe('readystatechange',checkReadyState);if(window==top)
timer=pollDoScroll.defer();}
Event.observe(window,'load',fireContentLoadedEvent);})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},within:function(element,x,y){if(this.includeScrollOffsets)
return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1] +element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0] +element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x +offsetcache[0] -this.deltaX;this.ycomp=y +offsetcache[1] -this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1] +element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0] +element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
return((this.offset[1] +element.offsetHeight) -this.ycomp)/element.offsetHeight;if(mode=='horizontal')
return((this.offset[0] +element.offsetWidth) -this.xcomp)/element.offsetWidth;},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element);},relativize:function(element){Position.prepare();return Element.relativize(element);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options);}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' " +name +" ')]";}
instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*' +cond,element):[];}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' ' +className +' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' ' +child.className +' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' ' +name +' ');}))))
elements.push(Element.extend(child));}
return elements;};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className);};}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);(function(){window.Selector=Class.create({initialize:function(expression){this.expression=expression.strip();},findElements:function(rootElement){return Prototype.Selector.select(this.expression,rootElement);},match:function(element){return Prototype.Selector.match(element,this.expression);},toString:function(){return this.expression;},inspect:function(){return"#<Selector: " +this.expression +">";}});Object.extend(Selector,{matchElements:function(elements,expression){var match=Prototype.Selector.match,results=[];for(var i=0,length=elements.length;i<length;i++){var element=elements[i];if(match(element,expression)){results.push(Element.extend(element));}}
return results;},findElement:function(elements,expression,index){index=index||0;var matchIndex=0,element;for(var i=0,length=elements.length;i<length;i++){element=elements[i];if(Prototype.Selector.match(element,expression)&&index===matchIndex++){return Element.extend(element);}}},findChildElements:function(element,expressions){var selector=expressions.toArray().join(', ');return Prototype.Selector.select(selector,element||document);}});})();
/*  JS Resource: lib/logger.js  */

if(typeof log4jsdefined=='undefined'){log4jsdefined=true;var log4js={hasConsole:function(){return(typeof console!='undefined'&&typeof console.info!='undefined');}};log4js.getAjaxTransport=function(){try{return new XMLHttpRequest();}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
return null;};log4js.funcname=function(f){var s,v=/function (\w*)/.exec(f.toString());if(v&&v.length>1){s=v[1];}
if(!s||(s.length==0)){return"anonymous";}
return s;};log4js.stacktrace=function(){try{var ac,s="";for(ac=arguments.callee;!!ac;ac=ac.caller){if(ac==log4js.stacktrace||ac==log4js.logger.log){continue;}
s +=log4js.funcname(ac) +"\n";if(ac.caller==ac){break;}}
return s;}catch(ee){alert("Unable to get stack trace. " +ee.message +"\n" +ee.stack);}};log4js.LogEvent=function(logLevel,message,exceptionName,exceptionMessage,stackTrace){this.logLevel=logLevel;this.message=message;this.exceptionName=exceptionName;this.exceptionMessage=exceptionMessage;this.stackTrace=stackTrace;};log4js.LogEvent.prototype={encodeParam:function(queueId){var b="&loglevel."+queueId+"="+this.logLevel+"&message."+queueId+"="+encodeURIComponent(this.message);if(this.exceptionName){b+="&exceptionname."+queueId+"="+encodeURIComponent(this.exceptionName);}
if(this.exceptionMessage){b+="&exceptionmessage."+queueId+"="+encodeURIComponent(this.exceptionMessage);}
if(this.stackTrace){b+="&exceptionstacktrace."+queueId+"="+encodeURIComponent(this.stackTrace);}
return b;}};log4js.storage=window.sessionStorage||{};log4js.LogLevel={FATAL:"FATAL",ERROR:"ERROR",WARN:"WARN",INFO:"INFO",DEBUG:"DEBUG"};log4js.__Logger=function(){this.ajaxSync=false;this.logTarget=window.location||document.location||document.URL;this.internalError=false;this.currentLevel= -1;this.timeout=null;this.lastlog=new Date();var level=log4js["loglevel"];if(level){this.currentLevel=this.getLogLevelInt(level);}
var me=this,unload=function OnUnload(){me.cleanup();delete me;};if(window.attachEvent)window.attachEvent('onunload',unload);else window.addEventListener('unload',unload,false);};log4js.__Logger.prototype={queue:[],cleanup:function(evt){if(this.timeout){window.clearTimeout(this.timeout);}
this.ajaxSync=true;this.flushQueue(true);},getLogLevelInt:function(level){switch(level){case log4js.LogLevel.FATAL:return 50000;case log4js.LogLevel.ERROR:return 40000;case log4js.LogLevel.WARN:return 30000;case log4js.LogLevel.INFO:return 20000;case log4js.LogLevel.DEBUG:return 10000;default:return 20000;}},canLog:function(level){return this.currentLevel<=this.getLogLevelInt(level);},setLogLevel:function(level){this.currentLevel=this.getLogLevelInt(level);log4js.storage["logLevel"]=level;},setInternalError:function(){this.internalError=true;},isOn:function(){return!this.internalError;},log:function(logLevel,msg,ex){var shouldLog=this.canLog(logLevel);try{if(!msg){return;}
var level=log4js.LogLevel.INFO;if(logLevel){level=logLevel;}
if(!this.isOn()||!shouldLog){return;}
this.lastlog=new Date();var en,em,st;if(ex){if(ex.name){en=ex.name;}
if(ex.message){em=ex.message;}
if(ex.stack){st=ex.stack;}
else{st=log4js.stacktrace();}}
var le=new log4js.LogEvent(logLevel,msg,en,em,st);this.queue.push(le);if(this.queue.length>50){this.flushQueue(true);}
else if(!this.timeout){var me=this;this.timeout=window.setTimeout(function(){me.flushQueue();delete me;},1500);}}
catch(e){alert("Logger misconfigured: " +e.message);}},fatal:function(msg,ex){this.log(log4js.LogLevel.FATAL,msg,ex);},error:function(msg,ex){this.log(log4js.LogLevel.ERROR,msg,ex);},warn:function(msg,ex){this.log(log4js.LogLevel.WARN,msg,ex);},info:function(msg,ex){this.log(log4js.LogLevel.INFO,msg,ex);},debug:function(msg,ex){this.log(log4js.LogLevel.DEBUG,msg,ex);},clog:function(msg,ll){if(!log4js.hasConsole()){return;}
switch(ll){case log4js.LogLevel.FATAL:case log4js.LogLevel.ERROR:console.error(msg);break;case log4js.LogLevel.WARN:console.warn(msg);break;case log4js.LogLevel.INFO:console.info(msg);break;case log4js.LogLevel.DEBUG:default:console.debug(msg);break;}},flushQueue:function(force){this.timeout=null;var size=this.queue.length;if(size==0){return;}
var now=new Date();if(!force&&(now.getTime() -this.lastlog.getTime())<250){var me=this;this.timeout=window.setTimeout(function(){me.flushQueue();delete me;},500);return;}
var h,b="?log4js.queue_size=" +size;for(h=0;h<size;h++){var qe=this.queue[h];try{this.clog(qe.message,qe.logLevel);if(qe.exceptionMessage){this.clog(qe.exceptionMessage,qe.logLevel);}
if(qe.stackTrace){this.clog(qe.stackTrace,qe.logLevel);}}catch(e){}
b +=qe.encodeParam(h);}
var ajax=log4js.getAjaxTransport();if(ajax){if(!this.ajaxSync){ajax.onreadystatechange=log4js.__getReqCallback(ajax,this);}
ajax.open("POST",window.location.href,!this.ajaxSync);ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');ajax.setRequestHeader("Filter-Logging","on");ajax.setRequestHeader("Filter-Logging_Queue_Size",size);ajax.send(b);}
this.queue.length=0;}};log4js.logger=new log4js.__Logger();log4js.__getReqCallback=function(ajax,log){var req=ajax,logger=log;return function(){if(req.readyState==4){if(req.status==200||req.status==0){if(req.responseText){logger.setLogLevel(req.responseText);}}else{logger.setInternalError();}
try{if(req&&req.onreadystatechange){delete req.onreadystatechange;}}catch(e){}}};};}
/*  JS Resource: Javascript__Path  */

var resourcesPath='/resources/dyn/docroot/';
/*  JS Resource: FCKeditor/ckeditor.js  */

if(typeof CKEDITOR_BASEPATH=="undefined"){var CKEDITOR_BASEPATH=resourcesPath +"FCKeditor/";}
(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var e={timestamp:'B5GJ5GG',version:'3.6.1',revision:'7072',_:{},status:'unloaded',basePath:(function(){var h=window.CKEDITOR_BASEPATH||'';if(!h){var i=document.getElementsByTagName('script');for(var j=0;j<i.length;j++){var k=i[j].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(k){h=k[1];break;}}}if(h.indexOf(':/')==-1)if(h.indexOf('/')===0)h=location.href.match(/^.*?:\/\/[^\/]*/)[0]+h;else h=location.href.match(/^[^\?]*\/(?:)/)[0]+h;if(!h)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return h;})(),getUrl:function(h){if(h.indexOf(':/')==-1&&h.indexOf('/')!==0)h=this.basePath+h;if(this.timestamp&&h.charAt(h.length-1)!='/'&&!/[&?]t=/.test(h))h+=(h.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return h;}},f=window.CKEDITOR_GETURL;if(f){var g=e.getUrl;e.getUrl=function(h){return f.call(e,h)||g.call(e,h);};}return e;})();var e=CKEDITOR;if(!e.event){e.event=function(){};e.event.implementOn=function(f){var g=e.event.prototype;for(var h in g){if(f[h]==undefined)f[h]=g[h];}};e.event.prototype=(function(){var f=function(h){var i=h.getPrivate&&h.getPrivate()||h._||(h._={});return i.events||(i.events={});},g=function(h){this.name=h;this.listeners=[];};g.prototype={getListenerIndex:function(h){for(var i=0,j=this.listeners;i<j.length;i++){if(j[i].fn==h)return i;}return-1;}};return{on:function(h,i,j,k,l){var m=f(this),n=m[h]||(m[h]=new g(h));if(n.getListenerIndex(i)<0){var o=n.listeners;if(!j)j=this;if(isNaN(l))l=10;var p=this,q=function(s,t,u,v){var w={name:h,sender:this,editor:s,data:t,listenerData:k,stop:u,cancel:v,removeListener:function(){p.removeListener(h,i);}};i.call(j,w);return w.data;};q.fn=i;q.priority=l;for(var r=o.length-1;r>=0;r--){if(o[r].priority<=l){o.splice(r+1,0,q);return;}}o.unshift(q);}},fire:(function(){var h=false,i=function(){h=true;},j=false,k=function(){j=true;};return function(l,m,n){var o=f(this)[l],p=h,q=j;h=j=false;if(o){var r=o.listeners;if(r.length){r=r.slice(0);for(var s=0;s<r.length;s++){var t=r[s].call(this,n,m,i,k);if(typeof t!='undefined')m=t;if(h||j)break;}}}var u=j||(typeof m=='undefined'?false:m);h=p;j=q;return u;};})(),fireOnce:function(h,i,j){var k=this.fire(h,i,j);delete f(this)[h];return k;},removeListener:function(h,i){var j=f(this)[h];if(j){var k=j.getListenerIndex(i);if(k>=0)j.listeners.splice(k,1);}},hasListeners:function(h){var i=f(this)[h];return i&&i.listeners.length>0;}};})();}if(!e.editor){e.ELEMENT_MODE_NONE=0;e.ELEMENT_MODE_REPLACE=1;e.ELEMENT_MODE_APPENDTO=2;e.editor=function(f,g,h,i){var j=this;j._={instanceConfig:f,element:g,data:i};j.elementMode=h||0;e.event.call(j);j._init();};e.editor.replace=function(f,g){var h=f;if(typeof h!='object'){h=document.getElementById(f);if(h&&h.tagName.toLowerCase()in{style:1,script:1,base:1,link:1,meta:1,title:1})h=null;if(!h){var i=0,j=document.getElementsByName(f);while((h=j[i++])&&h.tagName.toLowerCase()!='textarea'){}}if(!h)throw'[CKEDITOR.editor.replace] The element with id or name "'+f+'" was not found.';}h.style.visibility='hidden';return new e.editor(g,h,1);};e.editor.appendTo=function(f,g,h){var i=f;if(typeof i!='object'){i=document.getElementById(f);if(!i)throw'[CKEDITOR.editor.appendTo] The element with id "'+f+'" was not found.';}return new e.editor(g,i,2,h);};e.editor.prototype={_init:function(){var f=e.editor._pending||(e.editor._pending=[]);f.push(this);},fire:function(f,g){return e.event.prototype.fire.call(this,f,g,this);},fireOnce:function(f,g){return e.event.prototype.fireOnce.call(this,f,g,this);}};e.event.implementOn(e.editor.prototype,true);}if(!e.env)e.env=(function(){var f=navigator.userAgent.toLowerCase(),g=window.opera,h={ie:/*@cc_on!@*/false,opera:!!g&&g.version,webkit:f.indexOf(' applewebkit/')>-1,air:f.indexOf(' adobeair/')>-1,mac:f.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:f.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var k=document.domain,l=window.location.hostname;return k!=l&&k!='['+l+']';},secure:location.protocol=='https:'};h.gecko=navigator.product=='Gecko'&&!h.webkit&&!h.opera;var i=0;if(h.ie){i=parseFloat(f.match(/msie (\d+)/)[1]);h.ie8=!!document.documentMode;h.ie8Compat=document.documentMode==8;h.ie9Compat=document.documentMode==9;h.ie7Compat=i==7&&!document.documentMode||document.documentMode==7;h.ie6Compat=i<7||h.quirks;}if(h.gecko){var j=f.match(/rv:([\d\.]+)/);if(j){j=j[1].split('.');i=j[0]*10000+(j[1]||0)*100+ +(j[2]||0);}}if(h.opera)i=parseFloat(g.version());if(h.air)i=parseFloat(f.match(/ adobeair\/(\d+)/)[1]);if(h.webkit)i=parseFloat(f.match(/ applewebkit\/(\d+)/)[1]);h.version=i;h.isCompatible=!h.mobile&&(h.ie&&i>=6||h.gecko&&i>=10801||h.opera&&i>=9.5||h.air&&i>=1||h.webkit&&i>=522||false);h.cssClass='cke_browser_'+(h.ie?'ie':h.gecko?'gecko':h.opera?'opera':h.webkit?'webkit':'unknown');if(h.quirks)h.cssClass+=' cke_browser_quirks';if(h.ie){h.cssClass+=' cke_browser_ie'+(h.version<7?'6':h.version>=8?document.documentMode:'7');if(h.quirks)h.cssClass+=' cke_browser_iequirks';}if(h.gecko&&i<10900)h.cssClass+=' cke_browser_gecko18';if(h.air)h.cssClass+=' cke_browser_air';return h;})();var f=e.env;var g=f.ie;if(e.status=='unloaded')(function(){e.event.implementOn(e);e.loadFullCore=function(){if(e.status!='basic_ready'){e.loadFullCore._load=1;return;}delete e.loadFullCore;var i=document.createElement('script');i.type='text/javascript';i.src=e.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(i);};e.loadFullCoreTimeout=0;e.replaceClass='ckeditor';e.replaceByClassEnabled=1;var h=function(i,j,k,l){if(f.isCompatible){if(e.loadFullCore)e.loadFullCore();var m=k(i,j,l);e.add(m);return m;}return null;};e.replace=function(i,j){return h(i,j,e.editor.replace);};e.appendTo=function(i,j,k){return h(i,j,e.editor.appendTo,k);};e.add=function(i){var j=this._.pending||(this._.pending=[]);j.push(i);};e.replaceAll=function(){var i=document.getElementsByTagName('textarea');for(var j=0;j<i.length;j++){var k=null,l=i[j];if(!l.name&&!l.id)continue;if(typeof arguments[0]=='string'){var m=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!m.test(l.className))continue;}else if(typeof arguments[0]=='function'){k={};if(arguments[0](l,k)===false)continue;}this.replace(l,k);}};(function(){var i=function(){var j=e.loadFullCore,k=e.loadFullCoreTimeout;if(e.replaceByClassEnabled)e.replaceAll(e.replaceClass);e.status='basic_ready';if(j&&j._load)j();else if(k)setTimeout(function(){if(e.loadFullCore)e.loadFullCore();},k*1000);};if(window.addEventListener)window.addEventListener('load',i,false);else if(window.attachEvent)window.attachEvent('onload',i);})();e.status='basic_loaded';})();e.dom={};var h=e.dom;(function(){var i=[];e.on('reset',function(){i=[];});e.tools={arrayCompare:function(j,k){if(!j&&!k)return true;if(!j||!k||j.length!=k.length)return false;for(var l=0;l<j.length;l++){if(j[l]!=k[l])return false;}return true;},clone:function(j){var k;if(j&&j instanceof Array){k=[];for(var l=0;l<j.length;l++)k[l]=this.clone(j[l]);return k;}if(j===null||typeof j!='object'||j instanceof String||j instanceof Number||j instanceof Boolean||j instanceof Date||j instanceof RegExp)return j;k=new j.constructor();for(var m in j){var n=j[m];k[m]=this.clone(n);}return k;},capitalize:function(j){return j.charAt(0).toUpperCase()+j.substring(1).toLowerCase();},extend:function(j){var k=arguments.length,l,m;if(typeof(l=arguments[k-1])=='boolean')k--;else if(typeof(l=arguments[k-2])=='boolean'){m=arguments[k-1];k-=2;}for(var n=1;n<k;n++){var o=arguments[n];for(var p in o){if(l===true||j[p]==undefined)if(!m||p in m)j[p]=o[p];}}return j;},prototypedCopy:function(j){var k=function(){};k.prototype=j;return new k();},isArray:function(j){return!!j&&j instanceof Array;},isEmpty:function(j){for(var k in j){if(j.hasOwnProperty(k))return false;}return true;},cssStyleToDomStyle:(function(){var j=document.createElement('div').style,k=typeof j.cssFloat!='undefined'?'cssFloat':typeof j.styleFloat!='undefined'?'styleFloat':'float';return function(l){if(l=='float')return k;else return l.replace(/-./g,function(m){return m.substr(1).toUpperCase();});};})(),buildStyleHtml:function(j){j=[].concat(j);var k,l=[];for(var m=0;m<j.length;m++){k=j[m];if(/@import|[{}]/.test(k))l.push('<style>'+k+'</style>');else l.push('<link type="text/css" rel=stylesheet href="'+k+'">');}return l.join('');},htmlEncode:function(j){var k=function(o){var p=new h.element('span');p.setText(o);return p.getHtml();},l=k('\n').toLowerCase()=='<br>'?function(o){return k(o).replace(/<br>/gi,'\n');}:k,m=k('>')=='>'?function(o){return l(o).replace(/>/g,'&gt;');}:l,n=k('  ')=='&nbsp; '?function(o){return m(o).replace(/&nbsp;/g,' ');}:m;this.htmlEncode=n;return this.htmlEncode(j);},htmlEncodeAttr:function(j){return j.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},getNextNumber:(function(){var j=0;return function(){return++j;};})(),getNextId:function(){return'cke_'+this.getNextNumber();},override:function(j,k){return k(j);},setTimeout:function(j,k,l,m,n){if(!n)n=window;if(!l)l=n;return n.setTimeout(function(){if(m)j.apply(l,[].concat(m));else j.apply(l);},k||0);},trim:(function(){var j=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(k){return k.replace(j,'');};})(),ltrim:(function(){var j=/^[ \t\n\r]+/g;return function(k){return k.replace(j,'');};})(),rtrim:(function(){var j=/[ \t\n\r]+$/g;return function(k){return k.replace(j,'');};})(),indexOf:Array.prototype.indexOf?function(j,k){return j.indexOf(k);}:function(j,k){for(var l=0,m=j.length;l<m;l++){if(j[l]===k)return l;}return-1;},bind:function(j,k){return function(){return j.apply(k,arguments);};},createClass:function(j){var k=j.$,l=j.base,m=j.privates||j._,n=j.proto,o=j.statics;if(m){var p=k;k=function(){var t=this;var q=t._||(t._={});for(var r in m){var s=m[r];q[r]=typeof s=='function'?e.tools.bind(s,t):s;}p.apply(t,arguments);};}if(l){k.prototype=this.prototypedCopy(l.prototype);k.prototype['constructor']=k;k.prototype.base=function(){this.base=l.prototype.base;l.apply(this,arguments);this.base=arguments.callee;};}if(n)this.extend(k.prototype,n,true);if(o)this.extend(k,o,true);return k;},addFunction:function(j,k){return i.push(function(){return j.apply(k||this,arguments);})-1;},removeFunction:function(j){i[j]=null;},callFunction:function(j){var k=i[j];return k&&k.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){return function(j){return j+(!j||isNaN(Number(j))?'':'px');};})(),convertToPx:(function(){var j;return function(k){if(!j){j=h.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',e.document);e.document.getBody().append(j);}if(!/%$/.test(k)){j.setStyle('width',k);return j.$.clientWidth;}return k;};})(),repeat:function(j,k){return new Array(k+1).join(j);},tryThese:function(){var j;for(var k=0,l=arguments.length;k<l;k++){var m=arguments[k];try{j=m();break;}catch(n){}}return j;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var i=e.tools;e.dtd=(function(){var j=i.extend,k={isindex:1,fieldset:1},l={input:1,button:1,select:1,textarea:1,label:1},m=j({a:1},l),n=j({iframe:1},m),o={hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1,meta:1},p={ins:1,del:1,script:1,style:1,meta:1},q=j({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},p),r=j({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},q),s=j({p:1},r),t=j({iframe:1},r,l),u={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},v=j({a:1},t),w={tr:1},x={'#':1},y=j({param:1},u),z=j({form:1},k,n,o,s),A={li:1},B={style:1,script:1},C={base:1,link:1,meta:1,title:1},D=j(C,B),E={head:1,body:1},F={html:1},G={address:1,blockquote:1,center:1,dir:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1,meta:1};return{$nonBodyContent:j(F,E,C),$block:G,$blockLimit:{body:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1},$inline:v,$body:j({script:1,style:1,meta:1},G),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1,meta:1,source:1,track:1,command:1,keygen:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1},$captionBlock:{caption:1,legend:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:E,head:D,style:x,script:x,body:z,base:{},link:{},meta:{},title:x,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:z,td:z,br:{},wbr:{},th:z,center:z,kbd:v,button:j(s,o),basefont:{},h5:v,h4:v,samp:v,h6:v,ol:A,h1:v,h3:v,option:x,h2:v,form:j(k,n,o,s),select:{optgroup:1,option:1},font:v,ins:v,menu:A,abbr:v,label:v,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:v,tfoot:w,cite:v,li:z,input:{},iframe:z,strong:v,textarea:x,noframes:z,big:v,small:v,span:v,hr:{},dt:v,sub:v,optgroup:{option:1},param:{},bdo:v,'var':v,div:z,object:y,sup:v,dd:z,strike:v,area:{},dir:A,map:j({area:1,form:1,p:1},k,p,o),applet:y,dl:{dt:1,dd:1},del:v,isindex:{},fieldset:j({legend:1},u),thead:w,ul:A,acronym:v,b:v,a:t,blockquote:z,caption:v,i:v,u:v,tbody:w,s:v,address:j(n,s),tt:v,legend:v,q:v,pre:j(q,m),p:v,em:v,dfn:v,section:z,header:z,footer:z,nav:z,article:z,aside:z,figure:z,dialog:z,hgroup:z,mark:v,time:v,meter:v,menu:v,command:v,keygen:v,output:v,progress:y,audio:j({source:1,track:1},y),video:j({source:1,track:1},y),source:{},track:{},details:y,datagrid:y,datalist:y};})();var j=e.dtd;h.event=function(k){this.$=k;};h.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var l=this;var k=l.getKey();if(l.$.ctrlKey||l.$.metaKey)k+=1114112;if(l.$.shiftKey)k+=2228224;if(l.$.altKey)k+=4456448;return k;},preventDefault:function(k){var l=this.$;if(l.preventDefault)l.preventDefault();else l.returnValue=false;if(k)this.stopPropagation();},stopPropagation:function(){var k=this.$;if(k.stopPropagation)k.stopPropagation();else k.cancelBubble=true;},getTarget:function(){var k=this.$.target||this.$.srcElement;return k?new h.node(k):null;}};e.CTRL=1114112;e.SHIFT=2228224;e.ALT=4456448;h.domObject=function(k){if(k)this.$=k;};h.domObject.prototype=(function(){var k=function(l,m){return function(n){if(typeof e!='undefined')l.fire(m,new h.event(n));};};return{getPrivate:function(){var l;if(!(l=this.getCustomData('_')))this.setCustomData('_',l={});return l;},on:function(l){var o=this;var m=o.getCustomData('_cke_nativeListeners');if(!m){m={};o.setCustomData('_cke_nativeListeners',m);}if(!m[l]){var n=m[l]=k(o,l);if(o.$.attachEvent)o.$.attachEvent('on'+l,n);else if(o.$.addEventListener)o.$.addEventListener(l,n,!!e.event.useCapture);}return e.event.prototype.on.apply(o,arguments);},removeListener:function(l){var o=this;e.event.prototype.removeListener.apply(o,arguments);if(!o.hasListeners(l)){var m=o.getCustomData('_cke_nativeListeners'),n=m&&m[l];if(n){if(o.$.detachEvent)o.$.detachEvent('on'+l,n);else if(o.$.removeEventListener)o.$.removeEventListener(l,n,false);delete m[l];}}},removeAllListeners:function(){var o=this;var l=o.getCustomData('_cke_nativeListeners');for(var m in l){var n=l[m];if(o.$.detachEvent)o.$.detachEvent('on'+m,n);else if(o.$.removeEventListener)o.$.removeEventListener(m,n,false);delete l[m];}}};})();(function(k){var l={};e.on('reset',function(){l={};});k.equals=function(m){return m&&m.$===this.$;};k.setCustomData=function(m,n){var o=this.getUniqueId(),p=l[o]||(l[o]={});p[m]=n;return this;};k.getCustomData=function(m){var n=this.$['data-cke-expando'],o=n&&l[n];return o&&o[m];};k.removeCustomData=function(m){var n=this.$['data-cke-expando'],o=n&&l[n],p=o&&o[m];if(typeof p!='undefined')delete o[m];return p||null;};k.clearCustomData=function(){this.removeAllListeners();var m=this.$['data-cke-expando'];m&&delete l[m];};k.getUniqueId=function(){return this.$['data-cke-expando']||(this.$['data-cke-expando']=i.getNextNumber());};e.event.implementOn(k);})(h.domObject.prototype);h.window=function(k){h.domObject.call(this,k);};h.window.prototype=new h.domObject();i.extend(h.window.prototype,{focus:function(){if(f.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var k=this.$.document,l=k.compatMode=='CSS1Compat';return{width:(l?k.documentElement.clientWidth:k.body.clientWidth)||0,height:(l?k.documentElement.clientHeight:k.body.clientHeight)||0};},getScrollPosition:function(){var k=this.$;if('pageXOffset'in k)return{x:k.pageXOffset||0,y:k.pageYOffset||0};else{var l=k.document;return{x:l.documentElement.scrollLeft||l.body.scrollLeft||0,y:l.documentElement.scrollTop||l.body.scrollTop||0};}}});h.document=function(k){h.domObject.call(this,k);};var k=h.document;k.prototype=new h.domObject();i.extend(k.prototype,{appendStyleSheet:function(l){if(this.$.createStyleSheet)this.$.createStyleSheet(l);else{var m=new h.element('link');m.setAttributes({rel:'stylesheet',type:'text/css',href:l});this.getHead().append(m);}},appendStyleText:function(l){var o=this;if(o.$.createStyleSheet){var m=o.$.createStyleSheet('');m.cssText=l;}else{var n=new h.element('style',o);n.append(new h.text(l,o));o.getHead().append(n);}},createElement:function(l,m){var n=new h.element(l,this);if(m){if(m.attributes)n.setAttributes(m.attributes);if(m.styles)n.setStyles(m.styles);}return n;},createText:function(l){return new h.text(l,this);},focus:function(){this.getWindow().focus();},getById:function(l){var m=this.$.getElementById(l);return m?new h.element(m):null;},getByAddress:function(l,m){var n=this.$.documentElement;for(var o=0;n&&o<l.length;o++){var p=l[o];if(!m){n=n.childNodes[p];continue;}var q=-1;for(var r=0;r<n.childNodes.length;r++){var s=n.childNodes[r];if(m===true&&s.nodeType==3&&s.previousSibling&&s.previousSibling.nodeType==3)continue;q++;if(q==p){n=s;break;}}}return n?new h.node(n):null;},getElementsByTag:function(l,m){if(!(g&&!(document.documentMode>8))&&m)l=m+':'+l;return new h.nodeList(this.$.getElementsByTagName(l));},getHead:function(){var l=this.$.getElementsByTagName('head')[0];if(!l)l=this.getDocumentElement().append(new h.element('head'),true);else l=new h.element(l);return(this.getHead=function(){return l;})();},getBody:function(){var l=new h.element(this.$.body);return(this.getBody=function(){return l;})();},getDocumentElement:function(){var l=new h.element(this.$.documentElement);return(this.getDocumentElement=function(){return l;})();},getWindow:function(){var l=new h.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return l;})();},write:function(l){var m=this;m.$.open('text/html','replace');f.isCustomDomain()&&(m.$.domain=document.domain);m.$.write(l);m.$.close();}});h.node=function(l){if(l){switch(l.nodeType){case 9:return new k(l);case 1:return new h.element(l);case 3:return new h.text(l);}h.domObject.call(this,l);}return this;};h.node.prototype=new h.domObject();e.NODE_ELEMENT=1;e.NODE_DOCUMENT=9;e.NODE_TEXT=3;e.NODE_COMMENT=8;e.NODE_DOCUMENT_FRAGMENT=11;e.POSITION_IDENTICAL=0;e.POSITION_DISCONNECTED=1;e.POSITION_FOLLOWING=2;e.POSITION_PRECEDING=4;e.POSITION_IS_CONTAINED=8;e.POSITION_CONTAINS=16;i.extend(h.node.prototype,{appendTo:function(l,m){l.append(this,m);return l;},clone:function(l,m){var n=this.$.cloneNode(l),o=function(p){if(p.nodeType!=1)return;if(!m)p.removeAttribute('id',false);p.removeAttribute('data-cke-expando',false);if(l){var q=p.childNodes;for(var r=0;r<q.length;r++)o(q[r]);}};o(n);return new h.node(n);},hasPrevious:function(){return!!this.$.previousSibling;},hasNext:function(){return!!this.$.nextSibling;},insertAfter:function(l){l.$.parentNode.insertBefore(this.$,l.$.nextSibling);return l;},insertBefore:function(l){l.$.parentNode.insertBefore(this.$,l.$);return l;},insertBeforeMe:function(l){this.$.parentNode.insertBefore(l.$,this.$);return l;},getAddress:function(l){var m=[],n=this.getDocument().$.documentElement,o=this.$;while(o&&o!=n){var p=o.parentNode;if(p)m.unshift(this.getIndex.call({$:o},l));o=p;}return m;},getDocument:function(){return new k(this.$.ownerDocument||this.$.parentNode.ownerDocument);},getIndex:function(l){var m=this.$,n=0;while(m=m.previousSibling){if(l&&m.nodeType==3&&(!m.nodeValue.length||m.previousSibling&&m.previousSibling.nodeType==3))continue;n++;}return n;},getNextSourceNode:function(l,m,n){if(n&&!n.call){var o=n;n=function(r){return!r.equals(o);};}var p=!l&&this.getFirst&&this.getFirst(),q;if(!p){if(this.type==1&&n&&n(this,true)===false)return null;p=this.getNext();}while(!p&&(q=(q||this).getParent())){if(n&&n(q,true)===false)return null;p=q.getNext();}if(!p)return null;if(n&&n(p)===false)return null;if(m&&m!=p.type)return p.getNextSourceNode(false,m,n);return p;},getPreviousSourceNode:function(l,m,n){if(n&&!n.call){var o=n;n=function(r){return!r.equals(o);};}var p=!l&&this.getLast&&this.getLast(),q;if(!p){if(this.type==1&&n&&n(this,true)===false)return null;p=this.getPrevious();}while(!p&&(q=(q||this).getParent())){if(n&&n(q,true)===false)return null;p=q.getPrevious();}if(!p)return null;if(n&&n(p)===false)return null;if(m&&p.type!=m)return p.getPreviousSourceNode(false,m,n);return p;},getPrevious:function(l){var m=this.$,n;do{m=m.previousSibling;n=m&&new h.node(m);}while(n&&l&&!l(n));return n;},getNext:function(l){var m=this.$,n;do{m=m.nextSibling;n=m&&new h.node(m);}while(n&&l&&!l(n));return n;},getParent:function(){var l=this.$.parentNode;return l&&l.nodeType==1?new h.node(l):null;},getParents:function(l){var m=this,n=[];do n[l?'push':'unshift'](m);while(m=m.getParent());return n;},getCommonAncestor:function(l){var n=this;if(l.equals(n))return n;if(l.contains&&l.contains(n))return l;var m=n.contains?n:n.getParent();do{if(m.contains(l))return m;}while(m=m.getParent());return null;},getPosition:function(l){var m=this.$,n=l.$;if(m.compareDocumentPosition)return m.compareDocumentPosition(n);if(m==n)return 0;if(this.type==1&&l.type==1){if(m.contains){if(m.contains(n))return 16+4;if(n.contains(m))return 8+2;}if('sourceIndex'in m)return m.sourceIndex<0||n.sourceIndex<0?1:m.sourceIndex<n.sourceIndex?4:2;}var o=this.getAddress(),p=l.getAddress(),q=Math.min(o.length,p.length);for(var r=0;r<=q-1;r++){if(o[r]!=p[r]){if(r<q)return o[r]<p[r]?4:2;break;}}return o.length<p.length?16+4:8+2;},getAscendant:function(l,m){var n=this.$,o;if(!m)n=n.parentNode;while(n){if(n.nodeName&&(o=n.nodeName.toLowerCase(),typeof l=='string'?o==l:o in l))return new h.node(n);n=n.parentNode;}return null;},hasAscendant:function(l,m){var n=this.$;if(!m)n=n.parentNode;while(n){if(n.nodeName&&n.nodeName.toLowerCase()==l)return true;n=n.parentNode;}return false;},move:function(l,m){l.append(this.remove(),m);},remove:function(l){var m=this.$,n=m.parentNode;if(n){if(l)for(var o;o=m.firstChild;)n.insertBefore(m.removeChild(o),m);n.removeChild(m);}return this;},replace:function(l){this.insertBefore(l);l.remove();},trim:function(){this.ltrim();this.rtrim();},ltrim:function(){var o=this;var l;while(o.getFirst&&(l=o.getFirst())){if(l.type==3){var m=i.ltrim(l.getText()),n=l.getLength();if(!m){l.remove();continue;}else if(m.length<n){l.split(n-m.length);o.$.removeChild(o.$.firstChild);}}break;}},rtrim:function(){var o=this;var l;while(o.getLast&&(l=o.getLast())){if(l.type==3){var m=i.rtrim(l.getText()),n=l.getLength();if(!m){l.remove();continue;}else if(m.length<n){l.split(m.length);o.$.lastChild.parentNode.removeChild(o.$.lastChild);}}break;}if(!g&&!f.opera){l=o.$.lastChild;if(l&&l.type==1&&l.nodeName.toLowerCase()=='br')l.parentNode.removeChild(l);}},isReadOnly:function(){var l=this;while(l){if(l.type==1){if(l.is('body')||!!l.data('cke-editable'))break;if(l.getAttribute('contentEditable')=='false')return l;else if(l.getAttribute('contentEditable')=='true')break;}l=l.getParent();}return false;}});h.nodeList=function(l){this.$=l;};h.nodeList.prototype={count:function(){return this.$.length;},getItem:function(l){var m=this.$[l];return m?new h.node(m):null;}};h.element=function(l,m){if(typeof l=='string')l=(m?m.$:document).createElement(l);h.domObject.call(this,l);};var l=h.element;l.get=function(m){return m&&(m.$?m:new l(m));};l.prototype=new h.node();l.createFromHtml=function(m,n){var o=new l('div',n);o.setHtml(m);return o.getFirst().remove();};l.setMarker=function(m,n,o,p){var q=n.getCustomData('list_marker_id')||n.setCustomData('list_marker_id',i.getNextNumber()).getCustomData('list_marker_id'),r=n.getCustomData('list_marker_names')||n.setCustomData('list_marker_names',{}).getCustomData('list_marker_names');m[q]=n;r[o]=1;return n.setCustomData(o,p);};l.clearAllMarkers=function(m){for(var n in m)l.clearMarkers(m,m[n],1);};l.clearMarkers=function(m,n,o){var p=n.getCustomData('list_marker_names'),q=n.getCustomData('list_marker_id');for(var r in p)n.removeCustomData(r);n.removeCustomData('list_marker_names');if(o){n.removeCustomData('list_marker_id');delete m[q];}};i.extend(l.prototype,{type:1,addClass:function(m){var n=this.$.className;if(n){var o=new RegExp('(?:^|\\s)'+m+'(?:\\s|$)','');if(!o.test(n))n+=' '+m;}this.$.className=n||m;},removeClass:function(m){var n=this.getAttribute('class');if(n){var o=new RegExp('(?:^|\\s+)'+m+'(?=\\s|$)','i');if(o.test(n)){n=n.replace(o,'').replace(/^\s+/,'');if(n)this.setAttribute('class',n);else this.removeAttribute('class');}}},hasClass:function(m){var n=new RegExp('(?:^|\\s+)'+m+'(?=\\s|$)','');return n.test(this.getAttribute('class'));},append:function(m,n){var o=this;if(typeof m=='string')m=o.getDocument().createElement(m);if(n)o.$.insertBefore(m.$,o.$.firstChild);else o.$.appendChild(m.$);return m;},appendHtml:function(m){var o=this;if(!o.$.childNodes.length)o.setHtml(m);else{var n=new l('div',o.getDocument());n.setHtml(m);n.moveChildren(o);}},appendText:function(m){if(this.$.text!=undefined)this.$.text+=m;else this.append(new h.text(m));},appendBogus:function(){var o=this;var m=o.getLast();while(m&&m.type==3&&!i.rtrim(m.getText()))m=m.getPrevious();if(!m||!m.is||!m.is('br')){var n=f.opera?o.getDocument().createText(''):o.getDocument().createElement('br');f.gecko&&n.setAttribute('type','_moz');o.append(n);}},breakParent:function(m){var p=this;var n=new h.range(p.getDocument());n.setStartAfter(p);n.setEndAfter(m);var o=n.extractContents();n.insertNode(p.remove());o.insertAfterNode(p);},contains:g||f.webkit?function(m){var n=this.$;return m.type!=1?n.contains(m.getParent().$):n!=m.$&&n.contains(m.$);}:function(m){return!!(this.$.compareDocumentPosition(m.$)&16);},focus:(function(){function m(){try{this.$.focus();}catch(n){}};return function(n){if(n)i.setTimeout(m,100,this);else m.call(this);};})(),getHtml:function(){var m=this.$.innerHTML;return g?m.replace(/<\?[^>]*>/g,''):m;},getOuterHtml:function(){var n=this;if(n.$.outerHTML)return n.$.outerHTML.replace(/<\?[^>]*>/,'');var m=n.$.ownerDocument.createElement('div');m.appendChild(n.$.cloneNode(true));return m.innerHTML;},setHtml:function(m){return this.$.innerHTML=m;},setText:function(m){l.prototype.setText=this.$.innerText!=undefined?function(n){return this.$.innerText=n;}:function(n){return this.$.textContent=n;};return this.setText(m);},getAttribute:(function(){var m=function(n){return this.$.getAttribute(n,2);};if(g&&(f.ie7Compat||f.ie6Compat))return function(n){var r=this;switch(n){case'class':n='className';break;case'http-equiv':n='httpEquiv';break;case'name':return r.$.name;case'tabindex':var o=m.call(r,n);if(o!==0&&r.$.tabIndex===0)o=null;return o;break;case'checked':var p=r.$.attributes.getNamedItem(n),q=p.specified?p.nodeValue:r.$.checked;return q?'checked':null;case'hspace':case'value':return r.$[n];case'style':return r.$.style.cssText;}return m.call(r,n);};else return m;})(),getChildren:function(){return new h.nodeList(this.$.childNodes);},getComputedStyle:g?function(m){return this.$.currentStyle[i.cssStyleToDomStyle(m)];}:function(m){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(m);},getDtd:function(){var m=j[this.getName()];this.getDtd=function(){return m;};return m;},getElementsByTag:k.prototype.getElementsByTag,getTabIndex:g?function(){var m=this.$.tabIndex;if(m===0&&!j.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)m=-1;return m;}:f.webkit?function(){var m=this.$.tabIndex;if(m==undefined){m=parseInt(this.getAttribute('tabindex'),10);if(isNaN(m))m=-1;}return m;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var m=this.$.nodeName.toLowerCase();if(g&&!(document.documentMode>8)){var n=this.$.scopeName;if(n!='HTML')m=n.toLowerCase()+':'+m;}return(this.getName=function(){return m;})();},getValue:function(){return this.$.value;},getFirst:function(m){var n=this.$.firstChild,o=n&&new h.node(n);if(o&&m&&!m(o))o=o.getNext(m);return o;},getLast:function(m){var n=this.$.lastChild,o=n&&new h.node(n);if(o&&m&&!m(o))o=o.getPrevious(m);return o;},getStyle:function(m){return this.$.style[i.cssStyleToDomStyle(m)];},is:function(){var m=this.getName();for(var n=0;n<arguments.length;n++){if(arguments[n]==m)return true;}return false;},isEditable:function(){if(this.isReadOnly())return false;var m=this.getName(),n=!j.$nonEditable[m]&&(j[m]||j.span);return n&&n['#'];},isIdentical:function(m){if(this.getName()!=m.getName())return false;var n=this.$.attributes,o=m.$.attributes,p=n.length,q=o.length;for(var r=0;r<p;r++){var s=n[r];if(s.nodeName=='_moz_dirty')continue;if((!g||s.specified&&s.nodeName!='data-cke-expando')&&s.nodeValue!=m.getAttribute(s.nodeName))return false;}if(g)for(r=0;r<q;r++){s=o[r];if(s.specified&&s.nodeName!='data-cke-expando'&&s.nodeValue!=this.getAttribute(s.nodeName))return false;}return true;},isVisible:function(){var m=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',n,o;if(m&&(f.webkit||f.opera)){n=this.getWindow();if(!n.equals(e.document.getWindow())&&(o=n.$.frameElement))m=new l(o).isVisible();}return m;},isEmptyInlineRemoveable:function(){if(!j.$removeEmpty[this.getName()])return false;var m=this.getChildren();for(var n=0,o=m.count();n<o;n++){var p=m.getItem(n);if(p.type==1&&p.data('cke-bookmark'))continue;if(p.type==1&&!p.isEmptyInlineRemoveable()||p.type==3&&i.trim(p.getText()))return false;}return true;},hasAttributes:g&&(f.ie7Compat||f.ie6Compat)?function(){var m=this.$.attributes;for(var n=0;n<m.length;n++){var o=m[n];switch(o.nodeName){case'class':if(this.getAttribute('class'))return true;case'data-cke-expando':continue;default:if(o.specified)return true;}}return false;}:function(){var m=this.$.attributes,n=m.length,o={'data-cke-expando':1,_moz_dirty:1};return n>0&&(n>2||!o[m[0].nodeName]||n==2&&!o[m[1].nodeName]);},hasAttribute:(function(){function m(n){var o=this.$.attributes.getNamedItem(n);return!!(o&&o.specified);};return g&&f.version<8?function(n){if(n=='name')return!!this.$.name;return m.call(this,n);}:m;})(),hide:function(){this.setStyle('display','none');},moveChildren:function(m,n){var o=this.$;m=m.$;if(o==m)return;var p;if(n)while(p=o.lastChild)m.insertBefore(o.removeChild(p),m.firstChild);else while(p=o.firstChild)m.appendChild(o.removeChild(p));},mergeSiblings:(function(){function m(n,o,p){if(o&&o.type==1){var q=[];while(o.data('cke-bookmark')||o.isEmptyInlineRemoveable()){q.push(o);o=p?o.getNext():o.getPrevious();if(!o||o.type!=1)return;}if(n.isIdentical(o)){var r=p?n.getLast():n.getFirst();while(q.length)q.shift().move(n,!p);o.moveChildren(n,!p);o.remove();if(r&&r.type==1)r.mergeSiblings();}}};return function(n){var o=this;if(!(n===false||j.$removeEmpty[o.getName()]||o.is('a')))return;m(o,o.getNext(),true);m(o,o.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var m=function(n,o){this.$.setAttribute(n,o);return this;};if(g&&(f.ie7Compat||f.ie6Compat))return function(n,o){var p=this;if(n=='class')p.$.className=o;else if(n=='style')p.$.style.cssText=o;else if(n=='tabindex')p.$.tabIndex=o;else if(n=='checked')p.$.checked=o;else m.apply(p,arguments);return p;};else if(f.ie8Compat&&f.secure)return function(n,o){if(n=='src'&&o.match(/^http:\/\//))try{m.apply(this,arguments);}catch(p){}else m.apply(this,arguments);return this;};else return m;})(),setAttributes:function(m){for(var n in m)this.setAttribute(n,m[n]);return this;},setValue:function(m){this.$.value=m;return this;},removeAttribute:(function(){var m=function(n){this.$.removeAttribute(n);};if(g&&(f.ie7Compat||f.ie6Compat))return function(n){if(n=='class')n='className';else if(n=='tabindex')n='tabIndex';m.call(this,n);};else return m;})(),removeAttributes:function(m){if(i.isArray(m))for(var n=0;n<m.length;n++)this.removeAttribute(m[n]);else for(var o in m)m.hasOwnProperty(o)&&this.removeAttribute(o);},removeStyle:function(m){var n=this;n.setStyle(m,'');if(n.$.style.removeAttribute)n.$.style.removeAttribute(i.cssStyleToDomStyle(m));if(!n.$.style.cssText)n.removeAttribute('style');},setStyle:function(m,n){this.$.style[i.cssStyleToDomStyle(m)]=n;return this;},setStyles:function(m){for(var n in m)this.setStyle(n,m[n]);return this;},setOpacity:function(m){if(g){m=Math.round(m*100);this.setStyle('filter',m>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+m+')');}else this.setStyle('opacity',m);},unselectable:f.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(m){m.data.preventDefault();});}:f.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(m){m.data.preventDefault();});}:function(){if(g||f.opera){var m=this.$,n,o=0;m.unselectable='on';while(n=m.all[o++])switch(n.tagName.toLowerCase()){case'iframe':case'textarea':case'input':case'select':break;default:n.unselectable='on';}}},getPositionedAncestor:function(){var m=this;while(m.getName()!='html'){if(m.getComputedStyle('position')!='static')return m;m=m.getParent();}return null;},getDocumentPosition:function(m){var H=this;var n=0,o=0,p=H.getDocument().getBody(),q=H.getDocument().$.compatMode=='BackCompat',r=H.getDocument();if(document.documentElement.getBoundingClientRect){var s=H.$.getBoundingClientRect(),t=r.$,u=t.documentElement,v=u.clientTop||p.$.clientTop||0,w=u.clientLeft||p.$.clientLeft||0,x=true;if(g){var y=r.getDocumentElement().contains(H),z=r.getBody().contains(H);x=q&&z||!q&&y;}if(x){n=s.left+(!q&&u.scrollLeft||p.$.scrollLeft);n-=w;o=s.top+(!q&&u.scrollTop||p.$.scrollTop);o-=v;}}else{var A=H,B=null,C;while(A&&!(A.getName()=='body'||A.getName()=='html')){n+=A.$.offsetLeft-A.$.scrollLeft;o+=A.$.offsetTop-A.$.scrollTop;if(!A.equals(H)){n+=A.$.clientLeft||0;o+=A.$.clientTop||0;}var D=B;while(D&&!D.equals(A)){n-=D.$.scrollLeft;o-=D.$.scrollTop;D=D.getParent();}B=A;A=(C=A.$.offsetParent)?new l(C):null;}}if(m){var E=H.getWindow(),F=m.getWindow();if(!E.equals(F)&&E.$.frameElement){var G=new l(E.$.frameElement).getDocumentPosition(m);n+=G.x;o+=G.y;}}if(!document.documentElement.getBoundingClientRect)if(f.gecko&&!q){n+=H.$.clientLeft?1:0;o+=H.$.clientTop?1:0;}return{x:n,y:o};},scrollIntoView:function(m){var s=this;var n=s.getWindow(),o=n.getViewPaneSize().height,p=o*-1;if(m)p+=o;else{p+=s.$.offsetHeight||0;p+=parseInt(s.getComputedStyle('marginBottom')||0,10)||0;}var q=s.getDocumentPosition();p+=q.y;p=p<0?0:p;var r=n.getScrollPosition().y;if(p>r||p<r-o)n.$.scrollTo(0,p);},setState:function(m){var n=this;switch(m){case 1:n.addClass('cke_on');n.removeClass('cke_off');n.removeClass('cke_disabled');break;case 0:n.addClass('cke_disabled');n.removeClass('cke_off');n.removeClass('cke_on');break;default:n.addClass('cke_off');n.removeClass('cke_on');n.removeClass('cke_disabled');break;}},getFrameDocument:function(){var m=this.$;try{m.contentWindow.document;}catch(n){m.src=m.src;if(g&&f.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return m&&new k(m.contentWindow.document);},copyAttributes:function(m,n){var t=this;var o=t.$.attributes;n=n||{};for(var p=0;p<o.length;p++){var q=o[p],r=q.nodeName.toLowerCase(),s;if(r in n)continue;if(r=='checked'&&(s=t.getAttribute(r)))m.setAttribute(r,s);else if(q.specified||g&&q.nodeValue&&r=='value'){s=t.getAttribute(r);if(s===null)s=q.nodeValue;m.setAttribute(r,s);}}if(t.$.style.cssText!=='')m.$.style.cssText=t.$.style.cssText;},renameNode:function(m){var p=this;if(p.getName()==m)return;var n=p.getDocument(),o=new l(m,n);p.copyAttributes(o);p.moveChildren(o);p.getParent()&&p.$.parentNode.replaceChild(o.$,p.$);o.$['data-cke-expando']=p.$['data-cke-expando'];p.$=o.$;},getChild:function(m){var n=this.$;if(!m.slice)n=n.childNodes[m];else while(m.length>0&&n)n=n.childNodes[m.shift()];return n?new h.node(n):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(m){if(!m.data.getTarget().hasClass('cke_enable_context_menu'))m.data.preventDefault();});},getDirection:function(m){var n=this;return m?n.getComputedStyle('direction')||n.getDirection()||n.getDocument().$.dir||n.getDocument().getBody().getDirection(1):n.getStyle('direction')||n.getAttribute('dir');},data:function(m,n){m='data-'+m;if(n===undefined)return this.getAttribute(m);else if(n===false)this.removeAttribute(m);else this.setAttribute(m,n);return null;}});(function(){var m={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']};function n(o){var p=0;for(var q=0,r=m[o].length;q<r;q++)p+=parseInt(this.getComputedStyle(m[o][q])||0,10)||0;return p;};l.prototype.setSize=function(o,p,q){if(typeof p=='number'){if(q&&!(g&&f.quirks))p-=n.call(this,o);this.setStyle(o,p+'px');}};l.prototype.getSize=function(o,p){var q=Math.max(this.$['offset'+i.capitalize(o)],this.$['client'+i.capitalize(o)])||0;if(p)q-=n.call(this,o);return q;};})();e.command=function(m,n){this.uiItems=[];this.exec=function(o){if(this.state==0)return false;if(this.editorFocus)m.focus();return n.exec.call(this,m,o)!==false;};i.extend(this,n,{modes:{wysiwyg:1},editorFocus:1,state:2});e.event.call(this);};e.command.prototype={enable:function(){var m=this;if(m.state==0)m.setState(!m.preserveState||typeof m.previousState=='undefined'?2:m.previousState);},disable:function(){this.setState(0);},setState:function(m){var n=this;if(n.state==m)return false;n.previousState=n.state;n.state=m;n.fire('state');return true;},toggleState:function(){var m=this;if(m.state==2)m.setState(1);else if(m.state==1)m.setState(2);}};e.event.implementOn(e.command.prototype,true);e.ENTER_P=1;e.ENTER_BR=2;e.ENTER_DIV=3;e.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:e.basePath+'contents.css',contentsLangDirection:'ui',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};var m=e.config;e.focusManager=function(n){if(n.focusManager)return n.focusManager;this.hasFocus=false;this._={editor:n};return this;};e.focusManager.prototype={focus:function(){var o=this;if(o._.timer)clearTimeout(o._.timer);if(!o.hasFocus){if(e.currentInstance)e.currentInstance.focusManager.forceBlur();var n=o._.editor;n.container.getChild(1).addClass('cke_focus');o.hasFocus=true;n.fire('focus');}},blur:function(){var n=this;if(n._.timer)clearTimeout(n._.timer);n._.timer=setTimeout(function(){delete n._.timer;n.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var n=this._.editor;n.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;n.fire('blur');}}};(function(){var n={};e.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(o,p,q){if(!o||!e.lang.languages[o])o=this.detect(p,o);if(!this[o])e.scriptLoader.load(e.getUrl('lang/'+o+'.js'),function(){q(o,this[o]);},this);else q(o,this[o]);},detect:function(o,p){var q=this.languages;p=p||navigator.userLanguage||navigator.language;var r=p.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),s=r[1],t=r[2];if(q[s+'-'+t])s=s+'-'+t;else if(!q[s])s=null;e.lang.detect=s?function(){return s;}:function(u){return u;};return s||o;}};})();e.scriptLoader=(function(){var n={},o={};return{load:function(p,q,r,s){var t=typeof p=='string';if(t)p=[p];if(!r)r=e;var u=p.length,v=[],w=[],x=function(C){if(q)if(t)q.call(r,C);else q.call(r,v,w);};if(u===0){x(true);return;}var y=function(C,D){(D?v:w).push(C);if(--u<=0){s&&e.document.getDocumentElement().removeStyle('cursor');x(D);}},z=function(C,D){n[C]=1;var E=o[C];delete o[C];for(var F=0;F<E.length;F++)E[F](C,D);},A=function(C){if(n[C]){y(C,true);return;}var D=o[C]||(o[C]=[]);D.push(y);if(D.length>1)return;var E=new l('script');E.setAttributes({type:'text/javascript',src:C});if(q)if(g)E.$.onreadystatechange=function(){if(E.$.readyState=='loaded'||E.$.readyState=='complete'){E.$.onreadystatechange=null;z(C,true);}};else{E.$.onload=function(){setTimeout(function(){z(C,true);},0);};E.$.onerror=function(){z(C,false);};}E.appendTo(e.document.getHead());};s&&e.document.getDocumentElement().setStyle('cursor','wait');for(var B=0;B<u;B++)A(p[B]);}};})();e.resourceManager=function(n,o){var p=this;p.basePath=n;p.fileName=o;p.registered={};p.loaded={};p.externals={};p._={waitingList:{}};};e.resourceManager.prototype={add:function(n,o){if(this.registered[n])throw'[CKEDITOR.resourceManager.add] The resource name "'+n+'" is already registered.';e.fire(n+i.capitalize(this.fileName)+'Ready',this.registered[n]=o||{});},get:function(n){return this.registered[n]||null;},getPath:function(n){var o=this.externals[n];return e.getUrl(o&&o.dir||this.basePath+n+'/');},getFilePath:function(n){var o=this.externals[n];return e.getUrl(this.getPath(n)+(o&&typeof o.file=='string'?o.file:this.fileName+'.js'));},addExternal:function(n,o,p){n=n.split(',');for(var q=0;q<n.length;q++){var r=n[q];this.externals[r]={dir:o,file:p};}},load:function(n,o,p){if(!i.isArray(n))n=n?[n]:[];var q=this.loaded,r=this.registered,s=[],t={},u={};for(var v=0;v<n.length;v++){var w=n[v];if(!w)continue;if(!q[w]&&!r[w]){var x=this.getFilePath(w);s.push(x);if(!(x in t))t[x]=[];t[x].push(w);}else u[w]=this.get(w);}e.scriptLoader.load(s,function(y,z){if(z.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+t[z[0]].join(',')+'" was not found at "'+z[0]+'".';for(var A=0;A<y.length;A++){var B=t[y[A]];for(var C=0;C<B.length;C++){var D=B[C];u[D]=this.get(D);q[D]=1;}}o.call(p,u);},this);}};e.plugins=new e.resourceManager('plugins/','plugin');var n=e.plugins;n.load=i.override(n.load,function(o){return function(p,q,r){var s={},t=function(u){o.call(this,u,function(v){i.extend(s,v);var w=[];for(var x in v){var y=v[x],z=y&&y.requires;if(z)for(var A=0;A<z.length;A++){if(!s[z[A]])w.push(z[A]);}}if(w.length)t.call(this,w);else{for(x in s){y=s[x];if(y.onLoad&&!y.onLoad._called){y.onLoad();y.onLoad._called=1;}}if(q)q.call(r||window,s);}},this);};t.call(this,p);};});n.setLang=function(o,p,q){var r=this.get(o),s=r.langEntries||(r.langEntries={}),t=r.lang||(r.lang=[]);if(i.indexOf(t,p)==-1)t.push(p);s[p]=q;};e.skins=(function(){var o={},p={},q=function(r,s,t,u){var v=o[s];if(!r.skin){r.skin=v;if(v.init)v.init(r);}var w=function(F){for(var G=0;G<F.length;G++)F[G]=e.getUrl(p[s]+F[G]);};function x(F,G){return F.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(H,I,J,K){if(/^\/|^\w?:/.test(J))return H;else return'url('+G+I+J+K+')';});};t=v[t];var y=!t||!!t._isLoaded;if(y)u&&u();else{var z=t._pending||(t._pending=[]);z.push(u);if(z.length>1)return;var A=!t.css||!t.css.length,B=!t.js||!t.js.length,C=function(){if(A&&B){t._isLoaded=1;for(var F=0;F<z.length;F++){if(z[F])z[F]();}}};if(!A){var D=t.css;if(i.isArray(D)){w(D);for(var E=0;E<D.length;E++)e.document.appendStyleSheet(D[E]);}else{D=x(D,e.getUrl(p[s]));e.document.appendStyleText(D);}t.css=D;A=1;}if(!B){w(t.js);e.scriptLoader.load(t.js,function(){B=1;C();});}C();}};return{add:function(r,s){o[r]=s;s.skinPath=p[r]||(p[r]=e.getUrl('skins/'+r+'/'));},load:function(r,s,t){var u=r.skinName,v=r.skinPath;if(o[u])q(r,u,s,t);else{p[u]=v;e.scriptLoader.load(e.getUrl(v+'skin.js'),function(){q(r,u,s,t);});}}};})();e.themes=new e.resourceManager('themes/','theme');e.ui=function(o){if(o.ui)return o.ui;this._={handlers:{},items:{},editor:o};return this;};var o=e.ui;o.prototype={add:function(p,q,r){this._.items[p]={type:q,command:r.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(p){var u=this;var q=u._.items[p],r=q&&u._.handlers[q.type],s=q&&q.command&&u._.editor.getCommand(q.command),t=r&&r.create.apply(u,q.args);q&&(t=i.extend(t,u._.editor.skin[q.type],true));if(s)s.uiItems.push(t);return t;},addHandler:function(p,q){this._.handlers[p]=q;}};e.event.implementOn(o);(function(){var p=0,q=function(){var B='editor'+ ++p;return e.instances&&e.instances[B]?q():B;},r={},s=function(B){var C=B.config.customConfig;if(!C)return false;C=e.getUrl(C);var D=r[C]||(r[C]={});if(D.fn){D.fn.call(B,B.config);if(e.getUrl(B.config.customConfig)==C||!s(B))B.fireOnce('customConfigLoaded');}else e.scriptLoader.load(C,function(){if(e.editorConfig)D.fn=e.editorConfig;else D.fn=function(){};s(B);});return true;},t=function(B,C){B.on('customConfigLoaded',function(){if(C){if(C.on)for(var D in C.on)B.on(D,C.on[D]);i.extend(B.config,C,true);delete B.config.on;}u(B);});if(C&&C.customConfig!=undefined)B.config.customConfig=C.customConfig;if(!s(B))B.fireOnce('customConfigLoaded');},u=function(B){var C=B.config.skin.split(','),D=C[0],E=e.getUrl(C[1]||'skins/'+D+'/');B.skinName=D;B.skinPath=E;B.skinClass='cke_skin_'+D;B.tabIndex=B.config.tabIndex||B.element.getAttribute('tabindex')||0;B.readOnly=!!(B.config.readOnly||B.element.getAttribute('disabled'));B.fireOnce('configLoaded');x(B);},v=function(B){e.lang.load(B.config.language,B.config.defaultLanguage,function(C,D){B.langCode=C;B.lang=i.prototypedCopy(D);if(f.gecko&&f.version<10900&&B.lang.dir=='rtl')B.lang.dir='ltr';B.fire('langLoaded');var E=B.config;E.contentsLangDirection=='ui'&&(E.contentsLangDirection=B.lang.dir);w(B);});},w=function(B){var C=B.config,D=C.plugins,E=C.extraPlugins,F=C.removePlugins;if(E){var G=new RegExp('(?:^|,)(?:'+E.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');D=D.replace(G,'');D+=','+E;}if(F){G=new RegExp('(?:^|,)(?:'+F.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');D=D.replace(G,'');}f.air&&(D+=',adobeair');n.load(D.split(','),function(H){var I=[],J=[],K=[];B.plugins=H;for(var L in H){var M=H[L],N=M.lang,O=n.getPath(L),P=null;M.path=O;if(N){P=i.indexOf(N,B.langCode)>=0?B.langCode:N[0];if(!M.langEntries||!M.langEntries[P])K.push(e.getUrl(O+'lang/'+P+'.js'));else{i.extend(B.lang,M.langEntries[P]);P=null;}}J.push(P);I.push(M);}e.scriptLoader.load(K,function(){var Q=['beforeInit','init','afterInit'];for(var R=0;R<Q.length;R++)for(var S=0;S<I.length;S++){var T=I[S];if(R===0&&J[S]&&T.lang)i.extend(B.lang,T.langEntries[J[S]]);if(T[Q[R]])T[Q[R]](B);}B.fire('pluginsLoaded');y(B);});});},x=function(B){e.skins.load(B,'editor',function(){v(B);});},y=function(B){var C=B.config.theme;e.themes.load(C,function(){var D=B.theme=e.themes.get(C);D.path=e.themes.getPath(C);D.build(B);if(B.config.autoUpdateElement)z(B);});},z=function(B){var C=B.element;if(B.elementMode==1&&C.is('textarea')){var D=C.$.form&&new l(C.$.form);if(D){function E(){B.updateElement();};D.on('submit',E);if(!D.$.submit.nodeName&&!D.$.submit.length)D.$.submit=i.override(D.$.submit,function(F){return function(){B.updateElement();if(F.apply)F.apply(this,arguments);else F();};});B.on('destroy',function(){D.removeListener('submit',E);});}}};function A(){var B,C=this._.commands,D=this.mode;if(!D)return;for(var E in C){B=C[E];B[B.startDisabled?'disable':this.readOnly&&!B.readOnly?'disable':B.modes[D]?'enable':'disable']();}};e.editor.prototype._init=function(){var D=this;var B=l.get(D._.element),C=D._.instanceConfig;delete D._.element;delete D._.instanceConfig;D._.commands={};D._.styles=[];D.element=B;D.name=B&&D.elementMode==1&&(B.getId()||B.getNameAtt())||q();if(D.name in e.instances)throw'[CKEDITOR.editor] The instance "'+D.name+'" already exists.';D.id=i.getNextId();D.config=i.prototypedCopy(m);D.ui=new o(D);D.focusManager=new e.focusManager(D);e.fire('instanceCreated',null,D);D.on('mode',A,null,null,1);D.on('readOnly',A,null,null,1);t(D,C);};})();i.extend(e.editor.prototype,{addCommand:function(p,q){return this._.commands[p]=new e.command(this,q);},addCss:function(p){this._.styles.push(p);},destroy:function(p){var q=this;if(!p)q.updateElement();q.fire('destroy');q.theme&&q.theme.destroy(q);e.remove(q);e.fire('instanceDestroyed',null,q);},execCommand:function(p,q){var r=this.getCommand(p),s={name:p,commandData:q,command:r};if(r&&r.state!=0)if(this.fire('beforeCommandExec',s)!==true){s.returnValue=r.exec(s.commandData);if(!r.async&&this.fire('afterCommandExec',s)!==true)return s.returnValue;}return false;},getCommand:function(p){return this._.commands[p];},getData:function(){var r=this;r.fire('beforeGetData');var p=r._.data;if(typeof p!='string'){var q=r.element;if(q&&r.elementMode==1)p=q.is('textarea')?q.getValue():q.getHtml();else p='';}p={dataValue:p};r.fire('getData',p);return p.dataValue;},getSnapshot:function(){var p=this.fire('getSnapshot');if(typeof p!='string'){var q=this.element;if(q&&this.elementMode==1)p=q.is('textarea')?q.getValue():q.getHtml();}return p;},loadSnapshot:function(p){this.fire('loadSnapshot',p);},setData:function(p,q,r){if(q)this.on('dataReady',function(t){t.removeListener();q.call(t.editor);});var s={dataValue:p};!r&&this.fire('setData',s);this._.data=s.dataValue;!r&&this.fire('afterSetData',s);},setReadOnly:function(p){p=p==undefined||p;if(this.readOnly!=p){this.readOnly=p;this.fire('readOnly');}},insertHtml:function(p){this.fire('insertHtml',p);},insertText:function(p){this.fire('insertText',p);},insertElement:function(p){this.fire('insertElement',p);},checkDirty:function(){return this.mayBeDirty&&this._.previousValue!==this.getSnapshot();},resetDirty:function(){if(this.mayBeDirty)this._.previousValue=this.getSnapshot();},updateElement:function(){var r=this;var p=r.element;if(p&&r.elementMode==1){var q=r.getData();if(r.config.htmlEncodeOutput)q=i.htmlEncode(q);if(p.is('textarea'))p.setValue(q);else p.setHtml(q);}}});e.on('loaded',function(){var p=e.editor._pending;if(p){delete e.editor._pending;for(var q=0;q<p.length;q++)p[q]._init();}});e.htmlParser=function(){this._={htmlPartsRegex:new RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))",'g')};};(function(){var p=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,q={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};e.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(r){var E=this;var s,t,u=0,v;while(s=E._.htmlPartsRegex.exec(r)){var w=s.index;if(w>u){var x=r.substring(u,w);if(v)v.push(x);else E.onText(x);}u=E._.htmlPartsRegex.lastIndex;if(t=s[1]){t=t.toLowerCase();if(v&&j.$cdata[t]){E.onCDATA(v.join(''));v=null;}if(!v){E.onTagClose(t);continue;}}if(v){v.push(s[0]);continue;}if(t=s[3]){t=t.toLowerCase();if(/="/.test(t))continue;var y={},z,A=s[4],B=!!(A&&A.charAt(A.length-1)=='/');if(A)while(z=p.exec(A)){var C=z[1].toLowerCase(),D=z[2]||z[3]||z[4]||'';if(!D&&q[C])y[C]=C;else y[C]=D;}E.onTagOpen(t,y,B);if(!v&&j.$cdata[t])v=[];continue;}if(t=s[2])E.onComment(t);}if(r.length>u)E.onText(r.substring(u,r.length));}};})();e.htmlParser.comment=function(p){this.value=p;this._={isBlockLike:false};};e.htmlParser.comment.prototype={type:8,writeHtml:function(p,q){var r=this.value;if(q){if(!(r=q.onComment(r,this)))return;if(typeof r!='string'){r.parent=this.parent;r.writeHtml(p,q);return;}}p.comment(r);}};(function(){var p=/[\t\r\n ]{2,}|[\t\r\n]/g;e.htmlParser.text=function(q){this.value=q;this._={isBlockLike:false};};e.htmlParser.text.prototype={type:3,writeHtml:function(q,r){var s=this.value;if(r&&!(s=r.onText(s,this)))return;q.text(s);}};})();(function(){e.htmlParser.cdata=function(p){this.value=p;};e.htmlParser.cdata.prototype={type:3,writeHtml:function(p){p.write(this.value);}};})();e.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var p=i.extend({table:1,ul:1,ol:1,dl:1},j.table,j.ul,j.ol,j.dl),q=g&&f.version<8?{dd:1,dt:1}:{},r={ol:1,ul:1},s=i.extend({},{html:1},j.html,j.body,j.head,{style:1,script:1});e.htmlParser.fragment.fromHtml=function(t,u,v){var w=new e.htmlParser(),x=v||new e.htmlParser.fragment(),y=[],z=[],A=x,B=false;function C(F){var G;if(y.length>0)for(var H=0;H<y.length;H++){var I=y[H],J=I.name,K=j[J],L=A.name&&j[A.name];if((!L||L[J])&&(!F||!K||K[F]||!j[F])){if(!G){D();G=1;}I=I.clone();I.parent=A;A=I;y.splice(H,1);H--;}}};function D(){while(z.length)A.add(z.shift());};function E(F,G,H){if(F.previous!==undefined)return;G=G||A||x;var I=A;if(u&&(!G.type||G.name=='body')){var J,K;if(F.attributes&&(K=F.attributes['data-cke-real-element-type']))J=K;else J=F.name;if(J&&!(J in j.$body||J=='body'||F.isOrphan)){A=G;w.onTagOpen(u,{});F.returnPoint=G=A;}}if(F._.isBlockLike&&F.name!='pre'){var L=F.children.length,M=F.children[L-1],N;if(M&&M.type==3)if(!(N=i.rtrim(M.value)))F.children.length=L-1;else M.value=N;}G.add(F);if(F.returnPoint){A=F.returnPoint;delete F.returnPoint;}else A=H?G:I;};w.onTagOpen=function(F,G,H,I){var J=new e.htmlParser.element(F,G);if(J.isUnknown&&H)J.isEmpty=true;J.isOptionalClose=F in q||I;if(j.$removeEmpty[F]){y.push(J);return;}else if(F=='pre')B=true;else if(F=='br'&&B){A.add(new e.htmlParser.text('\n'));return;}if(F=='br'){z.push(J);return;}while(1){var K=A.name,L=K?j[K]||(A._.isBlockLike?j.div:j.span):s;if(!J.isUnknown&&!A.isUnknown&&!L[F]){if(A.isOptionalClose)w.onTagClose(K);else if(F in r&&K in r){var M=A.children,N=M[M.length-1];if(!(N&&N.name=='li'))E(N=new e.htmlParser.element('li'),A);!J.returnPoint&&(J.returnPoint=A);A=N;}else if(F in j.$listItem&&K!=F)w.onTagOpen(F=='li'?'ul':'dl',{},0,1);else if(K in p&&K!=F){!J.returnPoint&&(J.returnPoint=A);A=A.parent;}else{if(K in j.$inline)y.unshift(A);if(A.parent)E(A,A.parent,1);else{J.isOrphan=1;break;}}}else break;}C(F);D();J.parent=A;if(J.isEmpty)E(J);else A=J;};w.onTagClose=function(F){for(var G=y.length-1;G>=0;G--){if(F==y[G].name){y.splice(G,1);return;}}var H=[],I=[],J=A;while(J!=x&&J.name!=F){if(!J._.isBlockLike)I.unshift(J);H.push(J);J=J.returnPoint||J.parent;}if(J!=x){for(G=0;G<H.length;G++){var K=H[G];E(K,K.parent);}A=J;if(A.name=='pre')B=false;if(J._.isBlockLike)D();E(J,J.parent);if(J==A)A=A.parent;y=y.concat(I);}if(F=='body')u=false;};w.onText=function(F){if((!A._.hasInlineStarted||z.length)&&!B){F=i.ltrim(F);if(F.length===0)return;}D();C();if(u&&(!A.type||A.name=='body')&&i.trim(F))this.onTagOpen(u,{},0,1);if(!B)F=F.replace(/[\t\r\n ]{2,}|[\t\r\n]/g,' ');A.add(new e.htmlParser.text(F));};w.onCDATA=function(F){A.add(new e.htmlParser.cdata(F));};w.onComment=function(F){D();C();A.add(new e.htmlParser.comment(F));};w.parse(t);D(!g&&1);while(A!=x)E(A,A.parent,1);return x;};e.htmlParser.fragment.prototype={add:function(t,u){var w=this;isNaN(u)&&(u=w.children.length);var v=u>0?w.children[u-1]:null;if(v){if(t._.isBlockLike&&v.type==3){v.value=i.rtrim(v.value);if(v.value.length===0){w.children.pop();w.add(t);return;}}v.next=t;}t.previous=v;t.parent=w;w.children.splice(u,0,t);w._.hasInlineStarted=t.type==3||t.type==1&&!t._.isBlockLike;},writeHtml:function(t,u){var v;this.filterChildren=function(){var w=new e.htmlParser.basicWriter();this.writeChildrenHtml.call(this,w,u,true);var x=w.getHtml();this.children=new e.htmlParser.fragment.fromHtml(x).children;v=1;};!this.name&&u&&u.onFragment(this);this.writeChildrenHtml(t,v?null:u);},writeChildrenHtml:function(t,u){for(var v=0;v<this.children.length;v++)this.children[v].writeHtml(t,u);}};})();e.htmlParser.element=function(p,q){var w=this;w.name=p;w.attributes=q||(q={});w.children=[];var r=q['data-cke-real-element-type']||p||'',s=r.match(/^cke:(.*)/);s&&(r=s[1]);var t=j,u=!!(t.$nonBodyContent[r]||t.$block[r]||t.$listItem[r]||t.$tableContent[r]||t.$nonEditable[r]||r=='br'),v=!!t.$empty[p];w.isEmpty=v;w.isUnknown=!t[p];w._={isBlockLike:u,hasInlineStarted:v||!u};};e.htmlParser.cssStyle=function(){var p,q=arguments[0],r={};p=q instanceof e.htmlParser.element?q.attributes.style:q;(p||'').replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(s,t,u){t=='font-family'&&(u=u.replace(/["']/g,''));r[t.toLowerCase()]=u;});return{rules:r,populate:function(s){var t=this.toString();if(t)s instanceof l?s.setAttribute('style',t):s instanceof e.htmlParser.element?s.attributes.style=t:s.style=t;},'toString':function(){var s=[];for(var t in r)r[t]&&s.push(t,':',r[t],';');return s.join('');}};};(function(){var p=function(q,r){q=q[0];r=r[0];return q<r?-1:q>r?1:0;};e.htmlParser.element.prototype={type:1,add:e.htmlParser.fragment.prototype.add,clone:function(){return new e.htmlParser.element(this.name,this.attributes);},writeHtml:function(q,r){var s=this.attributes,t=this,u=t.name,v,w,x,y;t.filterChildren=function(){if(!y){var F=new e.htmlParser.basicWriter();e.htmlParser.fragment.prototype.writeChildrenHtml.call(t,F,r);t.children=new e.htmlParser.fragment.fromHtml(F.getHtml(),0,t.clone()).children;y=1;}};if(r){for(;;){if(!(u=r.onElementName(u)))return;t.name=u;if(!(t=r.onElement(t)))return;t.parent=this.parent;if(t.name==u)break;if(t.type!=1){t.writeHtml(q,r);return;}u=t.name;if(!u){for(var z=0,A=this.children.length;z<A;z++)this.children[z].parent=t.parent;this.writeChildrenHtml.call(t,q,y?null:r);return;}}s=t.attributes;}q.openTag(u,s);var B=[];for(var C=0;C<2;C++)for(v in s){w=v;x=s[v];if(C==1)B.push([v,x]);else if(r){for(;;){if(!(w=r.onAttributeName(v))){delete s[v];break;}else if(w!=v){delete s[v];v=w;continue;}else break;}if(w)if((x=r.onAttribute(t,w,x))===false)delete s[w];else s[w]=x;}}if(q.sortAttributes)B.sort(p);var D=B.length;for(C=0;C<D;C++){var E=B[C];q.attribute(E[0],E[1]);}q.openTagClose(u,t.isEmpty);if(!t.isEmpty){this.writeChildrenHtml.call(t,q,y?null:r);q.closeTag(u);}},writeChildrenHtml:function(q,r){e.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments);}};})();(function(){e.htmlParser.filter=i.createClass({$:function(u){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};if(u)this.addRules(u,10);},proto:{addRules:function(u,v){var w=this;if(typeof v!='number')v=10;q(w._.elementNames,u.elementNames,v);q(w._.attributeNames,u.attributeNames,v);r(w._.elements,u.elements,v);r(w._.attributes,u.attributes,v);w._.text=s(w._.text,u.text,v)||w._.text;w._.comment=s(w._.comment,u.comment,v)||w._.comment;w._.root=s(w._.root,u.root,v)||w._.root;},onElementName:function(u){return p(u,this._.elementNames);},onAttributeName:function(u){return p(u,this._.attributeNames);},onText:function(u){var v=this._.text;return v?v.filter(u):u;},onComment:function(u,v){var w=this._.comment;return w?w.filter(u,v):u;},onFragment:function(u){var v=this._.root;return v?v.filter(u):u;},onElement:function(u){var z=this;var v=[z._.elements['^'],z._.elements[u.name],z._.elements.$],w,x;for(var y=0;y<3;y++){w=v[y];if(w){x=w.filter(u,z);if(x===false)return null;if(x&&x!=u)return z.onNode(x);if(u.parent&&!u.name)break;}}return u;},onNode:function(u){var v=u.type;return v==1?this.onElement(u):v==3?new e.htmlParser.text(this.onText(u.value)):v==8?new e.htmlParser.comment(this.onComment(u.value)):null;},onAttribute:function(u,v,w){var x=this._.attributes[v];if(x){var y=x.filter(w,u,this);if(y===false)return false;if(typeof y!='undefined')return y;}return w;}}});function p(u,v){for(var w=0;u&&w<v.length;w++){var x=v[w];u=u.replace(x[0],x[1]);}return u;};function q(u,v,w){if(typeof v=='function')v=[v];var x,y,z=u.length,A=v&&v.length;if(A){for(x=0;x<z&&u[x].pri<w;x++){}for(y=A-1;y>=0;y--){var B=v[y];if(B){B.pri=w;u.splice(x,0,B);}}}};function r(u,v,w){if(v)for(var x in v){var y=u[x];u[x]=s(y,v[x],w);if(!y)u.$length++;}};function s(u,v,w){if(v){v.pri=w;if(u){if(!u.splice){if(u.pri>w)u=[v,u];else u=[u,v];u.filter=t;}else q(u,v,w);return u;}else{v.filter=v;return v;}}};function t(u){var v=u.type||u instanceof e.htmlParser.fragment;for(var w=0;w<this.length;w++){if(v)var x=u.type,y=u.name;var z=this[w],A=z.apply(window,arguments);if(A===false)return A;if(v){if(A&&(A.name!=y||A.type!=x))return A;}else if(typeof A!='string')return A;A!=undefined&&(u=A);}return u;};})();e.htmlParser.basicWriter=i.createClass({$:function(){this._={output:[]};},proto:{openTag:function(p,q){this._.output.push('<',p);},openTagClose:function(p,q){if(q)this._.output.push(' />');else this._.output.push('>');},attribute:function(p,q){if(typeof q=='string')q=i.htmlEncodeAttr(q);this._.output.push(' ',p,'="',q,'"');},closeTag:function(p){this._.output.push('</',p,'>');},text:function(p){this._.output.push(p);},comment:function(p){this._.output.push('<!--',p,'-->');},write:function(p){this._.output.push(p);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(p){var q=this._.output.join('');if(p)this.reset();return q;}}});delete e.loadFullCore;e.instances={};e.document=new k(document);e.add=function(p){e.instances[p.name]=p;p.on('focus',function(){if(e.currentInstance!=p){e.currentInstance=p;e.fire('currentInstance');}});p.on('blur',function(){if(e.currentInstance==p){e.currentInstance=null;e.fire('currentInstance');}});};e.remove=function(p){delete e.instances[p.name];};e.on('instanceDestroyed',function(){if(i.isEmpty(this.instances))e.fire('reset');});e.TRISTATE_ON=1;e.TRISTATE_OFF=2;e.TRISTATE_DISABLED=0;h.comment=i.createClass({base:h.node,$:function(p,q){if(typeof p=='string')p=(q?q.$:document).createComment(p);this.base(p);},proto:{type:8,getOuterHtml:function(){return'<!--'+this.$.nodeValue+'-->';}}});(function(){var p={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},q={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},r=function(s){var t=s.getChildren();for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u);if(w.type==1&&j.$block[w.getName()])return true;}return false;};h.elementPath=function(s){var y=this;var t=null,u=null,v=[],w=s;while(w){if(w.type==1){if(!y.lastElement)y.lastElement=w;var x=w.getName();if(g&&w.$.scopeName!='HTML')x=w.$.scopeName.toLowerCase()+':'+x;if(!u){if(!t&&p[x])t=w;if(q[x])if(!t&&x=='div'&&!r(w))t=w;else u=w;}v.push(w);if(x=='body')break;}w=w.getParent();}y.block=t;y.blockLimit=u;y.elements=v;};})();h.elementPath.prototype={compare:function(p){var q=this.elements,r=p&&p.elements;if(!r||q.length!=r.length)return false;for(var s=0;s<q.length;s++){if(!q[s].equals(r[s]))return false;}return true;},contains:function(p){var q=this.elements;for(var r=0;r<q.length;r++){if(q[r].getName()in p)return q[r];}return null;}};h.text=function(p,q){if(typeof p=='string')p=(q?q.$:document).createTextNode(p);this.$=p;};h.text.prototype=new h.node();i.extend(h.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},setText:function(p){this.$.nodeValue=p;},split:function(p){var u=this;if(g&&p==u.getLength()){var q=u.getDocument().createText('');q.insertAfter(u);return q;}var r=u.getDocument(),s=new h.text(u.$.splitText(p),r);if(f.ie8){var t=new h.text('',r);t.insertAfter(s);t.remove();}return s;},substring:function(p,q){if(typeof q!='number')return this.$.nodeValue.substr(p);else return this.$.nodeValue.substring(p,q);}});h.documentFragment=function(p){p=p||e.document;this.$=p.$.createDocumentFragment();};i.extend(h.documentFragment.prototype,l.prototype,{type:11,insertAfterNode:function(p){p=p.$;p.parentNode.insertBefore(this.$,p.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});(function(){function p(w,x){if(this._.end)return null;var y,z=this.range,A,B=this.guard,C=this.type,D=w?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;z.trim();if(z.collapsed){this.end();return null;}}if(!w&&!this._.guardLTR){var E=z.endContainer,F=E.getChild(z.endOffset);this._.guardLTR=function(J,K){return(!K||!E.equals(J))&&(!F||!J.equals(F))&&(J.type!=1||!K||J.getName()!='body');};}if(w&&!this._.guardRTL){var G=z.startContainer,H=z.startOffset>0&&G.getChild(z.startOffset-1);this._.guardRTL=function(J,K){return(!K||!G.equals(J))&&(!H||!J.equals(H))&&(J.type!=1||!K||J.getName()!='body');};}var I=w?this._.guardRTL:this._.guardLTR;if(B)A=function(J,K){if(I(J,K)===false)return false;return B(J,K);};else A=I;if(this.current)y=this.current[D](false,C,A);else if(w){y=z.endContainer;if(z.endOffset>0){y=y.getChild(z.endOffset-1);if(A(y)===false)y=null;}else y=A(y,true)===false?null:y.getPreviousSourceNode(true,C,A);}else{y=z.startContainer;y=y.getChild(z.startOffset);if(y){if(A(y)===false)y=null;}else y=A(z.startContainer,true)===false?null:z.startContainer.getNextSourceNode(true,C,A);}while(y&&!this._.end){this.current=y;if(!this.evaluator||this.evaluator(y)!==false){if(!x)return y;}else if(x&&this.evaluator)return false;y=y[D](false,C,A);}this.end();return this.current=null;};function q(w){var x,y=null;while(x=p.call(this,w))y=x;return y;};h.walker=i.createClass({$:function(w){this.range=w;this._={};},proto:{end:function(){this._.end=1;},next:function(){return p.call(this);},previous:function(){return p.call(this,1);},checkForward:function(){return p.call(this,0,1)!==false;},checkBackward:function(){return p.call(this,1,1)!==false;},lastForward:function(){return q.call(this);},lastBackward:function(){return q.call(this,1);},reset:function(){delete this.current;this._={};}}});var r={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1};l.prototype.isBlockBoundary=function(w){var x=w?i.extend({},j.$block,w||{}):j.$block;return this.getComputedStyle('float')=='none'&&r[this.getComputedStyle('display')]||x[this.getName()];};h.walker.blockBoundary=function(w){return function(x,y){return!(x.type==1&&x.isBlockBoundary(w));};};h.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};h.walker.bookmark=function(w,x){function y(z){return z&&z.getName&&z.getName()=='span'&&z.data('cke-bookmark');};return function(z){var A,B;A=z&&!z.getName&&(B=z.getParent())&&y(B);A=w?A:A||y(z);return!!(x^A);};};h.walker.whitespaces=function(w){return function(x){var y=x&&x.type==3&&!i.trim(x.getText());return!!(w^y);};};h.walker.invisible=function(w){var x=h.walker.whitespaces();return function(y){var z=x(y)||y.is&&!y.$.offsetHeight;return!!(w^z);};};h.walker.nodeType=function(w,x){return function(y){return!!(x^y.type==w);};};var s=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,t=h.walker.whitespaces(),u=h.walker.bookmark(),v=function(w){return u(w)||t(w)||w.type==1&&w.getName()in j.$inline&&!(w.getName()in j.$empty);};l.prototype.getBogus=function(){var w=this;do w=w.getPreviousSourceNode();while(v(w));if(w&&(!g?w.is&&w.is('br'):w.getText&&s.test(w.getText())))return w;return false;};})();h.range=function(p){var q=this;q.startContainer=null;q.startOffset=null;q.endContainer=null;q.endOffset=null;q.collapsed=true;q.document=p;};(function(){var p=function(x){x.collapsed=x.startContainer&&x.endContainer&&x.startContainer.equals(x.endContainer)&&x.startOffset==x.endOffset;},q=function(x,y,z,A){x.optimizeBookmark();var B=x.startContainer,C=x.endContainer,D=x.startOffset,E=x.endOffset,F,G;if(C.type==3)C=C.split(E);else if(C.getChildCount()>0)if(E>=C.getChildCount()){C=C.append(x.document.createText(''));G=true;}else C=C.getChild(E);if(B.type==3){B.split(D);if(B.equals(C))C=B.getNext();}else if(!D){B=B.getFirst().insertBeforeMe(x.document.createText(''));F=true;}else if(D>=B.getChildCount()){B=B.append(x.document.createText(''));F=true;}else B=B.getChild(D).getPrevious();var H=B.getParents(),I=C.getParents(),J,K,L;for(J=0;J<H.length;J++){K=H[J];L=I[J];if(!K.equals(L))break;}var M=z,N,O,P,Q;for(var R=J;R<H.length;R++){N=H[R];if(M&&!N.equals(B))O=M.append(N.clone());P=N.getNext();while(P){if(P.equals(I[R])||P.equals(C))break;Q=P.getNext();if(y==2)M.append(P.clone(true));else{P.remove();if(y==1)M.append(P);}P=Q;}if(M)M=O;}M=z;for(var S=J;S<I.length;S++){N=I[S];if(y>0&&!N.equals(C))O=M.append(N.clone());if(!H[S]||N.$.parentNode!=H[S].$.parentNode){P=N.getPrevious();while(P){if(P.equals(H[S])||P.equals(B))break;Q=P.getPrevious();if(y==2)M.$.insertBefore(P.$.cloneNode(true),M.$.firstChild);else{P.remove();if(y==1)M.$.insertBefore(P.$,M.$.firstChild);}P=Q;}}if(M)M=O;}if(y==2){var T=x.startContainer;if(T.type==3){T.$.data+=T.$.nextSibling.data;T.$.parentNode.removeChild(T.$.nextSibling);}var U=x.endContainer;if(U.type==3&&U.$.nextSibling){U.$.data+=U.$.nextSibling.data;U.$.parentNode.removeChild(U.$.nextSibling);}}else{if(K&&L&&(B.$.parentNode!=K.$.parentNode||C.$.parentNode!=L.$.parentNode)){var V=L.getIndex();if(F&&L.$.parentNode==B.$.parentNode)V--;if(A&&K.type==1){var W=l.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',x.document);W.insertAfter(K);K.mergeSiblings(false);x.moveToBookmark({startNode:W});}else x.setStart(L.getParent(),V);}x.collapse(true);}if(F)B.remove();if(G&&C.$.parentNode)C.remove();},r={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function s(x){var y=false,z=h.walker.bookmark(true);return function(A){if(z(A))return true;if(A.type==3){if(A.hasAscendant('pre')||i.trim(A.getText()).length)return false;}else if(A.type==1)if(!r[A.getName()])if(!x&&!g&&A.getName()=='br'&&!y)y=true;else return false;return true;};};function t(x){return x.type!=3&&x.getName()in j.$removeEmpty||!i.trim(x.getText())||!!x.getParent().data('cke-bookmark');};var u=new h.walker.whitespaces(),v=new h.walker.bookmark();function w(x){return!u(x)&&!v(x);};h.range.prototype={clone:function(){var y=this;var x=new h.range(y.document);x.startContainer=y.startContainer;x.startOffset=y.startOffset;x.endContainer=y.endContainer;x.endOffset=y.endOffset;x.collapsed=y.collapsed;return x;},collapse:function(x){var y=this;if(x){y.endContainer=y.startContainer;y.endOffset=y.startOffset;}else{y.startContainer=y.endContainer;y.startOffset=y.endOffset;}y.collapsed=true;},cloneContents:function(){var x=new h.documentFragment(this.document);if(!this.collapsed)q(this,2,x);return x;},deleteContents:function(x){if(this.collapsed)return;q(this,0,null,x);},extractContents:function(x){var y=new h.documentFragment(this.document);if(!this.collapsed)q(this,1,y,x);return y;},createBookmark:function(x){var D=this;var y,z,A,B,C=D.collapsed;y=D.document.createElement('span');y.data('cke-bookmark',1);y.setStyle('display','none');y.setHtml('&nbsp;');if(x){A='cke_bm_'+i.getNextNumber();y.setAttribute('id',A+'S');}if(!C){z=y.clone();z.setHtml('&nbsp;');if(x)z.setAttribute('id',A+'E');B=D.clone();B.collapse();B.insertNode(z);}B=D.clone();B.collapse(true);B.insertNode(y);if(z){D.setStartAfter(y);D.setEndBefore(z);}else D.moveToPosition(y,4);return{startNode:x?A+'S':y,endNode:x?A+'E':z,serializable:x,collapsed:C};},createBookmark2:function(x){var F=this;var y=F.startContainer,z=F.endContainer,A=F.startOffset,B=F.endOffset,C=F.collapsed,D,E;if(!y||!z)return{start:0,end:0};if(x){if(y.type==1){D=y.getChild(A);if(D&&D.type==3&&A>0&&D.getPrevious().type==3){y=D;A=0;}if(D&&D.type==1)A=D.getIndex(1);}while(y.type==3&&(E=y.getPrevious())&&E.type==3){y=E;A+=E.getLength();}if(!C){if(z.type==1){D=z.getChild(B);if(D&&D.type==3&&B>0&&D.getPrevious().type==3){z=D;B=0;}if(D&&D.type==1)B=D.getIndex(1);}while(z.type==3&&(E=z.getPrevious())&&E.type==3){z=E;B+=E.getLength();}}}return{start:y.getAddress(x),end:C?null:z.getAddress(x),startOffset:A,endOffset:B,normalized:x,collapsed:C,is2:true};},moveToBookmark:function(x){var F=this;if(x.is2){var y=F.document.getByAddress(x.start,x.normalized),z=x.startOffset,A=x.end&&F.document.getByAddress(x.end,x.normalized),B=x.endOffset;F.setStart(y,z);if(A)F.setEnd(A,B);else F.collapse(true);}else{var C=x.serializable,D=C?F.document.getById(x.startNode):x.startNode,E=C?F.document.getById(x.endNode):x.endNode;F.setStartBefore(D);D.remove();if(E){F.setEndBefore(E);E.remove();}else F.collapse(true);}},getBoundaryNodes:function(){var C=this;var x=C.startContainer,y=C.endContainer,z=C.startOffset,A=C.endOffset,B;if(x.type==1){B=x.getChildCount();if(B>z)x=x.getChild(z);else if(B<1)x=x.getPreviousSourceNode();else{x=x.$;while(x.lastChild)x=x.lastChild;x=new h.node(x);x=x.getNextSourceNode()||x;}}if(y.type==1){B=y.getChildCount();if(B>A)y=y.getChild(A).getPreviousSourceNode(true);else if(B<1)y=y.getPreviousSourceNode();else{y=y.$;while(y.lastChild)y=y.lastChild;y=new h.node(y);}}if(x.getPosition(y)&2)x=y;return{startNode:x,endNode:y};},getCommonAncestor:function(x,y){var C=this;var z=C.startContainer,A=C.endContainer,B;if(z.equals(A)){if(x&&z.type==1&&C.startOffset==C.endOffset-1)B=z.getChild(C.startOffset);else B=z;}else B=z.getCommonAncestor(A);return y&&!B.is?B.getParent():B;},optimize:function(){var z=this;var x=z.startContainer,y=z.startOffset;if(x.type!=1)if(!y)z.setStartBefore(x);else if(y>=x.getLength())z.setStartAfter(x);x=z.endContainer;y=z.endOffset;if(x.type!=1)if(!y)z.setEndBefore(x);else if(y>=x.getLength())z.setEndAfter(x);},optimizeBookmark:function(){var z=this;var x=z.startContainer,y=z.endContainer;if(x.is&&x.is('span')&&x.data('cke-bookmark'))z.setStartAt(x,3);if(y&&y.is&&y.is('span')&&y.data('cke-bookmark'))z.setEndAt(y,4);},trim:function(x,y){var F=this;var z=F.startContainer,A=F.startOffset,B=F.collapsed;if((!x||B)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{var C=z.split(A);A=z.getIndex()+1;z=z.getParent();if(F.startContainer.equals(F.endContainer))F.setEnd(C,F.endOffset-F.startOffset);else if(z.equals(F.endContainer))F.endOffset+=1;}F.setStart(z,A);if(B){F.collapse(true);return;}}var D=F.endContainer,E=F.endOffset;if(!(y||B)&&D&&D.type==3){if(!E){E=D.getIndex();D=D.getParent();}else if(E>=D.getLength()){E=D.getIndex()+1;D=D.getParent();}else{D.split(E);E=D.getIndex()+1;D=D.getParent();}F.setEnd(D,E);}},enlarge:function(x,y){switch(x){case 1:if(this.collapsed)return;var z=this.getCommonAncestor(),A=this.document.getBody(),B,C,D,E,F,G=false,H,I,J=this.startContainer,K=this.startOffset;if(J.type==3){if(K){J=!i.trim(J.substring(0,K)).length&&J;G=!!J;}if(J)if(!(E=J.getPrevious()))D=J.getParent();}else{if(K)E=J.getChild(K-1)||J.getLast();if(!E)D=J;}while(D||E){if(D&&!E){if(!F&&D.equals(z))F=true;if(!A.contains(D))break;if(!G||D.getComputedStyle('display')!='inline'){G=false;if(F)B=D;else this.setStartBefore(D);}E=D.getPrevious();}while(E){H=false;if(E.type==3){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;H=/[\s\ufeff]$/.test(I);}else if((E.$.offsetWidth>0||y&&E.is('br'))&&!E.data('cke-bookmark'))if(G&&j.$removeEmpty[E.getName()]){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;else{var L=E.$.all||E.$.getElementsByTagName('*');for(var M=0,N;N=L[M++];){if(!j.$removeEmpty[N.nodeName.toLowerCase()]){E=null;break;}}}if(E)H=!!I.length;}else E=null;if(H)if(G){if(F)B=D;else if(D)this.setStartBefore(D);}else G=true;if(E){var O=E.getPrevious();if(!D&&!O){D=E;E=null;break;}E=O;}else D=null;}if(D)D=D.getParent();}J=this.endContainer;K=this.endOffset;D=E=null;F=G=false;if(J.type==3){J=!i.trim(J.substring(K)).length&&J;G=!(J&&J.getLength());if(J)if(!(E=J.getNext()))D=J.getParent();}else{E=J.getChild(K);if(!E)D=J;}while(D||E){if(D&&!E){if(!F&&D.equals(z))F=true;if(!A.contains(D))break;if(!G||D.getComputedStyle('display')!='inline'){G=false;if(F)C=D;else if(D)this.setEndAfter(D);}E=D.getNext();}while(E){H=false;if(E.type==3){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;H=/^[\s\ufeff]/.test(I);}else if((E.$.offsetWidth>0||y&&E.is('br'))&&!E.data('cke-bookmark'))if(G&&j.$removeEmpty[E.getName()]){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;else{L=E.$.all||E.$.getElementsByTagName('*');for(M=0;N=L[M++];){if(!j.$removeEmpty[N.nodeName.toLowerCase()]){E=null;break;}}}if(E)H=!!I.length;}else E=null;if(H)if(G)if(F)C=D;else this.setEndAfter(D);if(E){O=E.getNext();if(!D&&!O){D=E;E=null;break;}E=O;}else D=null;}if(D)D=D.getParent();}if(B&&C){z=B.contains(C)?C:B;this.setStartBefore(z);this.setEndAfter(z);}break;case 2:case 3:var P=new h.range(this.document);A=this.document.getBody();P.setStartAt(A,1);P.setEnd(this.startContainer,this.startOffset);var Q=new h.walker(P),R,S,T=h.walker.blockBoundary(x==3?{br:1}:null),U=function(W){var X=T(W);if(!X)R=W;return X;},V=function(W){var X=U(W);if(!X&&W.is&&W.is('br'))S=W;return X;};Q.guard=U;D=Q.lastBackward();R=R||A;this.setStartAt(R,!R.is('br')&&(!D&&this.checkStartOfBlock()||D&&R.contains(D))?1:4);P=this.clone();P.collapse();P.setEndAt(A,2);Q=new h.walker(P);Q.guard=x==3?V:U;R=null;D=Q.lastForward();R=R||A;this.setEndAt(R,!D&&this.checkEndOfBlock()||D&&R.contains(D)?2:3);if(S)this.setEndAfter(S);}},shrink:function(x,y){if(!this.collapsed){x=x||2;var z=this.clone(),A=this.startContainer,B=this.endContainer,C=this.startOffset,D=this.endOffset,E=this.collapsed,F=1,G=1;if(A&&A.type==3)if(!C)z.setStartBefore(A);else if(C>=A.getLength())z.setStartAfter(A);else{z.setStartBefore(A);F=0;}if(B&&B.type==3)if(!D)z.setEndBefore(B);else if(D>=B.getLength())z.setEndAfter(B);else{z.setEndAfter(B);G=0;}var H=new h.walker(z),I=h.walker.bookmark();H.evaluator=function(M){return M.type==(x==1?1:3);};var J;H.guard=function(M,N){if(I(M))return true;if(x==1&&M.type==3)return false;if(N&&M.equals(J))return false;if(!N&&M.type==1)J=M;return true;};if(F){var K=H[x==1?'lastForward':'next']();K&&this.setStartAt(K,y?1:3);}if(G){H.reset();var L=H[x==1?'lastBackward':'previous']();L&&this.setEndAt(L,y?2:4);}return!!(F||G);}},insertNode:function(x){var B=this;B.optimizeBookmark();B.trim(false,true);var y=B.startContainer,z=B.startOffset,A=y.getChild(z);if(A)x.insertBefore(A);else y.append(x);if(x.getParent().equals(B.endContainer))B.endOffset++;B.setStartBefore(x);},moveToPosition:function(x,y){this.setStartAt(x,y);this.collapse(true);},selectNodeContents:function(x){this.setStart(x,0);this.setEnd(x,x.type==3?x.getLength():x.getChildCount());},setStart:function(x,y){var z=this;if(x.type==1&&j.$empty[x.getName()])y=x.getIndex(),x=x.getParent();z.startContainer=x;z.startOffset=y;if(!z.endContainer){z.endContainer=x;z.endOffset=y;}p(z);},setEnd:function(x,y){var z=this;if(x.type==1&&j.$empty[x.getName()])y=x.getIndex()+1,x=x.getParent();z.endContainer=x;z.endOffset=y;if(!z.startContainer){z.startContainer=x;z.startOffset=y;}p(z);},setStartAfter:function(x){this.setStart(x.getParent(),x.getIndex()+1);},setStartBefore:function(x){this.setStart(x.getParent(),x.getIndex());},setEndAfter:function(x){this.setEnd(x.getParent(),x.getIndex()+1);},setEndBefore:function(x){this.setEnd(x.getParent(),x.getIndex());},setStartAt:function(x,y){var z=this;switch(y){case 1:z.setStart(x,0);break;case 2:if(x.type==3)z.setStart(x,x.getLength());else z.setStart(x,x.getChildCount());break;case 3:z.setStartBefore(x);break;case 4:z.setStartAfter(x);}p(z);},setEndAt:function(x,y){var z=this;switch(y){case 1:z.setEnd(x,0);break;case 2:if(x.type==3)z.setEnd(x,x.getLength());else z.setEnd(x,x.getChildCount());break;case 3:z.setEndBefore(x);break;case 4:z.setEndAfter(x);}p(z);},fixBlock:function(x,y){var B=this;var z=B.createBookmark(),A=B.document.createElement(y);B.collapse(x);B.enlarge(2);B.extractContents().appendTo(A);A.trim();if(!g)A.appendBogus();B.insertNode(A);B.moveToBookmark(z);return A;},splitBlock:function(x){var H=this;var y=new h.elementPath(H.startContainer),z=new h.elementPath(H.endContainer),A=y.blockLimit,B=z.blockLimit,C=y.block,D=z.block,E=null;if(!A.equals(B))return null;if(x!='br'){if(!C){C=H.fixBlock(true,x);D=new h.elementPath(H.endContainer).block;}if(!D)D=H.fixBlock(false,x);}var F=C&&H.checkStartOfBlock(),G=D&&H.checkEndOfBlock();H.deleteContents();if(C&&C.equals(D))if(G){E=new h.elementPath(H.startContainer);H.moveToPosition(D,4);D=null;}else if(F){E=new h.elementPath(H.startContainer);H.moveToPosition(C,3);C=null;}else{D=H.splitElement(C);if(!g&&!C.is('ul','ol'))C.appendBogus();}return{previousBlock:C,nextBlock:D,wasStartOfBlock:F,wasEndOfBlock:G,elementPath:E};},splitElement:function(x){var A=this;if(!A.collapsed)return null;A.setEndAt(x,2);var y=A.extractContents(),z=x.clone(false);y.appendTo(z);z.insertAfter(x);A.moveToPosition(x,4);return z;},checkBoundaryOfElement:function(x,y){var z=y==1,A=this.clone();A.collapse(z);A[z?'setStartAt':'setEndAt'](x,z?1:2);var B=new h.walker(A);B.evaluator=t;return B[z?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var D=this;var x=D.startContainer,y=D.startOffset;if(y&&x.type==3){var z=i.ltrim(x.substring(0,y));if(z.length)return false;}D.trim();var A=new h.elementPath(D.startContainer),B=D.clone();B.collapse(true);B.setStartAt(A.block||A.blockLimit,1);var C=new h.walker(B);C.evaluator=s(true);return C.checkBackward();},checkEndOfBlock:function(){var D=this;var x=D.endContainer,y=D.endOffset;if(x.type==3){var z=i.rtrim(x.substring(y));if(z.length)return false;}D.trim();var A=new h.elementPath(D.endContainer),B=D.clone();B.collapse(false);B.setEndAt(A.block||A.blockLimit,2);var C=new h.walker(B);C.evaluator=s(false);return C.checkForward();},checkReadOnly:(function(){function x(y,z){while(y){if(y.type==1)if(y.getAttribute('contentEditable')=='false'&&!y.data('cke-editable'))return 0;else if(y.is('html')||y.getAttribute('contentEditable')=='true'&&(y.contains(z)||y.equals(z)))break;y=y.getParent();}return 1;};return function(){var y=this.startContainer,z=this.endContainer;return!(x(y,z)&&x(z,y));};})(),moveToElementEditablePosition:function(x,y){var z;if(j.$empty[x.getName()])return false;while(x&&x.type==1){z=x.isEditable();if(z)this.moveToPosition(x,y?2:1);else if(j.$inline[x.getName()]){this.moveToPosition(x,y?4:3);return true;}if(j.$empty[x.getName()])x=x[y?'getPrevious':'getNext'](w);else x=x[y?'getLast':'getFirst'](w);if(x&&x.type==3){this.moveToPosition(x,y?4:3);return true;}}return z;},moveToElementEditStart:function(x){return this.moveToElementEditablePosition(x);},moveToElementEditEnd:function(x){return this.moveToElementEditablePosition(x,true);},getEnclosedNode:function(){var x=this.clone();x.optimize();if(x.startContainer.type!=1||x.endContainer.type!=1)return null;var y=new h.walker(x),z=h.walker.bookmark(true),A=h.walker.whitespaces(true),B=function(D){return A(D)&&z(D);};x.evaluator=B;var C=y.next();y.reset();return C&&C.equals(y.previous())?C:null;},getTouchedStartNode:function(){var x=this.startContainer;if(this.collapsed||x.type!=1)return x;return x.getChild(this.startOffset)||x;},getTouchedEndNode:function(){var x=this.endContainer;if(this.collapsed||x.type!=1)return x;return x.getChild(this.endOffset-1)||x;}};})();e.POSITION_AFTER_START=1;e.POSITION_BEFORE_END=2;e.POSITION_BEFORE_START=3;e.POSITION_AFTER_END=4;e.ENLARGE_ELEMENT=1;e.ENLARGE_BLOCK_CONTENTS=2;e.ENLARGE_LIST_ITEM_CONTENTS=3;e.START=1;e.END=2;e.STARTEND=3;e.SHRINK_ELEMENT=1;e.SHRINK_TEXT=2;(function(){h.rangeList=function(r){if(r instanceof h.rangeList)return r;if(!r)r=[];else if(r instanceof h.range)r=[r];return i.extend(r,p);};var p={createIterator:function(){var r=this,s=h.walker.bookmark(),t=function(w){return!(w.is&&w.is('tr'));},u=[],v;return{getNextRange:function(w){v=v==undefined?0:v+1;var x=r[v];if(x&&r.length>1){if(!v)for(var y=r.length-1;y>=0;y--)u.unshift(r[y].createBookmark(true));if(w){var z=0;while(r[v+z+1]){var A=x.document,B=0,C=A.getById(u[z].endNode),D=A.getById(u[z+1].startNode),E;while(1){E=C.getNextSourceNode(false);if(!D.equals(E)){if(s(E)||E.type==1&&E.isBlockBoundary()){C=E;continue;}}else B=1;break;}if(!B)break;z++;}}x.moveToBookmark(u.shift());while(z--){E=r[++v];E.moveToBookmark(u.shift());x.setEnd(E.endContainer,E.endOffset);}}return x;}};},createBookmarks:function(r){var w=this;var s=[],t;for(var u=0;u<w.length;u++){s.push(t=w[u].createBookmark(r,true));for(var v=u+1;v<w.length;v++){w[v]=q(t,w[v]);w[v]=q(t,w[v],true);}}return s;},createBookmarks2:function(r){var s=[];for(var t=0;t<this.length;t++)s.push(this[t].createBookmark2(r));return s;},moveToBookmarks:function(r){for(var s=0;s<this.length;s++)this[s].moveToBookmark(r[s]);}};function q(r,s,t){var u=r.serializable,v=s[t?'endContainer':'startContainer'],w=t?'endOffset':'startOffset',x=u?s.document.getById(r.startNode):r.startNode,y=u?s.document.getById(r.endNode):r.endNode;if(v.equals(x.getPrevious())){s.startOffset=s.startOffset-v.getLength()-y.getPrevious().getLength();v=y.getNext();}else if(v.equals(y.getPrevious())){s.startOffset=s.startOffset-v.getLength();v=y.getNext();}v.equals(x.getParent())&&s[w]++;v.equals(y.getParent())&&s[w]++;s[t?'endContainer':'startContainer']=v;return s;};})();(function(){if(f.webkit){f.hc=false;return;}var p=l.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',e.document);p.appendTo(e.document.getHead());try{f.hc=p.getComputedStyle('border-top-color')==p.getComputedStyle('border-right-color');}catch(q){f.hc=false;}if(f.hc)f.cssClass+=' cke_hc';p.remove();})();n.load(m.corePlugins.split(','),function(){e.status='loaded';e.fire('loaded');var p=e._.pending;if(p){delete e._.pending;for(var q=0;q<p.length;q++)e.add(p[q]);}});if(g)try{document.execCommand('BackgroundImageCache',false,true);}catch(p){}e.skins.add('kama',(function(){var q='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},richcombo:{canGroup:false},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(r){if(r.config.width&&!isNaN(r.config.width))r.config.width-=12;var s=[],t=/\$color/g,u='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';if(f.webkit){u=u.split('}').slice(0,-1);for(var v=0;v<u.length;v++)u[v]=u[v].split('{');}function w(z){var A=z.getById(q);if(!A){A=z.getHead().append('style');A.setAttribute('id',q);A.setAttribute('type','text/css');}return A;};function x(z,A,B){var C,D,E;for(var F=0;F<z.length;F++){if(f.webkit)for(D=0;D<A.length;D++){E=A[D][1];for(C=0;C<B.length;C++)E=E.replace(B[C][0],B[C][1]);z[F].$.sheet.addRule(A[D][0],E);}else{E=A;for(C=0;C<B.length;C++)E=E.replace(B[C][0],B[C][1]);if(g)z[F].$.styleSheet.cssText+=E;else z[F].$.innerHTML+=E;}}};var y=/\$color/g;i.extend(r,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(z){var A,B=w(e.document),C='.'+r.id,D=[C+' .cke_wrapper',C+'_dialog .cke_dialog_contents',C+'_dialog a.cke_dialog_tab',C+'_dialog .cke_dialog_footer'].join(','),E='background-color: $color !important;';if(f.webkit)A=[[D,E]];else A=D+'{'+E+'}';return(this.setUiColor=function(F){var G=[[y,F]];r.uiColor=F;x([B],A,G);x(s,u,G);})(z);}});r.on('menuShow',function(z){var A=z.data[0],B=A.element.getElementsByTag('iframe').getItem(0).getFrameDocument();if(!B.getById('cke_ui_color')){var C=w(B);s.push(C);var D=r.getUiColor();if(D)x([C],u,[[y,D]]);}});if(r.config.uiColor)r.setUiColor(r.config.uiColor);}};})());(function(){e.dialog?q():e.on('dialogPluginReady',q);function q(){e.dialog.on('resize',function(r){var s=r.data,t=s.width,u=s.height,v=s.dialog,w=v.parts.contents;if(s.skin!='kama')return;w.setStyles({width:t+'px',height:u+'px'});});};})();(function(){var q='a11yhelp',r='a11yHelp';n.add(q,{availableLangs:{en:1,he:1},init:function(s){var t=this;s.addCommand(r,{exec:function(){var u=s.langCode;u=t.availableLangs[u]?u:'en';e.scriptLoader.load(e.getUrl(t.path+'lang/'+u+'.js'),function(){i.extend(s.lang,t.langEntries[u]);s.openDialog(r);});},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:false});e.dialog.add(r,this.path+'dialogs/a11yhelp.js');}});})();n.add('basicstyles',{requires:['styles','button'],init:function(q){var r=function(u,v,w,x){var y=new e.style(x);q.attachStyleStateChange(y,function(z){!q.readOnly&&q.getCommand(w).setState(z);});q.addCommand(w,new e.styleCommand(y));q.ui.addButton(u,{label:v,command:w});},s=q.config,t=q.lang;r('Bold',t.bold,'bold',s.coreStyles_bold);r('Italic',t.italic,'italic',s.coreStyles_italic);r('Underline',t.underline,'underline',s.coreStyles_underline);r('Strike',t.strike,'strike',s.coreStyles_strike);r('Subscript',t.subscript,'subscript',s.coreStyles_subscript);r('Superscript',t.superscript,'superscript',s.coreStyles_superscript);}});m.coreStyles_bold={element:'strong',overrides:'b'};m.coreStyles_italic={element:'em',overrides:'i'};m.coreStyles_underline={element:'u'};m.coreStyles_strike={element:'strike'};m.coreStyles_subscript={element:'sub'};m.coreStyles_superscript={element:'sup'};(function(){var q={table:1,ul:1,ol:1,blockquote:1,div:1},r={},s={};i.extend(r,q,{tr:1,p:1,div:1,li:1});i.extend(s,r,{td:1});function t(F){u(F);v(F);};function u(F){var G=F.editor,H=F.data.path;if(G.readOnly)return;var I=G.config.useComputedState,J;I=I===undefined||I;if(!I)J=w(H.lastElement);J=J||H.block||H.blockLimit;if(J.is('body')){var K=G.getSelection().getRanges()[0].getEnclosedNode();K&&K.type==1&&(J=K);}if(!J)return;var L=I?J.getComputedStyle('direction'):J.getStyle('direction')||J.getAttribute('dir');G.getCommand('bidirtl').setState(L=='rtl'?1:2);G.getCommand('bidiltr').setState(L=='ltr'?1:2);};function v(F){var G=F.editor,H=F.data.path.block||F.data.path.blockLimit;G.fire('contentDirChanged',H?H.getComputedStyle('direction'):G.lang.dir);};function w(F){while(F&&!(F.getName()in s||F.is('body'))){var G=F.getParent();if(!G)break;F=G;}return F;};function x(F,G,H,I){if(F.isReadOnly())return;l.setMarker(I,F,'bidi_processed',1);var J=F;while((J=J.getParent())&&!J.is('body')){if(J.getCustomData('bidi_processed')){F.removeStyle('direction');F.removeAttribute('dir');return;}}var K='useComputedState'in H.config?H.config.useComputedState:1,L=K?F.getComputedStyle('direction'):F.getStyle('direction')||F.hasAttribute('dir');if(L==G)return;F.removeStyle('direction');if(K){F.removeAttribute('dir');if(G!=F.getComputedStyle('direction'))F.setAttribute('dir',G);}else F.setAttribute('dir',G);H.forceNextSelectionCheck();};function y(F,G,H){var I=F.getCommonAncestor(false,true);F=F.clone();F.enlarge(H==2?3:2);if(F.checkBoundaryOfElement(I,1)&&F.checkBoundaryOfElement(I,2)){var J;while(I&&I.type==1&&(J=I.getParent())&&J.getChildCount()==1&&!(I.getName()in G))I=J;return I.type==1&&I.getName()in G&&I;}};function z(F){return function(G){var H=G.getSelection(),I=G.config.enterMode,J=H.getRanges();if(J&&J.length){var K={},L=H.createBookmarks(),M=J.createIterator(),N,O=0;while(N=M.getNextRange(1)){var P=N.getEnclosedNode();if(!P||P&&!(P.type==1&&P.getName()in r))P=y(N,q,I);P&&x(P,F,G,K);var Q,R,S=new h.walker(N),T=L[O].startNode,U=L[O++].endNode;S.evaluator=function(V){return!!(V.type==1&&V.getName()in q&&!(V.getName()==(I==1?'p':'div')&&V.getParent().type==1&&V.getParent().getName()=='blockquote')&&V.getPosition(T)&2&&(V.getPosition(U)&4+16)==4);};while(R=S.next())x(R,F,G,K);Q=N.createIterator();Q.enlargeBr=I!=2;while(R=Q.getNextParagraph(I==1?'p':'div'))x(R,F,G,K);}l.clearAllMarkers(K);G.forceNextSelectionCheck();H.selectBookmarks(L);G.focus();}};};n.add('bidi',{requires:['styles','button'],init:function(F){var G=function(I,J,K,L){F.addCommand(K,new e.command(F,{exec:L}));F.ui.addButton(I,{label:J,command:K});},H=F.lang.bidi;G('BidiLtr',H.ltr,'bidiltr',z('ltr'));G('BidiRtl',H.rtl,'bidirtl',z('rtl'));F.on('selectionChange',t);F.on('contentDom',function(){F.document.on('dirChanged',function(I){F.fire('dirChanged',{node:I.data,dir:I.data.getDirection(1)});});});}});function A(F){var G=F.getDocument().getBody().getParent();while(F){if(F.equals(G))return false;F=F.getParent();}return true;};function B(F){var G=F==C.setAttribute,H=F==C.removeAttribute,I=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(J,K){var N=this;if(!N.getDocument().equals(e.document)){var L;if((J==(G||H?'dir':'direction')||J=='style'&&(H||I.test(K)))&&!A(N)){L=N.getDirection(1);var M=F.apply(N,arguments);if(L!=N.getDirection(1)){N.getDocument().fire('dirChanged',N);return M;}}}return F.apply(N,arguments);};};var C=l.prototype,D=['setStyle','removeStyle','setAttribute','removeAttribute'];for(var E=0;E<D.length;E++)C[D[E]]=i.override(C[D[E]],B);})();(function(){function q(u,v){var w=v.block||v.blockLimit;if(!w||w.getName()=='body')return 2;if(w.getAscendant('blockquote',true))return 1;return 2;};function r(u){var v=u.editor;if(v.readOnly)return;var w=v.getCommand('blockquote');w.state=q(v,u.data.path);w.fire('state');};function s(u){for(var v=0,w=u.getChildCount(),x;v<w&&(x=u.getChild(v));v++){if(x.type==1&&x.isBlockBoundary())return false;}return true;};var t={exec:function(u){var v=u.getCommand('blockquote').state,w=u.getSelection(),x=w&&w.getRanges(true)[0];if(!x)return;var y=w.createBookmarks();if(g){var z=y[0].startNode,A=y[0].endNode,B;if(z&&z.getParent().getName()=='blockquote'){B=z;while(B=B.getNext()){if(B.type==1&&B.isBlockBoundary()){z.move(B,true);break;}}}if(A&&A.getParent().getName()=='blockquote'){B=A;while(B=B.getPrevious()){if(B.type==1&&B.isBlockBoundary()){A.move(B);break;}}}}var C=x.createIterator(),D;C.enlargeBr=u.config.enterMode!=2;if(v==2){var E=[];while(D=C.getNextParagraph())E.push(D);if(E.length<1){var F=u.document.createElement(u.config.enterMode==1?'p':'div'),G=y.shift();x.insertNode(F);F.append(new h.text('\ufeff',u.document));x.moveToBookmark(G);x.selectNodeContents(F);x.collapse(true);G=x.createBookmark();E.push(F);y.unshift(G);}var H=E[0].getParent(),I=[];for(var J=0;J<E.length;J++){D=E[J];H=H.getCommonAncestor(D.getParent());}var K={table:1,tbody:1,tr:1,ol:1,ul:1};while(K[H.getName()])H=H.getParent();var L=null;while(E.length>0){D=E.shift();while(!D.getParent().equals(H))D=D.getParent();if(!D.equals(L))I.push(D);L=D;}while(I.length>0){D=I.shift();if(D.getName()=='blockquote'){var M=new h.documentFragment(u.document);while(D.getFirst()){M.append(D.getFirst().remove());E.push(M.getLast());}M.replace(D);}else E.push(D);}var N=u.document.createElement('blockquote');N.insertBefore(E[0]);while(E.length>0){D=E.shift();N.append(D);}}else if(v==1){var O=[],P={};while(D=C.getNextParagraph()){var Q=null,R=null;while(D.getParent()){if(D.getParent().getName()=='blockquote'){Q=D.getParent();R=D;break;}D=D.getParent();}if(Q&&R&&!R.getCustomData('blockquote_moveout')){O.push(R);l.setMarker(P,R,'blockquote_moveout',true);}}l.clearAllMarkers(P);var S=[],T=[];P={};while(O.length>0){var U=O.shift();N=U.getParent();if(!U.getPrevious())U.remove().insertBefore(N);else if(!U.getNext())U.remove().insertAfter(N);else{U.breakParent(U.getParent());T.push(U.getNext());}if(!N.getCustomData('blockquote_processed')){T.push(N);l.setMarker(P,N,'blockquote_processed',true);}S.push(U);}l.clearAllMarkers(P);for(J=T.length-1;J>=0;J--){N=T[J];if(s(N))N.remove();}if(u.config.enterMode==2){var V=true;while(S.length){U=S.shift();if(U.getName()=='div'){M=new h.documentFragment(u.document);var W=V&&U.getPrevious()&&!(U.getPrevious().type==1&&U.getPrevious().isBlockBoundary());if(W)M.append(u.document.createElement('br'));var X=U.getNext()&&!(U.getNext().type==1&&U.getNext().isBlockBoundary());while(U.getFirst())U.getFirst().remove().appendTo(M);if(X)M.append(u.document.createElement('br'));M.replace(U);V=false;}}}}w.selectBookmarks(y);u.focus();}};n.add('blockquote',{init:function(u){u.addCommand('blockquote',t);u.ui.addButton('Blockquote',{label:u.lang.blockquote,command:'blockquote'});u.on('selectionChange',r);},requires:['domiterator']});})();n.add('button',{beforeInit:function(q){q.ui.addHandler('button',o.button.handler);}});e.UI_BUTTON='button';o.button=function(q){i.extend(this,q,{title:q.label,className:q.className||q.command&&'cke_button_'+q.command||'',click:q.click||(function(r){r.execCommand(q.command);})});this._={};};o.button.handler={create:function(q){return new o.button(q);}};(function(){o.button.prototype={render:function(q,r){var s=f,t=this._.id=i.getNextId(),u='',v=this.command,w;this._.editor=q;var x={id:t,button:this,editor:q,focus:function(){var D=e.document.getById(t);D.focus();},execute:function(){if(g&&f.version<7)i.setTimeout(function(){this.button.click(q);},0,this);else this.button.click(q);}},y=i.addFunction(function(D){if(x.onkey){D=new h.event(D);return x.onkey(x,D.getKeystroke())!==false;}}),z=i.addFunction(function(D){var E;if(x.onfocus)E=x.onfocus(x,new h.event(D))!==false;if(f.gecko&&f.version<10900)D.preventBubble();return E;});x.clickFn=w=i.addFunction(x.execute,x);if(this.modes){var A={};function B(){var D=q.mode;if(D){var E=this.modes[D]?A[D]!=undefined?A[D]:2:0;this.setState(q.readOnly&&!this.readOnly?0:E);}};q.on('beforeModeUnload',function(){if(q.mode&&this._.state!=0)A[q.mode]=this._.state;},this);q.on('mode',B,this);!this.readOnly&&q.on('readOnly',B,this);}else if(v){v=q.getCommand(v);if(v){v.on('state',function(){this.setState(v.state);},this);u+='cke_'+(v.state==1?'on':v.state==0?'disabled':'off');}}if(!v)u+='cke_off';if(this.className)u+=' '+this.className;r.push('<span class="cke_button'+(this.icon&&this.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">','<a id="',t,'" class="',u,'"',s.gecko&&s.version>=10900&&!s.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+t+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(s.opera||s.gecko&&s.mac)r.push(' onkeypress="return false;"');if(s.gecko)r.push(' onblur="this.style.cssText = this.style.cssText;"');r.push(' onkeydown="return CKEDITOR.tools.callFunction(',y,', event);" onfocus="return CKEDITOR.tools.callFunction(',z,', event);" '+(g?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',w,', this); return false;"><span class="cke_icon"');if(this.icon){var C=(this.iconOffset||0)*-16;r.push(' style="background-image:url(',e.getUrl(this.icon),');background-position:0 '+C+'px;"');}r.push('>&nbsp;</span><span id="',t,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)r.push('<span class="cke_buttonarrow">'+(f.hc?'&#9660;':'&nbsp;')+'</span>');r.push('</a>','</span>');if(this.onRender)this.onRender();return x;},setState:function(q){if(this._.state==q)return false;this._.state=q;var r=e.document.getById(this._.id);if(r){r.setState(q);q==0?r.setAttribute('aria-disabled',true):r.removeAttribute('aria-disabled');q==1?r.setAttribute('aria-pressed',true):r.removeAttribute('aria-pressed');return true;}else return false;}};})();o.prototype.addButton=function(q,r){this.add(q,'button',r);};(function(){var q=function(C,D){var E=C.document,F=E.getBody(),G=0,H=function(){G=1;};F.on(D,H);(f.version>7?E.$:E.$.selection.createRange()).execCommand(D);F.removeListener(D,H);return G;},r=g?function(C,D){return q(C,D);}:function(C,D){try{return C.document.$.execCommand(D,false,null);}catch(E){return false;}},s=function(C){var D=this;D.type=C;D.canUndo=D.type=='cut';D.startDisabled=true;};s.prototype={exec:function(C,D){this.type=='cut'&&x(C);var E=r(C,this.type);if(!E)alert(C.lang.clipboard[this.type+'Error']);return E;}};var t={canUndo:false,exec:g?function(C){C.focus();if(!C.document.getBody().fire('beforepaste')&&!q(C,'paste')){C.fire('pasteDialog');return false;}}:function(C){try{if(!C.document.getBody().fire('beforepaste')&&!C.document.$.execCommand('Paste',false,null))throw 0;}catch(D){setTimeout(function(){C.fire('pasteDialog');},0);return false;}}},u=function(C){if(this.mode!='wysiwyg')return;switch(C.data.keyCode){case 1114112+86:case 2228224+45:var D=this.document.getBody();if(!g&&D.fire('beforepaste'))C.cancel();else if(f.opera||f.gecko&&f.version<10900)D.fire('paste');return;case 1114112+88:case 2228224+46:var E=this;this.fire('saveSnapshot');setTimeout(function(){E.fire('saveSnapshot');},0);}};function v(C){C.cancel();};function w(C,D,E){var F=this.document;if(F.getById('cke_pastebin'))return;if(D=='text'&&C.data&&C.data.$.clipboardData){var G=C.data.$.clipboardData.getData('text/plain');if(G){C.data.preventDefault();E(G);return;}}var H=this.getSelection(),I=new h.range(F),J=new l(D=='text'?'textarea':f.webkit?'body':'div',F);J.setAttribute('id','cke_pastebin');f.webkit&&J.append(F.createText('\xa0'));F.getBody().append(J);J.setStyles({position:'absolute',top:H.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});J.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var K=H.createBookmarks();this.on('selectionChange',v,null,null,0);if(D=='text')J.$.focus();else{I.setStartAt(J,1);I.setEndAt(J,2);I.select(true);}var L=this;window.setTimeout(function(){D=='text'&&f.gecko&&L.focusGrabber.focus();J.remove();L.removeListener('selectionChange',v);var M;J=f.webkit&&(M=J.getFirst())&&M.is&&M.hasClass('Apple-style-span')?M:J;H.selectBookmarks(K);E(J['get'+(D=='text'?'Value':'Html')]());},0);};function x(C){if(!g||f.quirks)return;var D=C.getSelection(),E;if(D.getType()==3&&(E=D.getSelectedElement())){var F=D.getRanges()[0],G=C.document.createText('');G.insertBefore(E);F.setStartBefore(G);F.setEndAfter(E);D.selectRanges([F]);setTimeout(function(){if(E.getParent()){G.remove();D.selectElement(E);}},0);}};var y;function z(C,D){g&&(y=1);var E=2;try{E=D.document.$.queryCommandEnabled(C)?2:0;}catch(F){}y=0;return E;};var A;function B(){var D=this;if(D.mode!='wysiwyg')return;D.getCommand('cut').setState(A?0:z('Cut',D));D.getCommand('copy').setState(z('Copy',D));var C=A?0:f.webkit?2:z('Paste',D);D.fire('pasteState',C);};n.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(C){C.on('paste',function(E){var F=E.data;if(F.html)C.insertHtml(F.html);else if(F.text)C.insertText(F.text);setTimeout(function(){C.fire('afterPaste');},0);},null,null,1000);C.on('pasteDialog',function(E){setTimeout(function(){C.openDialog('paste');},0);});C.on('pasteState',function(E){C.getCommand('paste').setState(E.data);});function D(E,F,G,H){var I=C.lang[F];C.addCommand(F,G);C.ui.addButton(E,{label:I,command:F});if(C.addMenuItems)C.addMenuItem(F,{label:I,command:F,group:'clipboard',order:H});};D('Cut','cut',new s('cut'),1);D('Copy','copy',new s('copy'),4);D('Paste','paste',t,8);e.dialog.add('paste',e.getUrl(this.path+'dialogs/paste.js'));C.on('key',u,C);C.on('contentDom',function(){var E=C.document.getBody();E.on(f.webkit?'paste':'beforepaste',function(F){if(y)return;var G={mode:'html'};C.fire('beforePaste',G);w.call(C,F,G.mode,function(H){if(!(H=i.trim(H.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,''))))return;var I={};I[G.mode]=H;C.fire('paste',I);});});E.on('contextmenu',function(){y=1;setTimeout(function(){y=0;},10);});E.on('beforecut',function(){!y&&x(C);});E.on('mouseup',function(){setTimeout(function(){B.call(C);},0);},C);E.on('keyup',B,C);});C.on('selectionChange',function(E){A=E.data.selection.getRanges()[0].checkReadOnly();B.call(C);});if(C.contextMenu)C.contextMenu.addListener(function(E,F){var G=F.getRanges()[0].checkReadOnly();return{cut:!G&&z('Cut',C),copy:z('Copy',C),paste:!G&&(f.webkit?2:z('Paste',C))};});}});})();n.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(q){var r=q.config,s=q.lang.colorButton,t;if(!f.hc){u('TextColor','fore',s.textColorTitle);u('BGColor','back',s.bgColorTitle);}function u(x,y,z){var A=i.getNextId()+'_colorBox';q.ui.add(x,'panelbutton',{label:z,title:z,className:'cke_button_'+x.toLowerCase(),modes:{wysiwyg:1},panel:{css:q.skin.editor.css,attributes:{role:'listbox','aria-label':s.panelTitle}},onBlock:function(B,C){C.autoSize=true;C.element.addClass('cke_colorblock');C.element.setHtml(v(B,y,A));C.element.getDocument().getBody().setStyle('overflow','hidden');o.fire('ready',this);var D=C.keys,E=q.lang.dir=='rtl';D[E?37:39]='next';D[40]='next';D[9]='next';D[E?39:37]='prev';D[38]='prev';D[2228224+9]='prev';D[32]='click';},onOpen:function(){var B=q.getSelection(),C=B&&B.getStartElement(),D=new h.elementPath(C),E;C=D.block||D.blockLimit||q.document.getBody();do E=C&&C.getComputedStyle(y=='back'?'background-color':'color')||'transparent';while(y=='back'&&E=='transparent'&&C&&(C=C.getParent()));if(!E||E=='transparent')E='#ffffff';this._.panel._.iframe.getFrameDocument().getById(A).setStyle('background-color',E);}});};function v(x,y,z){var A=[],B=r.colorButton_colors.split(','),C=B.length+(r.colorButton_enableMore?2:1),D=i.addFunction(function(J,K){if(J=='?'){var L=arguments.callee;function M(O){this.removeListener('ok',M);this.removeListener('cancel',M);O.name=='ok'&&L(this.getContentElement('picker','selectedColor').getValue(),K);};q.openDialog('colordialog',function(){this.on('ok',M);this.on('cancel',M);});return;}q.focus();x.hide(false);q.fire('saveSnapshot');new e.style(r['colorButton_'+K+'Style'],{color:'inherit'}).remove(q.document);if(J){var N=r['colorButton_'+K+'Style'];N.childRule=K=='back'?function(O){return w(O);}:function(O){return O.getName()!='a'||w(O);};new e.style(N,{color:J}).apply(q.document);}q.fire('saveSnapshot');});A.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',s.auto,'" onclick="CKEDITOR.tools.callFunction(',D,",null,'",y,"');return false;\" href=\"javascript:void('",s.auto,'\')" role="option" aria-posinset="1" aria-setsize="',C,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',z,'"></span></td><td colspan=7 align=center>',s.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var E=0;E<B.length;E++){if(E%8===0)A.push('</tr><tr>');var F=B[E].split('/'),G=F[0],H=F[1]||G;if(!F[1])G='#'+G.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var I=q.lang.colors[H]||H;A.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',I,'" onclick="CKEDITOR.tools.callFunction(',D,",'",G,"','",y,"'); return false;\" href=\"javascript:void('",I,'\')" role="option" aria-posinset="',E+2,'" aria-setsize="',C,'"><span class="cke_colorbox" style="background-color:#',H,'"></span></a></td>');}if(r.colorButton_enableMore===undefined||r.colorButton_enableMore)A.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',s.more,'" onclick="CKEDITOR.tools.callFunction(',D,",'?','",y,"');return false;\" href=\"javascript:void('",s.more,"')\"",' role="option" aria-posinset="',C,'" aria-setsize="',C,'">',s.more,'</a></td>');A.push('</tr></table>');return A.join('');};function w(x){return x.getAttribute('contentEditable')=='false'||x.getAttribute('data-nostyle');};}});m.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';m.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};m.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};n.colordialog={init:function(q){q.addCommand('colordialog',new e.dialogCommand('colordialog'));e.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};n.add('colordialog',n.colordialog);n.add('contextmenu',{requires:['menu'],onLoad:function(){n.contextMenu=i.createClass({base:e.menu,$:function(q){this.base.call(this,q,{panel:{className:q.skinClass+' cke_contextmenu',attributes:{'aria-label':q.lang.contextmenu.options}}});},proto:{addTarget:function(q,r){if(f.opera&&!('oncontextmenu'in document.body)){var s;q.on('mousedown',function(w){w=w.data;if(w.$.button!=2){if(w.getKeystroke()==1114112+1)q.fire('contextmenu',w);return;}if(r&&(f.mac?w.$.metaKey:w.$.ctrlKey))return;var x=w.getTarget();if(!s){var y=x.getDocument();s=y.createElement('input');s.$.type='button';y.getBody().append(s);}s.setAttribute('style','position:absolute;top:'+(w.$.clientY-2)+'px;left:'+(w.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});q.on('mouseup',function(w){if(s){s.remove();s=undefined;q.fire('contextmenu',w.data);}});}q.on('contextmenu',function(w){var x=w.data;if(r&&(f.webkit?t:f.mac?x.$.metaKey:x.$.ctrlKey))return;x.preventDefault();var y=x.getTarget().getDocument().getDocumentElement(),z=x.$.clientX,A=x.$.clientY;i.setTimeout(function(){this.open(y,null,z,A);},0,this);},this);if(f.opera)q.on('keypress',function(w){var x=w.data;if(x.$.keyCode===0)x.preventDefault();});if(f.webkit){var t,u=function(w){t=f.mac?w.data.$.metaKey:w.data.$.ctrlKey;},v=function(){t=0;};q.on('keydown',u);q.on('keyup',v);q.on('contextmenu',v);}},open:function(q,r,s,t){this.editor.focus();q=q||e.document.getDocumentElement();this.show(q,r,s,t);}}});},beforeInit:function(q){q.contextMenu=new n.contextMenu(q);q.addCommand('contextMenu',{exec:function(){q.contextMenu.open(q.document.getBody());}});}});(function(){function q(s){var t=this.att,u=s&&s.hasAttribute(t)&&s.getAttribute(t)||'';if(u!==undefined)this.setValue(u);};function r(){var s;for(var t=0;t<arguments.length;t++){if(arguments[t]instanceof l){s=arguments[t];break;}}if(s){var u=this.att,v=this.getValue();if(v)s.setAttribute(u,v);else s.removeAttribute(u,v);}};n.add('dialogadvtab',{createAdvancedTab:function(s,t){if(!t)t={id:1,dir:1,classes:1,styles:1};var u=s.lang.common,v={id:'advanced',label:u.advancedTab,title:u.advancedTab,elements:[{type:'vbox',padding:1,children:[]}]},w=[];if(t.id||t.dir){if(t.id)w.push({id:'advId',att:'id',type:'text',label:u.id,setup:q,commit:r});if(t.dir)w.push({id:'advLangDir',att:'dir',type:'select',label:u.langDir,'default':'',style:'width:100%',items:[[u.notSet,''],[u.langDirLTR,'ltr'],[u.langDirRTL,'rtl']],setup:q,commit:r});v.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(w)});}if(t.styles||t.classes){w=[];if(t.styles)w.push({id:'advStyles',att:'style',type:'text',label:u.styles,'default':'',onChange:function(){},getStyle:function(x,y){var z=this.getValue().match(new RegExp(x+'\\s*:\\s*([^;]*)','i'));return z?z[1]:y;},updateStyle:function(x,y){var z=this.getValue();if(z)z=z.replace(new RegExp('\\s*'+x+'s*:[^;]*(?:$|;s*)','i'),'').replace(/^[;\s]+/,'').replace(/\s+$/,'');if(y){z&&!/;\s*$/.test(z)&&(z+='; ');z+=x+': '+y;}this.setValue(z,1);},setup:q,commit:r});if(t.classes)w.push({type:'hbox',widths:['45%','55%'],children:[{id:'advCSSClasses',att:'class',type:'text',label:u.cssClasses,'default':'',setup:q,commit:r}]});v.elements[0].children.push({type:'hbox',widths:['50%','50%'],children:[].concat(w)});}return v;}});})();(function(){n.add('div',{requires:['editingblock','domiterator','styles'],init:function(q){var r=q.lang.div;q.addCommand('creatediv',new e.dialogCommand('creatediv'));q.addCommand('editdiv',new e.dialogCommand('editdiv'));q.addCommand('removediv',{exec:function(s){var t=s.getSelection(),u=t&&t.getRanges(),v,w=t.createBookmarks(),x,y=[];function z(B){var C=new h.elementPath(B),D=C.blockLimit,E=D.is('div')&&D;if(E&&!E.data('cke-div-added')){y.push(E);E.data('cke-div-added');}};for(var A=0;A<u.length;A++){v=u[A];if(v.collapsed)z(t.getStartElement());else{x=new h.walker(v);x.evaluator=z;x.lastForward();}}for(A=0;A<y.length;A++)y[A].remove(true);t.selectBookmarks(w);}});q.ui.addButton('CreateDiv',{label:r.toolbar,command:'creatediv'});if(q.addMenuItems){q.addMenuItems({editdiv:{label:r.edit,command:'editdiv',group:'div',order:1},removediv:{label:r.remove,command:'removediv',group:'div',order:5}});if(q.contextMenu)q.contextMenu.addListener(function(s,t){if(!s||s.isReadOnly())return null;var u=new h.elementPath(s),v=u.blockLimit;if(v&&v.getAscendant('div',true))return{editdiv:2,removediv:2};return null;});}e.dialog.add('creatediv',this.path+'dialogs/div.js');e.dialog.add('editdiv',this.path+'dialogs/div.js');}});})();(function(){var q={toolbarFocus:{editorFocus:false,readOnly:1,exec:function(s){var t=s._.elementsPath.idBase,u=e.document.getById(t+'0');u&&u.focus(g||f.air);}}},r='<span class="cke_empty">&nbsp;</span>';n.add('elementspath',{requires:['selection'],init:function(s){var t='cke_path_'+s.name,u,v=function(){if(!u)u=e.document.getById(t);return u;},w='cke_elementspath_'+i.getNextNumber()+'_';s._.elementsPath={idBase:w,filters:[]};s.on('themeSpace',function(B){if(B.data.space=='bottom')B.data.html+='<span id="'+t+'_label" class="cke_voice_label">'+s.lang.elementsPath.eleLabel+'</span>'+'<div id="'+t+'" class="cke_path" role="group" aria-labelledby="'+t+'_label">'+r+'</div>';});function x(B){s.focus();var C=s._.elementsPath.list[B];if(C.is('body')){var D=new h.range(s.document);D.selectNodeContents(C);D.select();}else s.getSelection().selectElement(C);};var y=i.addFunction(x),z=i.addFunction(function(B,C){var D=s._.elementsPath.idBase,E;C=new h.event(C);var F=s.lang.dir=='rtl';switch(C.getKeystroke()){case F?39:37:case 9:E=e.document.getById(D+(B+1));if(!E)E=e.document.getById(D+'0');E.focus();return false;case F?37:39:case 2228224+9:E=e.document.getById(D+(B-1));if(!E)E=e.document.getById(D+(s._.elementsPath.list.length-1));E.focus();return false;case 27:s.focus();return false;case 13:case 32:x(B);return false;}return true;});s.on('selectionChange',function(B){var C=f,D=B.data.selection,E=D.getStartElement(),F=[],G=B.editor,H=G._.elementsPath.list=[],I=G._.elementsPath.filters;while(E){var J=0,K;if(E.data('cke-display-name'))K=E.data('cke-display-name');else if(E.data('cke-real-element-type'))K=E.data('cke-real-element-type');else K=E.getName();for(var L=0;L<I.length;L++){var M=I[L](E,K);if(M===false){J=1;break;}K=M||K;}if(!J){var N=H.push(E)-1,O='';if(C.opera||C.gecko&&C.mac)O+=' onkeypress="return false;"';if(C.gecko)O+=' onblur="this.style.cssText = this.style.cssText;"';var P=G.lang.elementsPath.eleTitle.replace(/%1/,K);F.unshift('<a id="',w,N,'" href="javascript:void(\'',K,'\')" tabindex="-1" title="',P,'"'+(f.gecko&&f.version<10900?' onfocus="event.preventBubble();"':'')+' hidefocus="true" '+' onkeydown="return CKEDITOR.tools.callFunction(',z,',',N,', event );"'+O,' onclick="CKEDITOR.tools.callFunction('+y,',',N,'); return false;"',' role="button" aria-labelledby="'+w+N+'_label">',K,'<span id="',w,N,'_label" class="cke_label">'+P+'</span>','</a>');}if(K=='body')break;E=E.getParent();}var Q=v();Q.setHtml(F.join('')+r);G.fire('elementsPathUpdate',{space:Q});});function A(){u&&u.setHtml(r);delete s._.elementsPath.list;};s.on('readOnly',A);s.on('contentDomUnload',A);s.addCommand('elementsPathFocus',q.toolbarFocus);}});})();(function(){n.add('enterkey',{requires:['keystrokes','indent'],init:function(x){x.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(z){v(z);}});x.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(z){u(z);}});var y=x.keystrokeHandler.keystrokes;y[13]='enter';y[2228224+13]='shiftEnter';}});n.enterkey={enterBlock:function(x,y,z,A){z=z||w(x);if(!z)return;var B=z.document,C=z.checkStartOfBlock(),D=z.checkEndOfBlock(),E=new h.elementPath(z.startContainer),F=E.block;if(C&&D){if(F&&(F.is('li')||F.getParent().is('li'))){x.execCommand('outdent');return;}}else if(F&&F.is('pre')){if(!D){r(x,y,z,A);return;}}else if(F&&j.$captionBlock[F.getName()]){r(x,y,z,A);return;}var G=y==3?'div':'p',H=z.splitBlock(G);if(!H)return;var I=H.previousBlock,J=H.nextBlock,K=H.wasStartOfBlock,L=H.wasEndOfBlock,M;if(J){M=J.getParent();if(M.is('li')){J.breakParent(M);J.move(J.getNext(),1);}}else if(I&&(M=I.getParent())&&M.is('li')){I.breakParent(M);M=I.getNext();z.moveToElementEditStart(M);I.move(I.getPrevious());}if(!K&&!L){if(J.is('li')&&(M=J.getFirst(h.walker.invisible(true)))&&M.is&&M.is('ul','ol'))(g?B.createText('\xa0'):B.createElement('br')).insertBefore(M);if(J)z.moveToElementEditStart(J);}else{var N,O;if(I){if(I.is('li')||!(t.test(I.getName())||I.is('pre')))N=I.clone();}else if(J)N=J.clone();if(!N){if(M&&M.is('li'))N=M;else{N=B.createElement(G);if(I&&(O=I.getDirection()))N.setAttribute('dir',O);}}else if(A&&!N.is('li'))N.renameNode(G);var P=H.elementPath;if(P)for(var Q=0,R=P.elements.length;Q<R;Q++){var S=P.elements[Q];if(S.equals(P.block)||S.equals(P.blockLimit))break;if(j.$removeEmpty[S.getName()]){S=S.clone();N.moveChildren(S);N.append(S);}}if(!g)N.appendBogus();if(!N.getParent())z.insertNode(N);N.is('li')&&N.removeAttribute('value');if(g&&K&&(!L||!I.getChildCount())){z.moveToElementEditStart(L?I:N);z.select();}z.moveToElementEditStart(K&&!L?J:N);}if(!g)if(J){var T=B.createElement('span');T.setHtml('&nbsp;');z.insertNode(T);T.scrollIntoView();z.deleteContents();}else N.scrollIntoView();z.select();},enterBr:function(x,y,z,A){z=z||w(x);if(!z)return;var B=z.document,C=y==3?'div':'p',D=z.checkEndOfBlock(),E=new h.elementPath(x.getSelection().getStartElement()),F=E.block,G=F&&E.block.getName(),H=false;if(!A&&G=='li'){s(x,y,z,A);return;}if(!A&&D&&t.test(G)){var I,J;if(J=F.getDirection()){I=B.createElement('div');I.setAttribute('dir',J);I.insertAfter(F);z.setStart(I,0);}else{B.createElement('br').insertAfter(F);if(f.gecko)B.createText('').insertAfter(F);z.setStartAt(F.getNext(),g?3:1);}}else{var K;H=G=='pre';if(H&&!f.gecko)K=B.createText(g?'\r':'\n');else K=B.createElement('br');z.deleteContents();z.insertNode(K);if(g)z.setStartAt(K,4);else{B.createText('\ufeff').insertAfter(K);if(D)K.getParent().appendBogus();K.getNext().$.nodeValue='';z.setStartAt(K.getNext(),1);var L=null;if(!f.gecko){L=B.createElement('span');L.setHtml('&nbsp;');}else L=B.createElement('br');L.insertBefore(K.getNext());L.scrollIntoView();L.remove();}}z.collapse(true);z.select(H);}};var q=n.enterkey,r=q.enterBr,s=q.enterBlock,t=/^h[1-6]$/;function u(x){if(x.mode!='wysiwyg')return false;return v(x,x.config.shiftEnterMode,1);};function v(x,y,z){z=x.config.forceEnterMode||z;if(x.mode!='wysiwyg')return false;if(!y)y=x.config.enterMode;setTimeout(function(){x.fire('saveSnapshot');if(y==2)r(x,y,null,z);else s(x,y,null,z);},0);return true;};function w(x){var y=x.getSelection().getRanges(true);for(var z=y.length-1;z>0;z--)y[z].deleteContents();return y[0];};})();(function(){var q='nbsp,gt,lt,amp',r='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',s='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',t='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';function u(v,w){var x={},y=[],z={nbsp:'\xa0',shy:'­',gt:'>',lt:'<',amp:'&'};v=v.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(E,F){var G=w?'&'+F+';':z[F],H=w?z[F]:'&'+F+';';x[G]=H;y.push(G);return'';});if(!w&&v){v=v.split(',');var A=document.createElement('div'),B;A.innerHTML='&'+v.join(';&')+';';B=A.innerHTML;A=null;for(var C=0;C<B.length;C++){var D=B.charAt(C);x[D]='&'+v[C]+';';y.push(D);}}x.regex=y.join(w?'|':'');return x;};n.add('entities',{afterInit:function(v){var w=v.config,x=v.dataProcessor,y=x&&x.htmlFilter;if(y){var z='';if(w.basicEntities!==false)z+=q;if(w.entities){z+=','+r;if(w.entities_latin)z+=','+s;if(w.entities_greek)z+=','+t;if(w.entities_additional)z+=','+w.entities_additional;}var A=u(z),B=A.regex?'['+A.regex+']':'a^';delete A.regex;if(w.entities&&w.entities_processNumerical)B='[^ -~]|'+B;B=new RegExp(B,'g');function C(G){return w.entities_processNumerical=='force'||!A[G]?'&#'+G.charCodeAt(0)+';':A[G];};var D=u([q,'shy'].join(','),true),E=new RegExp(D.regex,'g');function F(G){return D[G];};y.addRules({text:function(G){return G.replace(E,F).replace(B,C);}});}}});})();m.basicEntities=true;m.entities=true;m.entities_latin=true;m.entities_greek=true;m.entities_additional='#39';(function(){function q(z,A){var B=[];if(!A)return z;else for(var C in A)B.push(C+'='+encodeURIComponent(A[C]));return z+(z.indexOf('?')!=-1?'&':'?')+B.join('&');};function r(z){z+='';var A=z.charAt(0).toUpperCase();return A+z.substr(1);};function s(z){var G=this;var A=G.getDialog(),B=A.getParentEditor();B._.filebrowserSe=G;var C=B.config['filebrowser'+r(A.getName())+'WindowWidth']||B.config.filebrowserWindowWidth||'80%',D=B.config['filebrowser'+r(A.getName())+'WindowHeight']||B.config.filebrowserWindowHeight||'70%',E=G.filebrowser.params||{};E.CKEditor=B.name;E.CKEditorFuncNum=B._.filebrowserFn;if(!E.langCode)E.langCode=B.langCode;var F=q(G.filebrowser.url,E);B.popup(F,C,D,B.config.fileBrowserWindowFeatures);};function t(z){var C=this;var A=C.getDialog(),B=A.getParentEditor();B._.filebrowserSe=C;if(!A.getContentElement(C['for'][0],C['for'][1]).getInputElement().$.value)return false;if(!A.getContentElement(C['for'][0],C['for'][1]).getAction())return false;return true;};function u(z,A,B){var C=B.params||{};C.CKEditor=z.name;C.CKEditorFuncNum=z._.filebrowserFn;if(!C.langCode)C.langCode=z.langCode;A.action=q(B.url,C);A.filebrowser=B;};function v(z,A,B,C){var D,E;for(var F in C){D=C[F];if(D.type=='hbox'||D.type=='vbox')v(z,A,B,D.children);if(!D.filebrowser)continue;if(typeof D.filebrowser=='string'){var G={action:D.type=='fileButton'?'QuickUpload':'Browse',target:D.filebrowser};D.filebrowser=G;}if(D.filebrowser.action=='Browse'){var H=D.filebrowser.url;if(H===undefined){H=z.config['filebrowser'+r(A)+'BrowseUrl'];if(H===undefined)H=z.config.filebrowserBrowseUrl;}if(H){D.onClick=s;D.filebrowser.url=H;D.hidden=false;}}else if(D.filebrowser.action=='QuickUpload'&&D['for']){H=D.filebrowser.url;if(H===undefined){H=z.config['filebrowser'+r(A)+'UploadUrl'];if(H===undefined)H=z.config.filebrowserUploadUrl;}if(H){var I=D.onClick;D.onClick=function(J){var K=J.sender;if(I&&I.call(K,J)===false)return false;return t.call(K,J);};D.filebrowser.url=H;D.hidden=false;u(z,B.getContents(D['for'][0]).get(D['for'][1]),D.filebrowser);}}}};function w(z,A){var B=A.getDialog(),C=A.filebrowser.target||null;z=z.replace(/#/g,'%23');if(C){var D=C.split(':'),E=B.getContentElement(D[0],D[1]);if(E){E.setValue(z);B.selectPage(D[0]);}}};function x(z,A,B){if(B.indexOf(';')!==-1){var C=B.split(';');for(var D=0;D<C.length;D++){if(x(z,A,C[D]))return true;}return false;}var E=z.getContents(A).get(B).filebrowser;return E&&E.url;};function y(z,A){var E=this;var B=E._.filebrowserSe.getDialog(),C=E._.filebrowserSe['for'],D=E._.filebrowserSe.filebrowser.onSelect;if(C)B.getContentElement(C[0],C[1]).reset();if(typeof A=='function'&&A.call(E._.filebrowserSe)===false)return;if(D&&D.call(E._.filebrowserSe,z,A)===false)return;if(typeof A=='string'&&A)alert(A);if(z)w(z,E._.filebrowserSe);};n.add('filebrowser',{init:function(z,A){z._.filebrowserFn=i.addFunction(y,z);z.on('destroy',function(){i.removeFunction(this._.filebrowserFn);});}});e.on('dialogDefinition',function(z){var A=z.data.definition,B;for(var C in A.contents){if(B=A.contents[C]){v(z.editor,z.data.name,A,B.elements);if(B.hidden&&B.filebrowser)B.hidden=!x(A,B.id,B.filebrowser);}}});})();n.add('find',{init:function(q){var r=n.find;q.ui.addButton('Find',{label:q.lang.findAndReplace.find,command:'find'});var s=q.addCommand('find',new e.dialogCommand('find'));s.canUndo=false;s.readOnly=1;q.ui.addButton('Replace',{label:q.lang.findAndReplace.replace,command:'replace'});var t=q.addCommand('replace',new e.dialogCommand('replace'));t.canUndo=false;e.dialog.add('find',this.path+'dialogs/find.js');e.dialog.add('replace',this.path+'dialogs/find.js');},requires:['styles']});m.find_highlight={element:'span',styles:{'background-color':'#004',color:'#fff'}};(function(){var q=/\.swf(?:$|\?)/i;function r(t){var u=t.attributes;return u.type=='application/x-shockwave-flash'||q.test(u.src||'');};function s(t,u){return t.createFakeParserElement(u,'cke_flash','flash',true);};n.add('flash',{init:function(t){t.addCommand('flash',new e.dialogCommand('flash'));t.ui.addButton('Flash',{label:t.lang.common.flash,command:'flash'});e.dialog.add('flash',this.path+'dialogs/flash.js');t.addCss('img.cke_flash{background-image: url('+e.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');if(t.addMenuItems)t.addMenuItems({flash:{label:t.lang.flash.properties,command:'flash',group:'flash'}});t.on('doubleclick',function(u){var v=u.data.element;if(v.is('img')&&v.data('cke-real-element-type')=='flash')u.data.dialog='flash';});if(t.contextMenu)t.contextMenu.addListener(function(u,v){if(u&&u.is('img')&&!u.isReadOnly()&&u.data('cke-real-element-type')=='flash')return{flash:2};});},afterInit:function(t){var u=t.dataProcessor,v=u&&u.dataFilter;if(v)v.addRules({elements:{'cke:object':function(w){var x=w.attributes,y=x.classid&&String(x.classid).toLowerCase();if(!y&&!r(w)){for(var z=0;z<w.children.length;z++){if(w.children[z].name=='cke:embed'){if(!r(w.children[z]))return null;return s(t,w);}}return null;}return s(t,w);},'cke:embed':function(w){if(!r(w))return null;return s(t,w);}}},5);},requires:['fakeobjects']});})();i.extend(m,{flashEmbedTagOnly:false,flashAddEmbedTag:true,flashConvertOnEdit:false});(function(){function q(r,s,t,u,v,w,x){var y=r.config,z=v.split(';'),A=[],B={};for(var C=0;C<z.length;C++){var D=z[C];if(D){D=D.split('/');var E={},F=z[C]=D[0];E[t]=A[C]=D[1]||F;B[F]=new e.style(x,E);B[F]._.definition.name=F;}else z.splice(C--,1);}r.ui.addRichCombo(s,{label:u.label,title:u.panelTitle,className:'cke_'+(t=='size'?'fontSize':'font'),panel:{css:r.skin.editor.css.concat(y.contentsCss),multiSelect:false,attributes:{'aria-label':u.panelTitle}},init:function(){this.startGroup(u.panelTitle);for(var G=0;G<z.length;G++){var H=z[G];this.add(H,B[H].buildPreview(),H);}},onClick:function(G){r.focus();r.fire('saveSnapshot');var H=B[G];if(this.getValue()==G)H.remove(r.document);else H.apply(r.document);r.fire('saveSnapshot');},onRender:function(){r.on('selectionChange',function(G){var H=this.getValue(),I=G.data.path,J=I.elements;for(var K=0,L;K<J.length;K++){L=J[K];for(var M in B){if(B[M].checkElementRemovable(L,true)){if(M!=H)this.setValue(M);return;}}}this.setValue('',w);},this);}});};n.add('font',{requires:['richcombo','styles'],init:function(r){var s=r.config;q(r,'Font','family',r.lang.font,s.font_names,s.font_defaultLabel,s.font_style);q(r,'FontSize','size',r.lang.fontSize,s.fontSize_sizes,s.fontSize_defaultLabel,s.fontSize_style);}});})();m.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';m.font_defaultLabel='';m.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};m.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';m.fontSize_defaultLabel='';m.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};n.add('format',{requires:['richcombo','styles'],init:function(q){var r=q.config,s=q.lang.format,t=r.format_tags.split(';'),u={};for(var v=0;v<t.length;v++){var w=t[v];u[w]=new e.style(r['format_'+w]);u[w]._.enterMode=q.config.enterMode;}q.ui.addRichCombo('Format',{label:s.label,title:s.panelTitle,className:'cke_format',panel:{css:q.skin.editor.css.concat(r.contentsCss),multiSelect:false,attributes:{'aria-label':s.panelTitle}},init:function(){this.startGroup(s.panelTitle);for(var x in u){var y=s['tag_'+x];this.add(x,u[x].buildPreview(y),y);}},onClick:function(x){q.focus();q.fire('saveSnapshot');var y=u[x],z=new h.elementPath(q.getSelection().getStartElement());y[y.checkActive(z)?'remove':'apply'](q.document);setTimeout(function(){q.fire('saveSnapshot');},0);},onRender:function(){q.on('selectionChange',function(x){var y=this.getValue(),z=x.data.path;for(var A in u){if(u[A].checkActive(z)){if(A!=y)this.setValue(A,q.lang.format['tag_'+A]);return;}}this.setValue('');},this);}});}});m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';m.format_p={element:'p'};m.format_div={element:'div'};m.format_pre={element:'pre'};m.format_address={element:'address'};m.format_h1={element:'h1'};m.format_h2={element:'h2'};m.format_h3={element:'h3'};m.format_h4={element:'h4'};m.format_h5={element:'h5'};m.format_h6={element:'h6'};n.add('forms',{init:function(q){var r=q.lang;q.addCss('form{border: 1px dotted #FF0000;padding: 2px;}\n');q.addCss('img.cke_hidden{background-image: url('+e.getUrl(this.path+'images/hiddenfield.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 16px !important;'+'height: 16px !important;'+'}');var s=function(u,v,w){q.addCommand(v,new e.dialogCommand(v));q.ui.addButton(u,{label:r.common[u.charAt(0).toLowerCase()+u.slice(1)],command:v});e.dialog.add(v,w);},t=this.path+'dialogs/';s('Form','form',t+'form.js');s('Checkbox','checkbox',t+'checkbox.js');s('Radio','radio',t+'radio.js');s('TextField','textfield',t+'textfield.js');s('Textarea','textarea',t+'textarea.js');s('Select','select',t+'select.js');s('Button','button',t+'button.js');s('ImageButton','imagebutton',n.getPath('image')+'dialogs/image.js');s('HiddenField','hiddenfield',t+'hiddenfield.js');if(q.addMenuItems)q.addMenuItems({form:{label:r.form.menu,command:'form',group:'form'},checkbox:{label:r.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:r.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:r.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:r.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:r.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:r.button.title,command:'button',group:'button'},select:{label:r.select.title,command:'select',group:'select'},textarea:{label:r.textarea.title,command:'textarea',group:'textarea'}});if(q.contextMenu){q.contextMenu.addListener(function(u){if(u&&u.hasAscendant('form',true)&&!u.isReadOnly())return{form:2};});q.contextMenu.addListener(function(u){if(u&&!u.isReadOnly()){var v=u.getName();if(v=='select')return{select:2};if(v=='textarea')return{textarea:2};if(v=='input')switch(u.getAttribute('type')){case'button':case'submit':case'reset':return{button:2};case'checkbox':return{checkbox:2};case'radio':return{radio:2};case'image':return{imagebutton:2};default:return{textfield:2};}if(v=='img'&&u.data('cke-real-element-type')=='hiddenfield')return{hiddenfield:2};}});}q.on('doubleclick',function(u){var v=u.data.element;if(v.is('form'))u.data.dialog='form';else if(v.is('select'))u.data.dialog='select';else if(v.is('textarea'))u.data.dialog='textarea';else if(v.is('img')&&v.data('cke-real-element-type')=='hiddenfield')u.data.dialog='hiddenfield';else if(v.is('input'))switch(v.getAttribute('type')){case'button':case'submit':case'reset':u.data.dialog='button';break;case'checkbox':u.data.dialog='checkbox';break;case'radio':u.data.dialog='radio';break;case'image':u.data.dialog='imagebutton';break;default:u.data.dialog='textfield';break;}});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.htmlFilter,t=r&&r.dataFilter;if(g)s&&s.addRules({elements:{input:function(u){var v=u.attributes,w=v.type;if(!w)v.type='text';if(w=='checkbox'||w=='radio')v.value=='on'&&delete v.value;}}});if(t)t.addRules({elements:{input:function(u){if(u.attributes.type=='hidden')return q.createFakeParserElement(u,'cke_hidden','hiddenfield');}}});},requires:['image','fakeobjects']});if(g)l.prototype.hasAttribute=i.override(l.prototype.hasAttribute,function(q){return function(r){var u=this;var s=u.$.attributes.getNamedItem(r);if(u.getName()=='input')switch(r){case'class':return u.$.className.length>0;case'checked':return!!u.$.checked;case'value':var t=u.getAttribute('type');return t=='checkbox'||t=='radio'?u.$.value!='on':u.$.value;}return q.apply(u,arguments);};});(function(){var q={canUndo:false,exec:function(s){var t=s.document.createElement('hr'),u=new h.range(s.document);s.insertElement(t);u.moveToPosition(t,4);var v=t.getNext();if(!v||v.type==1&&!v.isEditable())u.fixBlock(true,s.config.enterMode==3?'div':'p');u.select();}},r='horizontalrule';n.add(r,{init:function(s){s.addCommand(r,q);s.ui.addButton('HorizontalRule',{label:s.lang.horizontalrule,command:r});}});})();(function(){var q=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,r='{cke_protected}';function s(X){var Y=X.children.length,Z=X.children[Y-1];while(Z&&Z.type==3&&!i.trim(Z.value))Z=X.children[--Y];return Z;};function t(X,Y){var Z=X.children,aa=s(X);if(aa){if((Y||!g)&&aa.type==1&&aa.name=='br')Z.pop();if(aa.type==3&&q.test(aa.value))Z.pop();}};function u(X,Y,Z){if(!Y&&(!Z||typeof Z=='function'&&Z(X)===false))return false;if(Y&&g&&(document.documentMode>7||X.name in j.tr||X.name in j.$listItem))return false;var aa=s(X);return!aa||aa&&(aa.type==1&&aa.name=='br'||X.name=='form'&&aa.name=='input');};function v(X,Y){return function(Z){t(Z,!X);if(u(Z,!X,Y))if(X||g)Z.add(new e.htmlParser.text('\xa0'));else Z.add(new e.htmlParser.element('br',{}));};};var w=j,x=['caption','colgroup','col','thead','tfoot','tbody'],y=i.extend({},w.$block,w.$listItem,w.$tableContent);for(var z in y){if(!('br'in w[z]))delete y[z];}delete y.pre;var A={elements:{},attributeNames:[[/^on/,'data-cke-pa-on']]},B={elements:{}};for(z in y)B.elements[z]=v();var C={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(X){var Y=X.attributes;if(Y){if(Y['data-cke-temp'])return false;var Z=['name','href','src'],aa;for(var ab=0;ab<Z.length;ab++){aa='data-cke-saved-'+Z[ab];aa in Y&&delete Y[Z[ab]];}}return X;},table:function(X){var Y=X.children;Y.sort(function(Z,aa){return Z.type==1&&aa.type==Z.type?i.indexOf(x,Z.name)>i.indexOf(x,aa.name)?1:-1:0;});},embed:function(X){var Y=X.parent;if(Y&&Y.name=='object'){var Z=Y.attributes.width,aa=Y.attributes.height;Z&&(X.attributes.width=Z);aa&&(X.attributes.height=aa);}},param:function(X){X.children=[];X.isEmpty=true;return X;},a:function(X){if(!(X.children.length||X.attributes.name||X.attributes['data-cke-saved-name']))return false;},span:function(X){if(X.attributes['class']=='Apple-style-span')delete X.name;},pre:function(X){g&&t(X);},html:function(X){delete X.attributes.contenteditable;delete X.attributes['class'];},body:function(X){delete X.attributes.spellcheck;delete X.attributes.contenteditable;},style:function(X){var Y=X.children[0];Y&&Y.value&&(Y.value=i.trim(Y.value));if(!X.attributes.type)X.attributes.type='text/css';},title:function(X){var Y=X.children[0];Y&&(Y.value=X.attributes['data-cke-title']||'');}},attributes:{'class':function(X,Y){return i.ltrim(X.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(g)C.attributes.style=function(X,Y){return X.replace(/(^|;)([^\:]+)/g,function(Z){return Z.toLowerCase();});};function D(X){var Y=X.attributes;if(Y.contenteditable!='false')Y['data-cke-editable']=Y.contenteditable?'true':1;Y.contenteditable='false';};function E(X){var Y=X.attributes;switch(Y['data-cke-editable']){case'true':Y.contenteditable='true';break;case'1':delete Y.contenteditable;break;}};for(z in{input:1,textarea:1}){A.elements[z]=D;C.elements[z]=E;}var F=/<(a|area|img|input)\b([^>]*)>/gi,G=/\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,H=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,J=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,K=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function M(X){return X.replace(F,function(Y,Z,aa){return'<'+Z+aa.replace(G,function(ab,ac){if(aa.indexOf('data-cke-saved-'+ac)==-1)return' data-cke-saved-'+ab+' '+ab;return ab;})+'>';});};function N(X){return X.replace(H,function(Y){return'<cke:encoded>'+encodeURIComponent(Y)+'</cke:encoded>';});};function O(X){return X.replace(I,function(Y,Z){return decodeURIComponent(Z);});};function P(X){return X.replace(J,'$1cke:$2');};function Q(X){return X.replace(K,'$1$2');};function R(X){return X.replace(L,'<cke:$1$2></cke:$1>');};function S(X){return X.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,'$1$2$2');};function T(X){return X.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(Y){return'<!--'+r+'{C}'+encodeURIComponent(Y).replace(/--/g,'%2D%2D')+'-->';});};function U(X){return X.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(Y,Z){return decodeURIComponent(Z);});};function V(X,Y){var Z=Y._.dataStore;return X.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(aa,ab){return decodeURIComponent(ab);}).replace(/\{cke_protected_(\d+)\}/g,function(aa,ab){return Z&&Z[ab]||'';});};function W(X,Y){var Z=[],aa=Y.config.protectedSource,ab=Y._.dataStore||(Y._.dataStore={id:1}),ac=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,ad=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(aa);X=X.replace(/<!--[\s\S]*?-->/g,function(af){return'<!--{cke_tempcomment}'+(Z.push(af)-1)+'-->';});for(var ae=0;ae<ad.length;ae++)X=X.replace(ad[ae],function(af){af=af.replace(ac,function(ag,ah,ai){return Z[ai];});return/cke_temp(comment)?/.test(af)?af:'<!--{cke_temp}'+(Z.push(af)-1)+'-->';});X=X.replace(ac,function(af,ag,ah){return '<!--'+r+(ag?'{C}':'')+encodeURIComponent(Z[ah]).replace(/--/g,'%2D%2D')+'-->';});return X.replace(/(['"]).*?\1/g,function(af){return af.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(ag,ah){ab[ab.id]=decodeURIComponent(ah);return'{cke_protected_'+ab.id++ +'}';});});};n.add('htmldataprocessor',{requires:['htmlwriter'],init:function(X){var Y=X.dataProcessor=new e.htmlDataProcessor(X);Y.writer.forceSimpleAmpersand=X.config.forceSimpleAmpersand;Y.dataFilter.addRules(A);Y.dataFilter.addRules(B);Y.htmlFilter.addRules(C);var Z={elements:{}};for(z in y)Z.elements[z]=v(true,X.config.fillEmptyBlocks);Y.htmlFilter.addRules(Z);},onLoad:function(){!('fillEmptyBlocks'in m)&&(m.fillEmptyBlocks=1);}});e.htmlDataProcessor=function(X){var Y=this;Y.editor=X;Y.writer=new e.htmlWriter();Y.dataFilter=new e.htmlParser.filter();Y.htmlFilter=new e.htmlParser.filter();};e.htmlDataProcessor.prototype={toHtml:function(X,Y){X=W(X,this.editor);X=M(X);X=N(X);X=P(X);X=R(X);X=S(X);var Z=new l('div');Z.setHtml('a'+X);X=Z.getHtml().substr(1);X=Q(X);X=O(X);X=U(X);var aa=e.htmlParser.fragment.fromHtml(X,Y),ab=new e.htmlParser.basicWriter();aa.writeHtml(ab,this.dataFilter);X=ab.getHtml(true);X=T(X);return X;},toDataFormat:function(X,Y){var Z=this.writer,aa=e.htmlParser.fragment.fromHtml(X,Y);Z.reset();aa.writeHtml(Z,this.htmlFilter);var ab=Z.getHtml(true);ab=U(ab);ab=V(ab,this.editor);return ab;}};})();(function(){n.add('iframe',{requires:['dialog','fakeobjects'],init:function(q){var r='iframe',s=q.lang.iframe;e.dialog.add(r,this.path+'dialogs/iframe.js');q.addCommand(r,new e.dialogCommand(r));q.addCss('img.cke_iframe{background-image: url('+e.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');q.ui.addButton('Iframe',{label:s.toolbar,command:r});q.on('doubleclick',function(t){var u=t.data.element;if(u.is('img')&&u.data('cke-real-element-type')=='iframe')t.data.dialog='iframe';});if(q.addMenuItems)q.addMenuItems({iframe:{label:s.title,command:'iframe',group:'image'}});if(q.contextMenu)q.contextMenu.addListener(function(t,u){if(t&&t.is('img')&&t.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter;if(s)s.addRules({elements:{iframe:function(t){return q.createFakeParserElement(t,'cke_iframe','iframe',true);}}});}});})();n.add('image',{init:function(q){var r='image';e.dialog.add(r,this.path+'dialogs/image.js');q.addCommand(r,new e.dialogCommand(r));q.ui.addButton('Image',{label:q.lang.common.image,command:r});q.on('doubleclick',function(s){var t=s.data.element;if(t.is('img')&&!t.data('cke-realelement')&&!t.isReadOnly())s.data.dialog='image';});if(q.addMenuItems)q.addMenuItems({image:{label:q.lang.image.menu,command:'image',group:'image'}});if(q.contextMenu)q.contextMenu.addListener(function(s,t){if(!s||!s.is('img')||s.data('cke-realelement')||s.isReadOnly())return null;return{image:2};});}});m.image_removeLinkByEmptyURL=true;(function(){var q={ol:1,ul:1},r=h.walker.whitespaces(true),s=h.walker.bookmark(false,true);function t(x){var F=this;if(x.editor.readOnly)return null;var y=x.editor,z=x.data.path,A=z&&z.contains(q),B=z.block||z.blockLimit;if(A)return F.setState(2);if(!F.useIndentClasses&&F.name=='indent')return F.setState(2);if(!B)return F.setState(0);if(F.useIndentClasses){var C=B.$.className.match(F.classNameRegex),D=0;if(C){C=C[1];D=F.indentClassMap[C];}if(F.name=='outdent'&&!D||F.name=='indent'&&D==y.config.indentClasses.length)return F.setState(0);return F.setState(2);}else{var E=parseInt(B.getStyle(v(B)),10);if(isNaN(E))E=0;if(E<=0)return F.setState(0);return F.setState(2);}};function u(x,y){var A=this;A.name=y;A.useIndentClasses=x.config.indentClasses&&x.config.indentClasses.length>0;if(A.useIndentClasses){A.classNameRegex=new RegExp('(?:^|\\s+)('+x.config.indentClasses.join('|')+')(?=$|\\s)');A.indentClassMap={};for(var z=0;z<x.config.indentClasses.length;z++)A.indentClassMap[x.config.indentClasses[z]]=z+1;}A.startDisabled=y=='outdent';};function v(x,y){return(y||x.getComputedStyle('direction'))=='ltr'?'margin-left':'margin-right';};function w(x){return x.type=1&&x.is('li');};u.prototype={exec:function(x){var y=this,z={};function A(Q){var R=G.startContainer,S=G.endContainer;while(R&&!R.getParent().equals(Q))R=R.getParent();while(S&&!S.getParent().equals(Q))S=S.getParent();if(!R||!S)return;var T=R,U=[],V=false;while(!V){if(T.equals(S))V=true;U.push(T);T=T.getNext();}if(U.length<1)return;var W=Q.getParents(true);for(var X=0;X<W.length;X++){if(W[X].getName&&q[W[X].getName()]){Q=W[X];break;}}var Y=y.name=='indent'?1:-1,Z=U[0],aa=U[U.length-1],ab=n.list.listToArray(Q,z),ac=ab[aa.getCustomData('listarray_index')].indent;for(X=Z.getCustomData('listarray_index');X<=aa.getCustomData('listarray_index');X++){ab[X].indent+=Y;var ad=ab[X].parent;ab[X].parent=new l(ad.getName(),ad.getDocument());}for(X=aa.getCustomData('listarray_index')+1;X<ab.length&&ab[X].indent>ac;X++)ab[X].indent+=Y;var ae=n.list.arrayToList(ab,z,null,x.config.enterMode,Q.getDirection());if(y.name=='outdent'){var af;if((af=Q.getParent())&&af.is('li')){var ag=ae.listNode.getChildren(),ah=[],ai=ag.count(),aj;for(X=ai-1;X>=0;X--){if((aj=ag.getItem(X))&&aj.is&&aj.is('li'))ah.push(aj);}}}if(ae)ae.listNode.replace(Q);if(ah&&ah.length)for(X=0;X<ah.length;X++){var ak=ah[X],al=ak;while((al=al.getNext())&&al.is&&al.getName()in q){if(g&&!ak.getFirst(function(am){return r(am)&&s(am);}))ak.append(G.document.createText('\xa0'));ak.append(al);}ak.insertAfter(af);}};function B(){var Q=G.createIterator(),R=x.config.enterMode;Q.enforceRealBlocks=true;Q.enlargeBr=R!=2;var S;while(S=Q.getNextParagraph(R==1?'p':'div'))C(S);};function C(Q,R){if(Q.getCustomData('indent_processed'))return false;if(y.useIndentClasses){var S=Q.$.className.match(y.classNameRegex),T=0;if(S){S=S[1];T=y.indentClassMap[S];}if(y.name=='outdent')T--;else T++;if(T<0)return false;T=Math.min(T,x.config.indentClasses.length);T=Math.max(T,0);Q.$.className=i.ltrim(Q.$.className.replace(y.classNameRegex,''));if(T>0)Q.addClass(x.config.indentClasses[T-1]);}else{var U=v(Q,R),V=parseInt(Q.getStyle(U),10);if(isNaN(V))V=0;var W=x.config.indentOffset||40;V+=(y.name=='indent'?1:-1)*W;if(V<0)return false;V=Math.max(V,0);V=Math.ceil(V/W)*W;Q.setStyle(U,V?V+(x.config.indentUnit||'px'):'');if(Q.getAttribute('style')==='')Q.removeAttribute('style');}l.setMarker(z,Q,'indent_processed',1);return true;};var D=x.getSelection(),E=D.createBookmarks(1),F=D&&D.getRanges(1),G,H=F.createIterator();while(G=H.getNextRange()){var I=G.getCommonAncestor(),J=I;while(J&&!(J.type==1&&q[J.getName()]))J=J.getParent();if(!J){var K=G.getEnclosedNode();if(K&&K.type==1&&K.getName()in q){G.setStartAt(K,1);G.setEndAt(K,2);J=K;}}if(J&&G.startContainer.type==1&&G.startContainer.getName()in q){var L=new h.walker(G);L.evaluator=w;G.startContainer=L.next();}if(J&&G.endContainer.type==1&&G.endContainer.getName()in q){L=new h.walker(G);L.evaluator=w;G.endContainer=L.previous();}if(J){var M=J.getFirst(w),N=!!M.getNext(w),O=G.startContainer,P=M.equals(O)||M.contains(O);if(!(P&&(y.name=='indent'||y.useIndentClasses||parseInt(J.getStyle(v(J)),10))&&C(J,!N&&M.getDirection())))A(J);}else B();}l.clearAllMarkers(z);x.forceNextSelectionCheck();D.selectBookmarks(E);}};n.add('indent',{init:function(x){var y=x.addCommand('indent',new u(x,'indent')),z=x.addCommand('outdent',new u(x,'outdent'));x.ui.addButton('Indent',{label:x.lang.indent,command:'indent'});x.ui.addButton('Outdent',{label:x.lang.outdent,command:'outdent'});x.on('selectionChange',i.bind(t,y));x.on('selectionChange',i.bind(t,z));if(f.ie6Compat||f.ie7Compat)x.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');x.on('dirChanged',function(A){var B=new h.range(x.document);B.setStartBefore(A.data.node);B.setEndAfter(A.data.node);var C=new h.walker(B),D;while(D=C.next()){if(D.type==1){if(!D.equals(A.data.node)&&D.getDirection()){B.setStartAfter(D);C=new h.walker(B);continue;}var E=x.config.indentClasses;if(E){var F=A.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var G=0;G<E.length;G++){if(D.hasClass(E[G]+F[0])){D.removeClass(E[G]+F[0]);D.addClass(E[G]+F[1]);}}}var H=D.getStyle('margin-right'),I=D.getStyle('margin-left');H?D.setStyle('margin-left',H):D.removeStyle('margin-left');I?D.setStyle('margin-right',I):D.removeStyle('margin-right');}}});},requires:['domiterator','list']});})();(function(){function q(v,w){var x=w.block||w.blockLimit;if(!x||x.getName()=='body')return 2;return r(x,v.config.useComputedState)==this.value?1:2;};function r(v,w){w=w===undefined||w;var x;if(w)x=v.getComputedStyle('text-align');else{while(!v.hasAttribute||!(v.hasAttribute('align')||v.getStyle('text-align'))){var y=v.getParent();if(!y)break;v=y;}x=v.getStyle('text-align')||v.getAttribute('align')||'';}x&&(x=x.replace(/-moz-|-webkit-|start|auto/i,''));!x&&w&&(x=v.getComputedStyle('direction')=='rtl'?'right':'left');return x;};function s(v){if(v.editor.readOnly)return;var w=v.editor.getCommand(this.name);w.state=q.call(this,v.editor,v.data.path);w.fire('state');};function t(v,w,x){var z=this;z.name=w;z.value=x;var y=v.config.justifyClasses;if(y){switch(x){case'left':z.cssClassName=y[0];break;case'center':z.cssClassName=y[1];break;case'right':z.cssClassName=y[2];break;case'justify':z.cssClassName=y[3];break;}z.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+y.join('|')+')(?=$|\\s)');}};function u(v){var w=v.editor,x=new h.range(w.document);x.setStartBefore(v.data.node);x.setEndAfter(v.data.node);var y=new h.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(v.data.node)&&z.getDirection()){x.setStartAfter(z);y=new h.walker(x);continue;}var A=w.config.justifyClasses;if(A)if(z.hasClass(A[0])){z.removeClass(A[0]);z.addClass(A[2]);}else if(z.hasClass(A[2])){z.removeClass(A[2]);z.addClass(A[0]);}var B='text-align',C=z.getStyle(B);if(C=='left')z.setStyle(B,'right');else if(C=='right')z.setStyle(B,'left');}}};t.prototype={exec:function(v){var H=this;var w=v.getSelection(),x=v.config.enterMode;if(!w)return;var y=w.createBookmarks(),z=w.getRanges(true),A=H.cssClassName,B,C,D=v.config.useComputedState;D=D===undefined||D;for(var E=z.length-1;E>=0;E--){B=z[E].createIterator();B.enlargeBr=x!=2;while(C=B.getNextParagraph(x==1?'p':'div')){C.removeAttribute('align');C.removeStyle('text-align');var F=A&&(C.$.className=i.ltrim(C.$.className.replace(H.cssClassRegex,''))),G=H.state==2&&(!D||r(C,true)!=H.value);if(A){if(G)C.addClass(A);else if(!F)C.removeAttribute('class');}else if(G)C.setStyle('text-align',H.value);}}v.focus();v.forceNextSelectionCheck();w.selectBookmarks(y);}};n.add('justify',{init:function(v){var w=new t(v,'justifyleft','left'),x=new t(v,'justifycenter','center'),y=new t(v,'justifyright','right'),z=new t(v,'justifyblock','justify');v.addCommand('justifyleft',w);v.addCommand('justifycenter',x);v.addCommand('justifyright',y);v.addCommand('justifyblock',z);v.ui.addButton('JustifyLeft',{label:v.lang.justify.left,command:'justifyleft'});v.ui.addButton('JustifyCenter',{label:v.lang.justify.center,command:'justifycenter'});v.ui.addButton('JustifyRight',{label:v.lang.justify.right,command:'justifyright'});v.ui.addButton('JustifyBlock',{label:v.lang.justify.block,command:'justifyblock'});v.on('selectionChange',i.bind(s,w));v.on('selectionChange',i.bind(s,y));v.on('selectionChange',i.bind(s,x));v.on('selectionChange',i.bind(s,z));v.on('dirChanged',u);},requires:['domiterator']});})();n.add('keystrokes',{beforeInit:function(q){q.keystrokeHandler=new e.keystrokeHandler(q);q.specialKeys={};},init:function(q){var r=q.config.keystrokes,s=q.config.blockedKeystrokes,t=q.keystrokeHandler.keystrokes,u=q.keystrokeHandler.blockedKeystrokes;for(var v=0;v<r.length;v++)t[r[v][0]]=r[v][1];for(v=0;v<s.length;v++)u[s[v]]=1;}});e.keystrokeHandler=function(q){var r=this;if(q.keystrokeHandler)return q.keystrokeHandler;r.keystrokes={};r.blockedKeystrokes={};r._={editor:q};return r;};(function(){var q,r=function(t){t=t.data;var u=t.getKeystroke(),v=this.keystrokes[u],w=this._.editor;q=w.fire('key',{keyCode:u})===true;if(!q){if(v){var x={from:'keystrokeHandler'};q=w.execCommand(v,x)!==false;}if(!q){var y=w.specialKeys[u];q=y&&y(w)===true;if(!q)q=!!this.blockedKeystrokes[u];}}if(q)t.preventDefault(true);return!q;},s=function(t){if(q){q=false;t.data.preventDefault(true);}};e.keystrokeHandler.prototype={attach:function(t){t.on('keydown',r,this);if(f.opera||f.gecko&&f.mac)t.on('keypress',s,this);}};})();m.blockedKeystrokes=[1114112+66,1114112+73,1114112+85];m.keystrokes=[[4456448+121,'toolbarFocus'],[4456448+122,'elementsPathFocus'],[2228224+121,'contextMenu'],[1114112+2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'link'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline'],[4456448+(g||f.webkit?189:109),'toolbarCollapse'],[4456448+48,'a11yHelp']];n.add('link',{init:function(q){q.addCommand('link',new e.dialogCommand('link'));q.addCommand('anchor',new e.dialogCommand('anchor'));q.addCommand('unlink',new e.unlinkCommand());q.addCommand('removeAnchor',new e.removeAnchorCommand());q.ui.addButton('Link',{label:q.lang.link.toolbar,command:'link'});q.ui.addButton('Unlink',{label:q.lang.unlink,command:'unlink'});q.ui.addButton('Anchor',{label:q.lang.anchor.toolbar,command:'anchor'});e.dialog.add('link',this.path+'dialogs/link.js');e.dialog.add('anchor',this.path+'dialogs/anchor.js');var r=q.lang.dir=='rtl'?'right':'left',s='background:url('+e.getUrl(this.path+'images/anchor.gif')+') no-repeat '+r+' center;'+'border:1px dotted #00f;';q.addCss('a.cke_anchor,a.cke_anchor_empty'+(g&&f.version<7?'':',a[name],a[data-cke-saved-name]')+'{'+s+'padding-'+r+':18px;'+'cursor:auto;'+'}'+(g?'a.cke_anchor_empty{display:inline-block;}':'')+'img.cke_anchor'+'{'+s+'width:16px;'+'min-height:15px;'+'height:1.15em;'+'vertical-align:'+(f.opera?'middle':'text-bottom')+';'+'}');q.on('selectionChange',function(t){if(q.readOnly)return;var u=q.getCommand('unlink'),v=t.data.path.lastElement&&t.data.path.lastElement.getAscendant('a',true);if(v&&v.getName()=='a'&&v.getAttribute('href')&&v.getChildCount())u.setState(2);else u.setState(0);});q.on('doubleclick',function(t){var u=n.link.getSelectedLink(q)||t.data.element;if(!u.isReadOnly())if(u.is('a')){t.data.dialog=u.getAttribute('name')&&(!u.getAttribute('href')||!u.getChildCount())?'anchor':'link';q.getSelection().selectElement(u);}else if(n.link.tryRestoreFakeAnchor(q,u))t.data.dialog='anchor';});if(q.addMenuItems)q.addMenuItems({anchor:{label:q.lang.anchor.menu,command:'anchor',group:'anchor',order:1},removeAnchor:{label:q.lang.anchor.remove,command:'removeAnchor',group:'anchor',order:5},link:{label:q.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:q.lang.unlink,command:'unlink',group:'link',order:5}});if(q.contextMenu)q.contextMenu.addListener(function(t,u){if(!t||t.isReadOnly())return null;var v=n.link.tryRestoreFakeAnchor(q,t);if(!v&&!(v=n.link.getSelectedLink(q)))return null;var w={};if(v.getAttribute('href')&&v.getChildCount())w={link:2,unlink:2};if(v&&v.hasAttribute('name'))w.anchor=w.removeAnchor=2;return w;});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter,t=r&&r.htmlFilter,u=q._.elementsPath&&q._.elementsPath.filters;if(s)s.addRules({elements:{a:function(v){var w=v.attributes;if(!w.name)return null;var x=!v.children.length;if(n.link.synAnchorSelector){var y=x?'cke_anchor_empty':'cke_anchor',z=w['class'];if(w.name&&(!z||z.indexOf(y)<0))w['class']=(z||'')+' '+y;if(x&&n.link.emptyAnchorFix){w.contenteditable='false';w['data-cke-editable']=1;}}else if(n.link.fakeAnchor&&x)return q.createFakeParserElement(v,'cke_anchor','anchor');return null;}}});if(n.link.emptyAnchorFix&&t)t.addRules({elements:{a:function(v){delete v.attributes.contenteditable;}}});if(u)u.push(function(v,w){if(w=='a')if(n.link.tryRestoreFakeAnchor(q,v)||v.getAttribute('name')&&(!v.getAttribute('href')||!v.getChildCount()))return'anchor';});},requires:['fakeobjects']});n.link={getSelectedLink:function(q){try{var r=q.getSelection();if(r.getType()==3){var s=r.getSelectedElement();if(s.is('a'))return s;}var t=r.getRanges(true)[0];t.shrink(2);var u=t.getCommonAncestor();return u.getAscendant('a',true);}catch(v){return null;}},fakeAnchor:f.opera||f.webkit,synAnchorSelector:g,emptyAnchorFix:g&&f.version<8,tryRestoreFakeAnchor:function(q,r){if(r&&r.data('cke-real-element-type')&&r.data('cke-real-element-type')=='anchor'){var s=q.restoreRealElement(r);if(s.data('cke-saved-name'))return s;}}};e.unlinkCommand=function(){};e.unlinkCommand.prototype={exec:function(q){var r=q.getSelection(),s=r.createBookmarks(),t=r.getRanges(),u,v;for(var w=0;w<t.length;w++){u=t[w].getCommonAncestor(true);v=u.getAscendant('a',true);if(!v)continue;t[w].selectNodeContents(v);}r.selectRanges(t);q.document.$.execCommand('unlink',false,null);r.selectBookmarks(s);},startDisabled:true};e.removeAnchorCommand=function(){};e.removeAnchorCommand.prototype={exec:function(q){var r=q.getSelection(),s=r.createBookmarks(),t;if(r&&(t=r.getSelectedElement())&&(n.link.fakeAnchor&&!t.getChildCount()?n.link.tryRestoreFakeAnchor(q,t):t.is('a')))t.remove(1);else if(t=n.link.getSelectedLink(q))if(t.hasAttribute('href')){t.removeAttributes({name:1,'data-cke-saved-name':1});t.removeClass('cke_anchor');}else t.remove(1);r.selectBookmarks(s);}};i.extend(m,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var q={ol:1,ul:1},r=/^[\n\r\t ]*$/,s=h.walker.whitespaces(),t=h.walker.bookmark(),u=function(I){return!(s(I)||t(I));};n.list={listToArray:function(I,J,K,L,M){if(!q[I.getName()])return[];if(!L)L=0;if(!K)K=[];for(var N=0,O=I.getChildCount();N<O;N++){var P=I.getChild(N);if(P.type==1&&P.getName()in j.$list)n.list.listToArray(P,J,K,L+1);if(P.$.nodeName.toLowerCase()!='li')continue;var Q={parent:I,indent:L,element:P,contents:[]};if(!M){Q.grandparent=I.getParent();if(Q.grandparent&&Q.grandparent.$.nodeName.toLowerCase()=='li')Q.grandparent=Q.grandparent.getParent();}else Q.grandparent=M;if(J)l.setMarker(J,P,'listarray_index',K.length);K.push(Q);for(var R=0,S=P.getChildCount(),T;R<S;R++){T=P.getChild(R);if(T.type==1&&q[T.getName()])n.list.listToArray(T,J,K,L+1,Q.grandparent);else Q.contents.push(T);}}return K;},arrayToList:function(I,J,K,L,M){if(!K)K=0;if(!I||I.length<K+1)return null;var N=I[K].parent.getDocument(),O=new h.documentFragment(N),P=null,Q=K,R=Math.max(I[K].indent,0),S=null,T,U=L==1?'p':'div';while(1){var V=I[Q];T=V.element.getDirection(1);if(V.indent==R){if(!P||I[Q].parent.getName()!=P.getName()){P=I[Q].parent.clone(false,1);M&&P.setAttribute('dir',M);O.append(P);}S=P.append(V.element.clone(0,1));if(T!=P.getDirection(1))S.setAttribute('dir',T);else S.removeAttribute('dir');for(var W=0;W<V.contents.length;W++)S.append(V.contents[W].clone(1,1));Q++;}else if(V.indent==Math.max(R,0)+1){var X=I[Q-1].element.getDirection(1),Y=n.list.arrayToList(I,null,Q,L,X!=T?T:null);if(!S.getChildCount()&&g&&!(N.$.documentMode>7))S.append(N.createText('\xa0'));S.append(Y.listNode);Q=Y.nextIndex;}else if(V.indent==-1&&!K&&V.grandparent){if(q[V.grandparent.getName()])S=V.element.clone(false,true);else if(M||V.element.hasAttributes()||L!=2){S=N.createElement(U);V.element.copyAttributes(S,{type:1,value:1});if(!M&&L==2&&!S.hasAttributes())S=new h.documentFragment(N);}else S=new h.documentFragment(N);if(S.type==1)if(V.grandparent.getDirection(1)!=T)S.setAttribute('dir',T);else S.removeAttribute('dir');for(W=0;W<V.contents.length;W++)S.append(V.contents[W].clone(1,1));if(S.type==11&&Q!=I.length-1){var Z=S.getLast();if(Z&&Z.type==1&&Z.getAttribute('type')=='_moz')Z.remove();if(!(Z=S.getLast(u)&&Z.type==1&&Z.getName()in j.$block))S.append(N.createElement('br'));}if(S.type==1&&S.getName()==U&&S.$.firstChild){S.trim();var aa=S.getFirst();if(aa.type==1&&aa.isBlockBoundary()){var ab=new h.documentFragment(N);S.moveChildren(ab);S=ab;}}var ac=S.$.nodeName.toLowerCase();if(!g&&(ac=='div'||ac=='p'))S.appendBogus();O.append(S);P=null;Q++;}else return null;if(I.length<=Q||Math.max(I[Q].indent,0)<R)break;}if(J){var ad=O.getFirst();while(ad){if(ad.type==1)l.clearMarkers(J,ad);ad=ad.getNextSourceNode();}}return{listNode:O,nextIndex:Q};}};function v(I){if(I.editor.readOnly)return null;var J=I.data.path,K=J.blockLimit,L=J.elements,M,N;for(N=0;N<L.length&&(M=L[N])&&!M.equals(K);N++){if(q[L[N].getName()])return this.setState(this.type==L[N].getName()?1:2);}return this.setState(2);};function w(I,J,K,L){var M=n.list.listToArray(J.root,K),N=[];for(var O=0;O<J.contents.length;O++){var P=J.contents[O];P=P.getAscendant('li',true);if(!P||P.getCustomData('list_item_processed'))continue;N.push(P);l.setMarker(K,P,'list_item_processed',true);}var Q=J.root,R=Q.getDocument().createElement(this.type);Q.copyAttributes(R,{start:1,type:1});R.removeStyle('list-style-type');for(O=0;O<N.length;O++){var S=N[O].getCustomData('listarray_index');M[S].parent=R;}var T=n.list.arrayToList(M,K,null,I.config.enterMode),U,V=T.listNode.getChildCount();for(O=0;O<V&&(U=T.listNode.getChild(O));O++){if(U.getName()==this.type)L.push(U);}T.listNode.replace(J.root);};var x=/^h[1-6]$/;function y(I,J,K){var L=J.contents,M=J.root.getDocument(),N=[];if(L.length==1&&L[0].equals(J.root)){var O=M.createElement('div');L[0].moveChildren&&L[0].moveChildren(O);L[0].append(O);L[0]=O;}var P=J.contents[0].getParent();for(var Q=0;Q<L.length;Q++)P=P.getCommonAncestor(L[Q].getParent());var R=I.config.useComputedState,S,T;R=R===undefined||R;for(Q=0;Q<L.length;Q++){var U=L[Q],V;while(V=U.getParent()){if(V.equals(P)){N.push(U);if(!T&&U.getDirection())T=1;var W=U.getDirection(R);if(S!==null)if(S&&S!=W)S=null;else S=W;break;}U=V;}}if(N.length<1)return;var X=N[N.length-1].getNext(),Y=M.createElement(this.type);K.push(Y);var Z,aa;while(N.length){Z=N.shift();aa=M.createElement('li');if(Z.is('pre')||x.test(Z.getName()))Z.appendTo(aa);else{Z.copyAttributes(aa);if(S&&Z.getDirection()){aa.removeStyle('direction');aa.removeAttribute('dir');}Z.moveChildren(aa);Z.remove();}aa.appendTo(Y);}if(S&&T)Y.setAttribute('dir',S);if(X)Y.insertBefore(X);else Y.appendTo(P);};function z(I,J,K){var L=n.list.listToArray(J.root,K),M=[];for(var N=0;N<J.contents.length;N++){var O=J.contents[N];O=O.getAscendant('li',true);if(!O||O.getCustomData('list_item_processed'))continue;M.push(O);l.setMarker(K,O,'list_item_processed',true);}var P=null;for(N=0;N<M.length;N++){var Q=M[N].getCustomData('listarray_index');L[Q].indent=-1;P=Q;}for(N=P+1;N<L.length;N++){if(L[N].indent>L[N-1].indent+1){var R=L[N-1].indent+1-L[N].indent,S=L[N].indent;while(L[N]&&L[N].indent>=S){L[N].indent+=R;N++;}N--;}}var T=n.list.arrayToList(L,K,null,I.config.enterMode,J.root.getAttribute('dir')),U=T.listNode,V,W;function X(Y){if((V=U[Y?'getFirst':'getLast']())&&!(V.is&&V.isBlockBoundary())&&(W=J.root[Y?'getPrevious':'getNext'](h.walker.whitespaces(true)))&&!(W.is&&W.isBlockBoundary({br:1})))I.document.createElement('br')[Y?'insertBefore':'insertAfter'](V);};X(true);X();U.replace(J.root);};function A(I,J){this.name=I;this.type=J;};A.prototype={exec:function(I){var J=I.document,K=I.config,L=I.getSelection(),M=L&&L.getRanges(true);if(!M||M.length<1)return;if(this.state==2){var N=J.getBody();if(!N.getFirst(u)){K.enterMode==2?N.appendBogus():M[0].fixBlock(1,K.enterMode==1?'p':'div');L.selectRanges(M);}else{var O=M.length==1&&M[0],P=O&&O.getEnclosedNode();if(P&&P.is&&this.type==P.getName())this.setState(1);}}var Q=L.createBookmarks(true),R=[],S={},T=M.createIterator(),U=0;while((O=T.getNextRange())&&++U){var V=O.getBoundaryNodes(),W=V.startNode,X=V.endNode;if(W.type==1&&W.getName()=='td')O.setStartAt(V.startNode,1);if(X.type==1&&X.getName()=='td')O.setEndAt(V.endNode,2);var Y=O.createIterator(),Z;Y.forceBrBreak=this.state==2;while(Z=Y.getNextParagraph()){if(Z.getCustomData('list_block'))continue;else l.setMarker(S,Z,'list_block',1);var aa=new h.elementPath(Z),ab=aa.elements,ac=ab.length,ad=null,ae=0,af=aa.blockLimit,ag;for(var ah=ac-1;ah>=0&&(ag=ab[ah]);ah--){if(q[ag.getName()]&&af.contains(ag)){af.removeCustomData('list_group_object_'+U);var ai=ag.getCustomData('list_group_object');if(ai)ai.contents.push(Z);else{ai={root:ag,contents:[Z]};R.push(ai);l.setMarker(S,ag,'list_group_object',ai);}ae=1;break;}}if(ae)continue;var aj=af;if(aj.getCustomData('list_group_object_'+U))aj.getCustomData('list_group_object_'+U).contents.push(Z);else{ai={root:aj,contents:[Z]};l.setMarker(S,aj,'list_group_object_'+U,ai);R.push(ai);}}}var ak=[];while(R.length>0){ai=R.shift();if(this.state==2){if(q[ai.root.getName()])w.call(this,I,ai,S,ak);else y.call(this,I,ai,ak);}else if(this.state==1&&q[ai.root.getName()])z.call(this,I,ai,S);}for(ah=0;ah<ak.length;ah++){ad=ak[ah];var al,am=this;(al=function(an){var ao=ad[an?'getPrevious':'getNext'](h.walker.whitespaces(true));if(ao&&ao.getName&&ao.getName()==am.type){ao.remove();ao.moveChildren(ad,an);}})();al(1);}l.clearAllMarkers(S);L.selectBookmarks(Q);I.focus();}};var B=j,C=/[\t\r\n ]*(?:&nbsp;|\xa0)$/;function D(I,J){var K,L=I.children,M=L.length;for(var N=0;N<M;N++){K=L[N];if(K.name&&K.name in J)return N;}return M;};function E(I){return function(J){var K=J.children,L=D(J,B.$list),M=K[L],N=M&&M.previous,O;if(N&&(N.name&&N.name=='br'||N.value&&(O=N.value.match(C)))){var P=N;if(!(O&&O.index)&&P==K[0])K[0]=I||g?new e.htmlParser.text('\xa0'):new e.htmlParser.element('br',{});else if(P.name=='br')K.splice(L-1,1);else P.value=P.value.replace(C,'');}};};var F={elements:{}};for(var G in B.$listItem)F.elements[G]=E();var H={elements:{}};for(G in B.$listItem)H.elements[G]=E(true);n.add('list',{init:function(I){var J=I.addCommand('numberedlist',new A('numberedlist','ol')),K=I.addCommand('bulletedlist',new A('bulletedlist','ul'));I.ui.addButton('NumberedList',{label:I.lang.numberedlist,command:'numberedlist'});I.ui.addButton('BulletedList',{label:I.lang.bulletedlist,command:'bulletedlist'});I.on('selectionChange',i.bind(v,J));I.on('selectionChange',i.bind(v,K));},afterInit:function(I){var J=I.dataProcessor;if(J){J.dataFilter.addRules(F);J.htmlFilter.addRules(H);}},requires:['domiterator']});})();(function(){n.liststyle={requires:['dialog'],init:function(q){q.addCommand('numberedListStyle',new e.dialogCommand('numberedListStyle'));e.dialog.add('numberedListStyle',this.path+'dialogs/liststyle.js');q.addCommand('bulletedListStyle',new e.dialogCommand('bulletedListStyle'));e.dialog.add('bulletedListStyle',this.path+'dialogs/liststyle.js');if(q.addMenuItems){q.addMenuGroup('list',108);q.addMenuItems({numberedlist:{label:q.lang.list.numberedTitle,group:'list',command:'numberedListStyle'},bulletedlist:{label:q.lang.list.bulletedTitle,group:'list',command:'bulletedListStyle'}});}if(q.contextMenu)q.contextMenu.addListener(function(r,s){if(!r||r.isReadOnly())return null;while(r){var t=r.getName();if(t=='ol')return{numberedlist:2};else if(t=='ul')return{bulletedlist:2};r=r.getParent();}return null;});}};n.add('liststyle',n.liststyle);})();(function(){function q(w){if(!w||w.type!=1||w.getName()!='form')return[];var x=[],y=['style','className'];for(var z=0;z<y.length;z++){var A=y[z],B=w.$.elements.namedItem(A);if(B){var C=new l(B);x.push([C,C.nextSibling]);C.remove();}}return x;};function r(w,x){if(!w||w.type!=1||w.getName()!='form')return;if(x.length>0)for(var y=x.length-1;y>=0;y--){var z=x[y][0],A=x[y][1];if(A)z.insertBefore(A);else z.appendTo(w);}};function s(w,x){var y=q(w),z={},A=w.$;if(!x){z['class']=A.className||'';A.className='';}z.inline=A.style.cssText||'';if(!x)A.style.cssText='position: static; overflow: visible';r(y);return z;};function t(w,x){var y=q(w),z=w.$;if('class'in x)z.className=x['class'];if('inline'in x)z.style.cssText=x.inline;r(y);};function u(w){var x=e.instances;for(var y in x){var z=x[y];if(z.mode=='wysiwyg'&&!z.readOnly){var A=z.document.getBody();A.setAttribute('contentEditable',false);A.setAttribute('contentEditable',true);}}if(w.focusManager.hasFocus){w.toolbox.focus();w.focus();}};function v(w){if(!g||f.version>6)return null;var x=l.createFromHtml('<iframe frameborder="0" tabindex="-1" src="javascript:void((function(){document.open();'+(f.isCustomDomain()?"document.domain='"+this.getDocument().$.domain+"';":'')+'document.close();'+'})())"'+' style="display:block;position:absolute;z-index:-1;'+'progid:DXImageTransform.Microsoft.Alpha(opacity=0);'+'"></iframe>');return w.append(x,true);};n.add('maximize',{init:function(w){var x=w.lang,y=e.document,z=y.getWindow(),A,B,C,D;function E(){var G=z.getViewPaneSize();D&&D.setStyles({width:G.width+'px',height:G.height+'px'});w.resize(G.width,G.height,null,true);};var F=2;w.addCommand('maximize',{modes:{wysiwyg:1,source:1},readOnly:1,editorFocus:false,exec:function(){var G=w.container.getChild(1),H=w.getThemeSpace('contents');if(w.mode=='wysiwyg'){var I=w.getSelection();A=I&&I.getRanges();B=z.getScrollPosition();}else{var J=w.textarea.$;A=!g&&[J.selectionStart,J.selectionEnd];B=[J.scrollLeft,J.scrollTop];}if(this.state==2){z.on('resize',E);C=z.getScrollPosition();var K=w.container;while(K=K.getParent()){K.setCustomData('maximize_saved_styles',s(K));K.setStyle('z-index',w.config.baseFloatZIndex-1);}H.setCustomData('maximize_saved_styles',s(H,true));G.setCustomData('maximize_saved_styles',s(G,true));var L={overflow:f.webkit?'':'hidden',width:0,height:0};y.getDocumentElement().setStyles(L);!f.gecko&&y.getDocumentElement().setStyle('position','fixed');!(f.gecko&&f.quirks)&&y.getBody().setStyles(L);g?setTimeout(function(){z.$.scrollTo(0,0);},0):z.$.scrollTo(0,0);G.setStyle('position',f.gecko&&f.quirks?'fixed':'absolute');G.$.offsetLeft;G.setStyles({'z-index':w.config.baseFloatZIndex-1,left:'0px',top:'0px'});D=v(G);G.addClass('cke_maximized');E();var M=G.getDocumentPosition();G.setStyles({left:-1*M.x+'px',top:-1*M.y+'px'});f.gecko&&u(w);}else if(this.state==1){z.removeListener('resize',E);var N=[H,G];for(var O=0;O<N.length;O++){t(N[O],N[O].getCustomData('maximize_saved_styles'));N[O].removeCustomData('maximize_saved_styles');}K=w.container;while(K=K.getParent()){t(K,K.getCustomData('maximize_saved_styles'));K.removeCustomData('maximize_saved_styles');}g?setTimeout(function(){z.$.scrollTo(C.x,C.y);},0):z.$.scrollTo(C.x,C.y);G.removeClass('cke_maximized');if(f.webkit){G.setStyle('display','inline');setTimeout(function(){G.setStyle('display','block');},0);}if(D){D.remove();D=null;}w.fire('resize');}this.toggleState();var P=this.uiItems[0];if(P){var Q=this.state==2?x.maximize:x.minimize,R=w.element.getDocument().getById(P._.id);R.getChild(1).setHtml(Q);R.setAttribute('title',Q);R.setAttribute('href','javascript:void("'+Q+'");');}if(w.mode=='wysiwyg'){if(A){f.gecko&&u(w);w.getSelection().selectRanges(A);var S=w.getSelection().getStartElement();S&&S.scrollIntoView(true);}else z.$.scrollTo(B.x,B.y);}else{if(A){J.selectionStart=A[0];J.selectionEnd=A[1];}J.scrollLeft=B[0];J.scrollTop=B[1];}A=B=null;F=this.state;},canUndo:false});w.ui.addButton('Maximize',{label:x.maximize,command:'maximize'});w.on('mode',function(){var G=w.getCommand('maximize');G.setState(G.state==0?0:F);},null,null,100);}});})();n.add('newpage',{init:function(q){q.addCommand('newpage',{modes:{wysiwyg:1,source:1},exec:function(r){var s=this;r.setData(r.config.newpage_html||'',function(){setTimeout(function(){r.fire('afterCommandExec',{name:s.name,command:s});r.selectionChange();},200);});r.focus();},async:true});q.ui.addButton('NewPage',{label:q.lang.newPage,command:'newpage'});}});n.add('pagebreak',{init:function(q){q.addCommand('pagebreak',n.pagebreakCmd);q.ui.addButton('PageBreak',{label:q.lang.pagebreak,command:'pagebreak'});var r=['{','background: url('+e.getUrl(this.path+'images/pagebreak.gif')+') no-repeat center center;','clear: both;','width:100%; _width:99.9%;','border-top: #999999 1px dotted;','border-bottom: #999999 1px dotted;','padding:0;','height: 5px;','cursor: default;','}'].join('').replace(/;/g,' !important;');q.addCss('div.cke_pagebreak'+r);f.opera&&q.on('contentDom',function(){q.document.on('click',function(s){var t=s.data.getTarget();if(t.is('div')&&t.hasClass('cke_pagebreak'))q.getSelection().selectElement(t);});});},afterInit:function(q){var r=q.lang.pagebreakAlt,s=q.dataProcessor,t=s&&s.dataFilter,u=s&&s.htmlFilter;if(u)u.addRules({attributes:{'class':function(v,w){var x=v.replace('cke_pagebreak','');if(x!=v){var y=e.htmlParser.fragment.fromHtml('<span style="display: none;">&nbsp;</span>');w.children.length=0;w.add(y);var z=w.attributes;delete z['aria-label'];delete z.contenteditable;delete z.title;}return x;}}},5);if(t)t.addRules({elements:{div:function(v){var w=v.attributes,x=w&&w.style,y=x&&v.children.length==1&&v.children[0],z=y&&y.name=='span'&&y.attributes.style;if(z&&/page-break-after\s*:\s*always/i.test(x)&&/display\s*:\s*none/i.test(z)){w.contenteditable='false';w['class']='cke_pagebreak';w['data-cke-display-name']='pagebreak';w['aria-label']=r;w.title=r;v.children.length=0;}}}});},requires:['fakeobjects']});n.pagebreakCmd={exec:function(q){var r=q.lang.pagebreakAlt,s=l.createFromHtml('<div style="page-break-after: always;"contenteditable="false" title="'+r+'" '+'aria-label="'+r+'" '+'data-cke-display-name="pagebreak" '+'class="cke_pagebreak">'+'</div>',q.document),t=q.getSelection().getRanges(true);q.fire('saveSnapshot');for(var u,v=t.length-1;v>=0;v--){u=t[v];if(v<t.length-1)s=s.clone(true);u.splitBlock('p');u.insertNode(s);if(v==t.length-1){var w=s.getNext();u.moveToPosition(s,4);if(!w||w.type==1&&!w.isEditable())u.fixBlock(true,q.config.enterMode==3?'div':'p');u.select();}}q.fire('saveSnapshot');}};(function(){function q(r){r.data.mode='html';};n.add('pastefromword',{init:function(r){var s=0,t=function(u){u&&u.removeListener();r.removeListener('beforePaste',q);s&&setTimeout(function(){s=0;},0);};r.addCommand('pastefromword',{canUndo:false,exec:function(){s=1;r.on('beforePaste',q);if(r.execCommand('paste','html')===false){r.on('dialogShow',function(u){u.removeListener();u.data.on('cancel',t);});r.on('dialogHide',function(u){u.data.removeListener('cancel',t);});}r.on('afterPaste',t);}});r.ui.addButton('PasteFromWord',{label:r.lang.pastefromword.toolbar,command:'pastefromword'});r.on('pasteState',function(u){r.getCommand('pastefromword').setState(u.data);});r.on('paste',function(u){var v=u.data,w;if((w=v.html)&&(s||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(w))){var x=this.loadFilterRules(function(){if(x)r.fire('paste',v);else if(!r.config.pasteFromWordPromptCleanup||s||confirm(r.lang.pastefromword.confirmCleanup))v.html=e.cleanWord(w,r);});x&&u.cancel();}},this);},loadFilterRules:function(r){var s=e.cleanWord;if(s)r();else{var t=e.getUrl(m.pasteFromWordCleanupFile||this.path+'filter/default.js');e.scriptLoader.load(t,r,null,true);}return!s;},requires:['clipboard']});})();(function(){var q={exec:function(r){var s=i.tryThese(function(){var t=window.clipboardData.getData('Text');if(!t)throw 0;return t;});if(!s){r.openDialog('pastetext');return false;}else r.fire('paste',{text:s});return true;}};n.add('pastetext',{init:function(r){var s='pastetext',t=r.addCommand(s,q);r.ui.addButton('PasteText',{label:r.lang.pasteText.button,command:s});e.dialog.add(s,e.getUrl(this.path+'dialogs/pastetext.js'));if(r.config.forcePasteAsPlainText){r.on('beforeCommandExec',function(u){var v=u.data.commandData;if(u.data.name=='paste'&&v!='html'){r.execCommand('pastetext');u.cancel();}},null,null,0);r.on('beforePaste',function(u){u.data.mode='text';});}r.on('pasteState',function(u){r.getCommand('pastetext').setState(u.data);});},requires:['clipboard']});})();n.add('popup');i.extend(e.editor.prototype,{popup:function(q,r,s,t){r=r||'80%';s=s||'70%';if(typeof r=='string'&&r.length>1&&r.substr(r.length-1,1)=='%')r=parseInt(window.screen.width*parseInt(r,10)/100,10);if(typeof s=='string'&&s.length>1&&s.substr(s.length-1,1)=='%')s=parseInt(window.screen.height*parseInt(s,10)/100,10);if(r<640)r=640;if(s<420)s=420;var u=parseInt((window.screen.height-s)/2,10),v=parseInt((window.screen.width-r)/2,10);t=(t||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+r+',height='+s+',top='+u+',left='+v;var w=window.open('',null,t,true);if(!w)return false;try{w.moveTo(v,u);w.resizeTo(r,s);w.focus();w.location.href=q;}catch(x){w=window.open(q,null,t,true);}return true;}});(function(){var q={modes:{wysiwyg:1,source:1},canUndo:false,readOnly:1,exec:function(s){var t,u=s.config,v=u.baseHref?'<base href="'+u.baseHref+'"/>':'',w=f.isCustomDomain();if(u.fullPage)t=s.getData().replace(/<head>/,'$&'+v).replace(/[^>]*(?=<\/title>)/,'$& &mdash; '+s.lang.preview);else{var x='<body ',y=s.document&&s.document.getBody();if(y){if(y.getAttribute('id'))x+='id="'+y.getAttribute('id')+'" ';if(y.getAttribute('class'))x+='class="'+y.getAttribute('class')+'" ';}x+='>';t=s.config.docType+'<html dir="'+s.config.contentsLangDirection+'">'+'<head>'+v+'<title>'+s.lang.preview+'</title>'+i.buildStyleHtml(s.config.contentsCss)+'</head>'+x+s.getData()+'</body></html>';}var z=640,A=420,B=80;try{var C=window.screen;z=Math.round(C.width*0.8);A=Math.round(C.height*0.7);B=Math.round(C.width*0.1);}catch(F){}var D='';if(w){window._cke_htmlToLoad=t;D='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var E=window.open(D,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+z+',height='+A+',left='+B);if(!w){E.document.open();E.document.write(t);E.document.close();}}},r='preview';n.add(r,{init:function(s){s.addCommand(r,q);s.ui.addButton('Preview',{label:s.lang.preview,command:r});}});})();n.add('print',{init:function(q){var r='print',s=q.addCommand(r,n.print);q.ui.addButton('Print',{label:q.lang.print,command:r});}});n.print={exec:function(q){if(f.opera)return;else if(f.gecko)q.window.$.print();else q.document.$.execCommand('Print');},canUndo:false,readOnly:1,modes:{wysiwyg:!f.opera}};n.add('removeformat',{requires:['selection'],init:function(q){q.addCommand('removeFormat',n.removeformat.commands.removeformat);q.ui.addButton('RemoveFormat',{label:q.lang.removeFormat,command:'removeFormat'});q._.removeFormat={filters:[]};}});n.removeformat={commands:{removeformat:{exec:function(q){var r=q._.removeFormatRegex||(q._.removeFormatRegex=new RegExp('^(?:'+q.config.removeFormatTags.replace(/,/g,'|')+')$','i')),s=q._.removeAttributes||(q._.removeAttributes=q.config.removeFormatAttributes.split(',')),t=n.removeformat.filter,u=q.getSelection().getRanges(1),v=u.createIterator(),w;while(w=v.getNextRange()){if(!w.collapsed)w.enlarge(1);var x=w.createBookmark(),y=x.startNode,z=x.endNode,A,B=function(D){var E=new h.elementPath(D),F=E.elements;for(var G=1,H;H=F[G];G++){if(H.equals(E.block)||H.equals(E.blockLimit))break;if(r.test(H.getName())&&t(q,H))D.breakParent(H);}};B(y);if(z){B(z);A=y.getNextSourceNode(true,1);while(A){if(A.equals(z))break;var C=A.getNextSourceNode(false,1);if(!(A.getName()=='img'&&A.data('cke-realelement'))&&t(q,A))if(r.test(A.getName()))A.remove(1);else{A.removeAttributes(s);q.fire('removeFormatCleanup',A);}A=C;}}w.moveToBookmark(x);}q.getSelection().selectRanges(u);}}},filter:function(q,r){var s=q._.removeFormat.filters;for(var t=0;t<s.length;t++){if(s[t](r)===false)return false;}return true;}};e.editor.prototype.addRemoveFormatFilter=function(q){this._.removeFormat.filters.push(q);};m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';n.add('resize',{init:function(q){var r=q.config,s=q.element.getDirection(1);!r.resize_dir&&(r.resize_dir='both');r.resize_maxWidth==undefined&&(r.resize_maxWidth=3000);r.resize_maxHeight==undefined&&(r.resize_maxHeight=3000);r.resize_minWidth==undefined&&(r.resize_minWidth=750);r.resize_minHeight==undefined&&(r.resize_minHeight=250);if(r.resize_enabled!==false){var t=null,u,v,w=(r.resize_dir=='both'||r.resize_dir=='horizontal')&&r.resize_minWidth!=r.resize_maxWidth,x=(r.resize_dir=='both'||r.resize_dir=='vertical')&&r.resize_minHeight!=r.resize_maxHeight;function y(B){var C=B.data.$.screenX-u.x,D=B.data.$.screenY-u.y,E=v.width,F=v.height,G=E+C*(s=='rtl'?-1:1),H=F+D;if(w)E=Math.max(r.resize_minWidth,Math.min(G,r.resize_maxWidth));if(x)F=Math.max(r.resize_minHeight,Math.min(H,r.resize_maxHeight));q.resize(E,F);};function z(B){e.document.removeListener('mousemove',y);e.document.removeListener('mouseup',z);if(q.document){q.document.removeListener('mousemove',y);q.document.removeListener('mouseup',z);}};var A=i.addFunction(function(B){if(!t)t=q.getResizable();v={width:t.$.offsetWidth||0,height:t.$.offsetHeight||0};u={x:B.screenX,y:B.screenY};r.resize_minWidth>v.width&&(r.resize_minWidth=v.width);r.resize_minHeight>v.height&&(r.resize_minHeight=v.height);e.document.on('mousemove',y);e.document.on('mouseup',z);if(q.document){q.document.on('mousemove',y);q.document.on('mouseup',z);}});q.on('destroy',function(){i.removeFunction(A);});q.on('themeSpace',function(B){if(B.data.space=='bottom'){var C='';if(w&&!x)C=' cke_resizer_horizontal';if(!w&&x)C=' cke_resizer_vertical';var D='<div class="cke_resizer'+C+' cke_resizer_'+s+'"'+' title="'+i.htmlEncode(q.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+A+', event)"'+'></div>';s=='ltr'&&C=='ltr'?B.data.html+=D:B.data.html=D+B.data.html;}},q,null,100);}}});(function(){var q={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(s){var t=s.element.$.form;if(t)try{t.submit();}catch(u){if(t.submit.click)t.submit.click();}}},r='save';n.add(r,{init:function(s){var t=s.addCommand(r,q);t.modes={wysiwyg:!!s.element.$.form};s.ui.addButton('Save',{label:s.lang.save,command:r});}});})();n.add('smiley',{requires:['dialog'],init:function(q){q.config.smiley_path=q.config.smiley_path||this.path+'images/';q.addCommand('smiley',new e.dialogCommand('smiley'));q.ui.addButton('Smiley',{label:q.lang.smiley.toolbar,command:'smiley'});e.dialog.add('smiley',this.path+'dialogs/smiley.js');}});m.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];m.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(function(){var q='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',r=/%1/g,s=/%2/g,t=/%3/g,u={readOnly:1,preserveState:true,editorFocus:false,exec:function(v){this.toggleState();this.refresh(v);},refresh:function(v){if(v.document){var w=this.state==1?'addClass':'removeClass';v.document.getBody()[w]('cke_show_blocks');}}};n.add('showblocks',{requires:['wysiwygarea'],init:function(v){var w=v.addCommand('showblocks',u);w.canUndo=false;if(v.config.startupOutlineBlocks)w.setState(1);v.addCss(q.replace(r,'background-image: url('+e.getUrl(this.path)+'images/block_').replace(s,'cke_show_blocks ').replace(t,v.lang.dir=='rtl'?'right':'left'));v.ui.addButton('ShowBlocks',{label:v.lang.showBlocks,command:'showblocks'});v.on('mode',function(){if(w.state!=0)w.refresh(v);});v.on('contentDom',function(){if(w.state!=0)w.refresh(v);});}});})();(function(){var q='cke_show_border',r,s=(f.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');r=s.replace(/%2/g,q).replace(/%1/g,'cke_show_borders ');var t={preserveState:true,editorFocus:false,readOnly:1,exec:function(u){this.toggleState();this.refresh(u);},refresh:function(u){if(u.document){var v=this.state==1?'addClass':'removeClass';u.document.getBody()[v]('cke_show_borders');}}};n.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(u){var v=u.addCommand('showborders',t);v.canUndo=false;if(u.config.startupShowBorders!==false)v.setState(1);u.addCss(r);u.on('mode',function(){if(v.state!=0)v.refresh(u);},null,null,100);u.on('contentDom',function(){if(v.state!=0)v.refresh(u);});u.on('removeFormatCleanup',function(w){var x=w.data;if(u.getCommand('showborders').state==1&&x.is('table')&&(!x.hasAttribute('border')||parseInt(x.getAttribute('border'),10)<=0))x.addClass(q);});},afterInit:function(u){var v=u.dataProcessor,w=v&&v.dataFilter,x=v&&v.htmlFilter;if(w)w.addRules({elements:{table:function(y){var z=y.attributes,A=z['class'],B=parseInt(z.border,10);if(!B||B<=0)z['class']=(A||'')+' '+q;}}});if(x)x.addRules({elements:{table:function(y){var z=y.attributes,A=z['class'];A&&(z['class']=A.replace(q,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});e.on('dialogDefinition',function(u){var v=u.data.name;if(v=='table'||v=='tableProperties'){var w=u.data.definition,x=w.getContents('info'),y=x.get('txtBorder'),z=y.commit;y.commit=i.override(z,function(C){return function(D,E){C.apply(this,arguments);var F=parseInt(this.getValue(),10);E[!F||F<=0?'addClass':'removeClass'](q);};});var A=w.getContents('advanced'),B=A&&A.get('advCSSClasses');if(B){B.setup=i.override(B.setup,function(C){return function(){C.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});B.commit=i.override(B.commit,function(C){return function(D,E){C.apply(this,arguments);if(!parseInt(E.getAttribute('border'),10))E.addClass('cke_show_border');};});}}});})();n.add('sourcearea',{requires:['editingblock'],init:function(q){var r=n.sourcearea,s=e.document.getWindow();q.on('editingBlockReady',function(){var t,u;q.addMode('source',{load:function(v,w){if(g&&f.version<8)v.setStyle('position','relative');q.textarea=t=new l('textarea');t.setAttributes({dir:'ltr',tabIndex:f.webkit?-1:q.tabIndex,role:'textbox','aria-label':q.lang.editorTitle.replace('%1',q.name)});t.addClass('cke_source');t.addClass('cke_enable_context_menu');q.readOnly&&t.setAttribute('readOnly','readonly');var x={width:f.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(f.ie9Compat)x.minHeight='120px';if(f.ie6Compat&&f.ie7Compat){u=function(){t.hide();t.setStyle('height',v.$.clientHeight+'px');t.setStyle('width',v.$.clientWidth+'px');t.show();};q.on('resize',u);s.on('resize',u);setTimeout(u,0);}v.setHtml('');v.append(t);t.setStyles(x);q.fire('ariaWidget',t);t.on('blur',function(){q.focusManager.blur();});t.on('focus',function(){q.focusManager.focus();});q.mayBeDirty=true;this.loadData(w);var y=q.keystrokeHandler;if(y)y.attach(t);setTimeout(function(){q.mode='source';q.fire('mode');},f.gecko||f.webkit?100:0);},loadData:function(v){t.setValue(v);q.fire('dataReady');},getData:function(){return t.getValue();},getSnapshotData:function(){return t.getValue();},unload:function(v){t.clearCustomData();q.textarea=t=null;if(u){q.removeListener('resize',u);s.removeListener('resize',u);}if(g&&f.version<8)v.removeStyle('position');},focus:function(){t.focus();}});});q.on('readOnly',function(){if(q.mode=='source')if(q.readOnly)q.textarea.setAttribute('readOnly','readonly');else q.textarea.removeAttribute('readOnly');});q.addCommand('source',r.commands.source);if(q.ui.addButton)q.ui.addButton('Source',{label:q.lang.source,command:'source'});q.on('mode',function(){q.getCommand('source').setState(q.mode=='source'?1:2);});}});n.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(q){if(q.mode=='wysiwyg')q.fire('saveSnapshot');q.getCommand('source').setState(0);q.setMode(q.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){n.add('stylescombo',{requires:['richcombo','styles'],init:function(r){var s=r.config,t=r.lang.stylesCombo,u={},v=[],w;function x(y){r.getStylesSet(function(z){if(!v.length){var A,B;for(var C=0,D=z.length;C<D;C++){var E=z[C];B=E.name;A=u[B]=new e.style(E);A._name=B;A._.enterMode=s.enterMode;v.push(A);}v.sort(q);}y&&y();});};r.ui.addRichCombo('Styles',{label:t.label,title:t.panelTitle,className:'cke_styles',panel:{css:r.skin.editor.css.concat(s.contentsCss),multiSelect:true,attributes:{'aria-label':t.panelTitle}},init:function(){w=this;x(function(){var y,z,A,B,C,D;for(C=0,D=v.length;C<D;C++){y=v[C];z=y._name;B=y.type;if(B!=A){w.startGroup(t['panelTitle'+String(B)]);A=B;}w.add(z,y.type==3?z:y.buildPreview(),z);}w.commit();});},onClick:function(y){r.focus();r.fire('saveSnapshot');var z=u[y],A=r.getSelection(),B=new h.elementPath(A.getStartElement());z[z.checkActive(B)?'remove':'apply'](r.document);r.fire('saveSnapshot');},onRender:function(){r.on('selectionChange',function(y){var z=this.getValue(),A=y.data.path,B=A.elements;for(var C=0,D=B.length,E;C<D;C++){E=B[C];for(var F in u){if(u[F].checkElementRemovable(E,true)){if(F!=z)this.setValue(F);return;}}}this.setValue('');},this);},onOpen:function(){var F=this;if(g||f.webkit)r.focus();var y=r.getSelection(),z=y.getSelectedElement(),A=new h.elementPath(z||y.getStartElement()),B=[0,0,0,0];F.showAll();F.unmarkAll();for(var C in u){var D=u[C],E=D.type;if(D.checkActive(A))F.mark(C);else if(E==3&&!D.checkApplicable(A)){F.hideItem(C);B[E]--;}B[E]++;}if(!B[1])F.hideGroup(t['panelTitle'+String(1)]);if(!B[2])F.hideGroup(t['panelTitle'+String(2)]);if(!B[3])F.hideGroup(t['panelTitle'+String(3)]);},reset:function(){if(w){delete w._.panel;delete w._.list;w._.committed=0;w._.items={};w._.state=2;}u={};v=[];x();}});r.on('instanceReady',function(){x();});}});function q(r,s){var t=r.type,u=s.type;return t==u?0:t==3?-1:u==3?1:u==1?1:-1;};})();n.add('table',{init:function(q){var r=n.table,s=q.lang.table;q.addCommand('table',new e.dialogCommand('table'));q.addCommand('tableProperties',new e.dialogCommand('tableProperties'));q.ui.addButton('Table',{label:s.toolbar,command:'table'});e.dialog.add('table',this.path+'dialogs/table.js');e.dialog.add('tableProperties',this.path+'dialogs/table.js');if(q.addMenuItems)q.addMenuItems({table:{label:s.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:s.deleteTable,command:'tableDelete',group:'table',order:1}});q.on('doubleclick',function(t){var u=t.data.element;if(u.is('table'))t.data.dialog='tableProperties';});if(q.contextMenu)q.contextMenu.addListener(function(t,u){if(!t||t.isReadOnly())return null;var v=t.hasAscendant('table',1);if(v)return{tabledelete:2,table:2};return null;});}});(function(){var q=/^(?:td|th)$/;function r(K){var L=K.createBookmarks(),M=K.getRanges(),N=[],O={};function P(X){if(N.length>0)return;if(X.type==1&&q.test(X.getName())&&!X.getCustomData('selected_cell')){l.setMarker(O,X,'selected_cell',true);N.push(X);}};for(var Q=0;Q<M.length;Q++){var R=M[Q];if(R.collapsed){var S=R.getCommonAncestor(),T=S.getAscendant('td',true)||S.getAscendant('th',true);if(T)N.push(T);}else{var U=new h.walker(R),V;U.guard=P;while(V=U.next()){var W=V.getAscendant('td')||V.getAscendant('th');if(W&&!W.getCustomData('selected_cell')){l.setMarker(O,W,'selected_cell',true);N.push(W);}}}}l.clearAllMarkers(O);K.selectBookmarks(L);return N;};function s(K){var L=0,M=K.length-1,N={},O,P,Q;while(O=K[L++])l.setMarker(N,O,'delete_cell',true);L=0;while(O=K[L++]){if((P=O.getPrevious())&&!P.getCustomData('delete_cell')||(P=O.getNext())&&!P.getCustomData('delete_cell')){l.clearAllMarkers(N);return P;}}l.clearAllMarkers(N);Q=K[0].getParent();if(Q=Q.getPrevious())return Q.getLast();Q=K[M].getParent();if(Q=Q.getNext())return Q.getChild(0);return null;};function t(K,L){var M=r(K),N=M[0],O=N.getAscendant('table'),P=N.getDocument(),Q=M[0].getParent(),R=Q.$.rowIndex,S=M[M.length-1],T=S.getParent().$.rowIndex+S.$.rowSpan-1,U=new l(O.$.rows[T]),V=L?R:T,W=L?Q:U,X=i.buildTableMap(O),Y=X[V],Z=L?X[V-1]:X[V+1],aa=X[0].length,ab=P.createElement('tr');for(var ac=0;ac<aa;ac++){var ad;if(Y[ac].rowSpan>1&&Z&&Y[ac]==Z[ac]){ad=Y[ac];ad.rowSpan+=1;}else{ad=new l(Y[ac]).clone();ad.removeAttribute('rowSpan');!g&&ad.appendBogus();ab.append(ad);ad=ad.$;}ac+=ad.colSpan-1;}L?ab.insertBefore(W):ab.insertAfter(W);};function u(K){if(K instanceof h.selection){var L=r(K),M=L[0],N=M.getAscendant('table'),O=i.buildTableMap(N),P=L[0].getParent(),Q=P.$.rowIndex,R=L[L.length-1],S=R.getParent().$.rowIndex+R.$.rowSpan-1,T=[];for(var U=Q;U<=S;U++){var V=O[U],W=new l(N.$.rows[U]);for(var X=0;X<V.length;X++){var Y=new l(V[X]),Z=Y.getParent().$.rowIndex;if(Y.$.rowSpan==1)Y.remove();else{Y.$.rowSpan-=1;if(Z==U){var aa=O[U+1];aa[X-1]?Y.insertAfter(new l(aa[X-1])):new l(N.$.rows[U+1]).append(Y,1);}}X+=Y.$.colSpan-1;}T.push(W);}var ab=N.$.rows,ac=new l(ab[S+1]||(Q>0?ab[Q-1]:null)||N.$.parentNode);for(U=T.length;U>=0;U--)u(T[U]);return ac;}else if(K instanceof l){N=K.getAscendant('table');if(N.$.rows.length==1)N.remove();else K.remove();}return null;};function v(K,L){var M=K.getParent(),N=M.$.cells,O=0;for(var P=0;P<N.length;P++){var Q=N[P];O+=L?1:Q.colSpan;if(Q==K.$)break;}return O-1;};function w(K,L){var M=L?Infinity:0;for(var N=0;N<K.length;N++){var O=v(K[N],L);if(L?O<M:O>M)M=O;}return M;};function x(K,L){var M=r(K),N=M[0],O=N.getAscendant('table'),P=w(M,1),Q=w(M),R=L?P:Q,S=i.buildTableMap(O),T=[],U=[],V=S.length;for(var W=0;W<V;W++){T.push(S[W][R]);var X=L?S[W][R-1]:S[W][R+1];X&&U.push(X);}for(W=0;W<V;W++){var Y;if(T[W].colSpan>1&&U.length&&U[W]==T[W]){Y=T[W];Y.colSpan+=1;}else{Y=new l(T[W]).clone();Y.removeAttribute('colSpan');!g&&Y.appendBogus();Y[L?'insertBefore':'insertAfter'].call(Y,new l(T[W]));Y=Y.$;}W+=Y.rowSpan-1;}};function y(K){var L=r(K),M=L[0],N=L[L.length-1],O=M.getAscendant('table'),P=i.buildTableMap(O),Q,R,S=[];for(var T=0,U=P.length;T<U;T++)for(var V=0,W=P[T].length;V<W;V++){if(P[T][V]==M.$)Q=V;if(P[T][V]==N.$)R=V;}for(T=Q;T<=R;T++)for(V=0;V<P.length;V++){var X=P[V],Y=new l(O.$.rows[V]),Z=new l(X[T]);if(Z.$){if(Z.$.colSpan==1)Z.remove();else Z.$.colSpan-=1;V+=Z.$.rowSpan-1;if(!Y.$.cells.length)S.push(Y);}}var aa=O.$.rows[0]&&O.$.rows[0].cells,ab=new l(aa[Q]||(Q?aa[Q-1]:O.$.parentNode));if(S.length==U)O.remove();return ab;};function z(K){var L=[],M=K[0]&&K[0].getAscendant('table'),N,O,P,Q;for(N=0,O=K.length;N<O;N++)L.push(K[N].$.cellIndex);L.sort();for(N=1,O=L.length;N<O;N++){if(L[N]-L[N-1]>1){P=L[N-1]+1;break;}}if(!P)P=L[0]>0?L[0]-1:L[L.length-1]+1;var R=M.$.rows;for(N=0,O=R.length;N<O;N++){Q=R[N].cells[P];if(Q)break;}return Q?new l(Q):M.getPrevious();};function A(K,L){var M=K.getStartElement(),N=M.getAscendant('td',1)||M.getAscendant('th',1);if(!N)return;var O=N.clone();if(!g)O.appendBogus();if(L)O.insertBefore(N);else O.insertAfter(N);};function B(K){if(K instanceof h.selection){var L=r(K),M=L[0]&&L[0].getAscendant('table'),N=s(L);for(var O=L.length-1;O>=0;O--)B(L[O]);if(N)D(N,true);else if(M)M.remove();}else if(K instanceof l){var P=K.getParent();if(P.getChildCount()==1)P.remove();else K.remove();}};function C(K){var L=K.getBogus();L&&L.remove();K.trim();};function D(K,L){var M=new h.range(K.getDocument());if(!M['moveToElementEdit'+(L?'End':'Start')](K)){M.selectNodeContents(K);M.collapse(L?false:true);}M.select(true);};function E(K,L,M){var N=K[L];if(typeof M=='undefined')return N;for(var O=0;N&&O<N.length;O++){if(M.is&&N[O]==M.$)return O;else if(O==M)return new l(N[O]);}return M.is?-1:null;};function F(K,L,M){var N=[];for(var O=0;O<K.length;O++){var P=K[O];if(typeof M=='undefined')N.push(P[L]);else if(M.is&&P[L]==M.$)return O;else if(O==M)return new l(P[L]);}return typeof M=='undefined'?N:M.is?-1:null;};function G(K,L,M){var N=r(K),O;if((L?N.length!=1:N.length<2)||(O=K.getCommonAncestor())&&O.type==1&&O.is('table'))return false;var P,Q=N[0],R=Q.getAscendant('table'),S=i.buildTableMap(R),T=S.length,U=S[0].length,V=Q.getParent().$.rowIndex,W=E(S,V,Q);if(L){var X;try{var Y=parseInt(Q.getAttribute('rowspan'),10)||1,Z=parseInt(Q.getAttribute('colspan'),10)||1;X=S[L=='up'?V-Y:L=='down'?V+Y:V][L=='left'?W-Z:L=='right'?W+Z:W];}catch(ar){return false;}if(!X||Q.$==X)return false;N[L=='up'||L=='left'?'unshift':'push'](new l(X));}var aa=Q.getDocument(),ab=V,ac=0,ad=0,ae=!M&&new h.documentFragment(aa),af=0;for(var ag=0;ag<N.length;ag++){P=N[ag];var ah=P.getParent(),ai=P.getFirst(),aj=P.$.colSpan,ak=P.$.rowSpan,al=ah.$.rowIndex,am=E(S,al,P);af+=aj*ak;ad=Math.max(ad,am-W+aj);ac=Math.max(ac,al-V+ak);if(!M){if(C(P),P.getChildren().count()){if(al!=ab&&ai&&!(ai.isBlockBoundary&&ai.isBlockBoundary({br:1}))){var an=ae.getLast(h.walker.whitespaces(true));if(an&&!(an.is&&an.is('br')))ae.append('br');}P.moveChildren(ae);}ag?P.remove():P.setHtml('');}ab=al;}if(!M){ae.moveChildren(Q);if(!g)Q.appendBogus();if(ad>=U)Q.removeAttribute('rowSpan');else Q.$.rowSpan=ac;if(ac>=T)Q.removeAttribute('colSpan');else Q.$.colSpan=ad;var ao=new h.nodeList(R.$.rows),ap=ao.count();for(ag=ap-1;ag>=0;ag--){var aq=ao.getItem(ag);if(!aq.$.cells.length){aq.remove();ap++;continue;}}return Q;}else return ac*ad==af;};function H(K,L){var M=r(K);if(M.length>1)return false;else if(L)return true;var N=M[0],O=N.getParent(),P=O.getAscendant('table'),Q=i.buildTableMap(P),R=O.$.rowIndex,S=E(Q,R,N),T=N.$.rowSpan,U,V,W,X;if(T>1){V=Math.ceil(T/2);W=Math.floor(T/2);X=R+V;var Y=new l(P.$.rows[X]),Z=E(Q,X),aa;U=N.clone();for(var ab=0;ab<Z.length;ab++){aa=Z[ab];if(aa.parentNode==Y.$&&ab>S){U.insertBefore(new l(aa));break;}else aa=null;}if(!aa)Y.append(U,true);}else{W=V=1;Y=O.clone();Y.insertAfter(O);Y.append(U=N.clone());var ac=E(Q,R);for(var ad=0;ad<ac.length;ad++)ac[ad].rowSpan++;}if(!g)U.appendBogus();N.$.rowSpan=V;U.$.rowSpan=W;if(V==1)N.removeAttribute('rowSpan');if(W==1)U.removeAttribute('rowSpan');return U;};function I(K,L){var M=r(K);if(M.length>1)return false;else if(L)return true;var N=M[0],O=N.getParent(),P=O.getAscendant('table'),Q=i.buildTableMap(P),R=O.$.rowIndex,S=E(Q,R,N),T=N.$.colSpan,U,V,W;if(T>1){V=Math.ceil(T/2);W=Math.floor(T/2);}else{W=V=1;var X=F(Q,S);for(var Y=0;Y<X.length;Y++)X[Y].colSpan++;}U=N.clone();U.insertAfter(N);if(!g)U.appendBogus();N.$.colSpan=V;U.$.colSpan=W;if(V==1)N.removeAttribute('colSpan');if(W==1)U.removeAttribute('colSpan');return U;};var J={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};n.tabletools={init:function(K){var L=K.lang.table;K.addCommand('cellProperties',new e.dialogCommand('cellProperties'));e.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');K.addCommand('tableDelete',{exec:function(M){var N=M.getSelection(),O=N&&N.getStartElement(),P=O&&O.getAscendant('table',1);if(!P)return;var Q=P.getParent();if(Q.getChildCount()==1&&!Q.is('body','td','th'))P=Q;var R=new h.range(M.document);R.moveToPosition(P,3);P.remove();R.select();}});K.addCommand('rowDelete',{exec:function(M){var N=M.getSelection();D(u(N));}});K.addCommand('rowInsertBefore',{exec:function(M){var N=M.getSelection();t(N,true);}});K.addCommand('rowInsertAfter',{exec:function(M){var N=M.getSelection();t(N);}});K.addCommand('columnDelete',{exec:function(M){var N=M.getSelection(),O=y(N);O&&D(O,true);}});K.addCommand('columnInsertBefore',{exec:function(M){var N=M.getSelection();x(N,true);}});K.addCommand('columnInsertAfter',{exec:function(M){var N=M.getSelection();x(N);}});K.addCommand('cellDelete',{exec:function(M){var N=M.getSelection();B(N);}});K.addCommand('cellMerge',{exec:function(M){D(G(M.getSelection()),true);}});K.addCommand('cellMergeRight',{exec:function(M){D(G(M.getSelection(),'right'),true);}});K.addCommand('cellMergeDown',{exec:function(M){D(G(M.getSelection(),'down'),true);}});K.addCommand('cellVerticalSplit',{exec:function(M){D(H(M.getSelection()));}});K.addCommand('cellHorizontalSplit',{exec:function(M){D(I(M.getSelection()));}});K.addCommand('cellInsertBefore',{exec:function(M){var N=M.getSelection();A(N,true);}});K.addCommand('cellInsertAfter',{exec:function(M){var N=M.getSelection();A(N);}});if(K.addMenuItems)K.addMenuItems({tablecell:{label:L.cell.menu,group:'tablecell',order:1,getItems:function(){var M=K.getSelection(),N=r(M);return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_merge:G(M,null,true)?2:0,tablecell_merge_right:G(M,'right',true)?2:0,tablecell_merge_down:G(M,'down',true)?2:0,tablecell_split_vertical:H(M,true)?2:0,tablecell_split_horizontal:I(M,true)?2:0,tablecell_properties:N.length>0?2:0};}},tablecell_insertBefore:{label:L.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:L.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:L.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:L.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:L.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:L.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:L.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:L.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:L.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:L.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:L.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:L.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:L.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:L.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:L.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:L.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:L.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(K.contextMenu)K.contextMenu.addListener(function(M,N){if(!M||M.isReadOnly())return null;while(M){if(M.getName()in J)return{tablecell:2,tablerow:2,tablecolumn:2};M=M.getParent();}return null;});},getSelectedCells:r};n.add('tabletools',n.tabletools);})();i.buildTableMap=function(q){var r=q.$.rows,s=-1,t=[];for(var u=0;u<r.length;u++){s++;!t[s]&&(t[s]=[]);var v=-1;for(var w=0;w<r[u].cells.length;w++){var x=r[u].cells[w];v++;while(t[s][v])v++;var y=isNaN(x.colSpan)?1:x.colSpan,z=isNaN(x.rowSpan)?1:x.rowSpan;for(var A=0;A<z;A++){if(!t[s+A])t[s+A]=[];for(var B=0;B<y;B++)t[s+A][v+B]=r[u].cells[w];}v+=y-1;}}return t;};n.add('specialchar',{availableLangs:{en:1},init:function(q){var r='specialchar',s=this;e.dialog.add(r,this.path+'dialogs/specialchar.js');q.addCommand(r,{exec:function(){var t=q.langCode;t=s.availableLangs[t]?t:'en';e.scriptLoader.load(e.getUrl(s.path+'lang/'+t+'.js'),function(){i.extend(q.lang.specialChar,s.langEntries[t]);q.openDialog(r);});},modes:{wysiwyg:1},canUndo:false});q.ui.addButton('SpecialChar',{label:q.lang.specialChar.toolbar,command:r});}});m.specialChars=['!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','&lt;','=','&gt;','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','&euro;','&lsquo;','&rsquo;','&ldquo;','&rdquo;','&ndash;','&mdash;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&reg;','&macr;','&deg;','&','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&uuml;','&yacute;','&thorn;','&yuml;','&OElig;','&oelig;','&#372;','&#374','&#373','&#375;','&sbquo;','&#8219;','&bdquo;','&hellip;','&trade;','&#9658;','&bull;','&rarr;','&rArr;','&hArr;','&diams;','&asymp;'];(function(){var q={editorFocus:false,modes:{wysiwyg:1,source:1}},r={exec:function(u){u.container.focusNext(true,u.tabIndex);}},s={exec:function(u){u.container.focusPrevious(true,u.tabIndex);}};function t(u){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(v){if(v.focusManager.hasFocus){var w=v.getSelection(),x=w.getCommonAncestor(),y;if(y=x.getAscendant('td',true)||x.getAscendant('th',true)){var z=new h.range(v.document),A=i.tryThese(function(){var H=y.getParent(),I=H.$.cells[y.$.cellIndex+(u?-1:1)];I.parentNode.parentNode;return I;},function(){var H=y.getParent(),I=H.getAscendant('table'),J=I.$.rows[H.$.rowIndex+(u?-1:1)];return J.cells[u?J.cells.length-1:0];});if(!(A||u)){var B=y.getAscendant('table').$,C=y.getParent().$.cells,D=new l(B.insertRow(-1),v.document);for(var E=0,F=C.length;E<F;E++){var G=D.append(new l(C[E],v.document).clone(false,false));!g&&G.appendBogus();}z.moveToElementEditStart(D);}else if(A){A=new l(A);z.moveToElementEditStart(A);if(!(z.checkStartOfBlock()&&z.checkEndOfBlock()))z.selectNodeContents(A);}else return true;z.select(true);return true;}}return false;}};};n.add('tab',{requires:['keystrokes'],init:function(u){var v=u.config.enableTabKeyTools!==false,w=u.config.tabSpaces||0,x='';while(w--)x+='\xa0';if(x)u.on('key',function(y){if(y.data.keyCode==9){u.insertHtml(x);y.cancel();}});if(v)u.on('key',function(y){if(y.data.keyCode==9&&u.execCommand('selectNextCell')||y.data.keyCode==2228224+9&&u.execCommand('selectPreviousCell'))y.cancel();});if(f.webkit||f.gecko)u.on('key',function(y){var z=y.data.keyCode;if(z==9&&!x){y.cancel();u.execCommand('blur');}if(z==2228224+9){u.execCommand('blurBack');y.cancel();}});u.addCommand('blur',i.extend(r,q));u.addCommand('blurBack',i.extend(s,q));u.addCommand('selectNextCell',t());u.addCommand('selectPreviousCell',t(true));}});})();l.prototype.focusNext=function(q,r){var A=this;var s=A.$,t=r===undefined?A.getTabIndex():r,u,v,w,x,y,z;if(t<=0){y=A.getNextSourceNode(q,1);while(y){if(y.isVisible()&&y.getTabIndex()===0){w=y;break;}y=y.getNextSourceNode(false,1);}}else{y=A.getDocument().getBody().getFirst();while(y=y.getNextSourceNode(false,1)){if(!u)if(!v&&y.equals(A)){v=true;if(q){if(!(y=y.getNextSourceNode(true,1)))break;u=1;}}else if(v&&!A.contains(y))u=1;if(!y.isVisible()||(z=y.getTabIndex())<0)continue;if(u&&z==t){w=y;break;}if(z>t&&(!w||!x||z<x)){w=y;x=z;}else if(!w&&z===0){w=y;x=z;}}}if(w)w.focus();};l.prototype.focusPrevious=function(q,r){var A=this;var s=A.$,t=r===undefined?A.getTabIndex():r,u,v,w,x=0,y,z=A.getDocument().getBody().getLast();while(z=z.getPreviousSourceNode(false,1)){if(!u)if(!v&&z.equals(A)){v=true;if(q){if(!(z=z.getPreviousSourceNode(true,1)))break;u=1;}}else if(v&&!A.contains(z))u=1;if(!z.isVisible()||(y=z.getTabIndex())<0)continue;if(t<=0){if(u&&y===0){w=z;break;}if(y>x){w=z;x=y;}}else{if(u&&y==t){w=z;break;}if(y<t&&(!w||y>x)){w=z;x=y;}}}if(w)w.focus();};(function(){n.add('templates',{requires:['dialog'],init:function(s){e.dialog.add('templates',e.getUrl(this.path+'dialogs/templates.js'));s.addCommand('templates',new e.dialogCommand('templates'));s.ui.addButton('Templates',{label:s.lang.templates.button,command:'templates'});}});var q={},r={};e.addTemplates=function(s,t){q[s]=t;};e.getTemplates=function(s){return q[s];};e.loadTemplates=function(s,t){var u=[];for(var v=0,w=s.length;v<w;v++){if(!r[s[v]]){u.push(s[v]);r[s[v]]=1;}}if(u.length)e.scriptLoader.load(u,t);else setTimeout(t,0);};})();m.templates_files=[e.getUrl('plugins/templates/templates/default.js')];m.templates_replaceContent=true;(function(){var q=function(){this.toolbars=[];this.focusCommandExecuted=false;};q.prototype.focus=function(){for(var s=0,t;t=this.toolbars[s++];)for(var u=0,v;v=t.items[u++];){if(v.focus){v.focus();return;}}};var r={toolbarFocus:{modes:{wysiwyg:1,source:1},readOnly:1,exec:function(s){if(s.toolbox){s.toolbox.focusCommandExecuted=true;if(g||f.air)setTimeout(function(){s.toolbox.focus();},100);else s.toolbox.focus();}}}};n.add('toolbar',{init:function(s){var t,u=function(v,w){var x,y,z=s.lang.dir=='rtl',A=s.config.toolbarGroupCycling;A=A===undefined||A;switch(w){case 9:case 2228224+9:while(!y||!y.items.length){y=w==9?(y?y.next:v.toolbar.next)||s.toolbox.toolbars[0]:(y?y.previous:v.toolbar.previous)||s.toolbox.toolbars[s.toolbox.toolbars.length-1];if(y.items.length){v=y.items[t?y.items.length-1:0];while(v&&!v.focus){v=t?v.previous:v.next;if(!v)y=0;}}}if(v)v.focus();return false;case z?37:39:case 40:x=v;do{x=x.next;if(!x&&A)x=v.toolbar.items[0];}while(x&&!x.focus);if(x)x.focus();else u(v,9);return false;case z?39:37:case 38:x=v;do{x=x.previous;if(!x&&A)x=v.toolbar.items[v.toolbar.items.length-1];}while(x&&!x.focus);if(x)x.focus();else{t=1;u(v,2228224+9);t=0;}return false;case 27:s.focus();return false;case 13:case 32:v.execute();return false;}return true;};s.on('themeSpace',function(v){if(v.data.space==s.config.toolbarLocation){s.toolbox=new q();var w=i.getNextId(),x=['<div class="cke_toolbox" role="group" aria-labelledby="',w,'" onmousedown="return false;"'],y=s.config.toolbarStartupExpanded!==false,z;x.push(y?'>':' style="display:none">');x.push('<span id="',w,'" class="cke_voice_label">',s.lang.toolbars,'</span>');var A=s.toolbox.toolbars,B=s.config.toolbar instanceof Array?s.config.toolbar:s.config['toolbar_'+s.config.toolbar];for(var C=0;C<B.length;C++){var D,E=0,F,G=B[C],H;if(!G)continue;if(z){x.push('</div>');z=0;}if(G==='/'){x.push('<div class="cke_break"></div>');continue;}H=G.items||G;for(var I=0;I<H.length;I++){var J,K=H[I],L;J=s.ui.create(K);if(J){L=J.canGroup!==false;if(!E){D=i.getNextId();E={id:D,items:[]};F=G.name&&(s.lang.toolbarGroups[G.name]||G.name);x.push('<span id="',D,'" class="cke_toolbar"',F?' aria-labelledby="'+D+'_label"':'',' role="toolbar">');F&&x.push('<span id="',D,'_label" class="cke_voice_label">',F,'</span>');x.push('<span class="cke_toolbar_start"></span>');var M=A.push(E)-1;if(M>0){E.previous=A[M-1];E.previous.next=E;}}if(L){if(!z){x.push('<span class="cke_toolgroup" role="presentation">');z=1;}}else if(z){x.push('</span>');z=0;}var N=J.render(s,x);M=E.items.push(N)-1;if(M>0){N.previous=E.items[M-1];N.previous.next=N;}N.toolbar=E;N.onkey=u;N.onfocus=function(){if(!s.toolbox.focusCommandExecuted)s.focus();};}}if(z){x.push('</span>');z=0;}if(E)x.push('<span class="cke_toolbar_end"></span></span>');}x.push('</div>');if(s.config.toolbarCanCollapse){var O=i.addFunction(function(){s.execCommand('toolbarCollapse');});s.on('destroy',function(){i.removeFunction(O);});var P=i.getNextId();s.addCommand('toolbarCollapse',{readOnly:1,exec:function(Q){var R=e.document.getById(P),S=R.getPrevious(),T=Q.getThemeSpace('contents'),U=S.getParent(),V=parseInt(T.$.style.height,10),W=U.$.offsetHeight,X=!S.isVisible();if(!X){S.hide();R.addClass('cke_toolbox_collapser_min');R.setAttribute('title',Q.lang.toolbarExpand);}else{S.show();R.removeClass('cke_toolbox_collapser_min');R.setAttribute('title',Q.lang.toolbarCollapse);}R.getFirst().setText(X?'▲':'◀');var Y=U.$.offsetHeight-W;T.setStyle('height',V-Y+'px');Q.fire('resize');},modes:{wysiwyg:1,source:1}});x.push('<a title="'+(y?s.lang.toolbarCollapse:s.lang.toolbarExpand)+'" id="'+P+'" tabIndex="-1" class="cke_toolbox_collapser');if(!y)x.push(' cke_toolbox_collapser_min');x.push('" onclick="CKEDITOR.tools.callFunction('+O+')">','<span>&#9650;</span>','</a>');}v.data.html+=x.join('');}});s.on('destroy',function(){var v,w=0,x,y,z;v=this.toolbox.toolbars;for(;w<v.length;w++){y=v[w].items;for(x=0;x<y.length;x++){z=y[x];if(z.clickFn)i.removeFunction(z.clickFn);if(z.keyDownFn)i.removeFunction(z.keyDownFn);}}});s.addCommand('toolbarFocus',r.toolbarFocus);s.ui.add('-',e.UI_SEPARATOR,{});s.ui.addHandler(e.UI_SEPARATOR,{create:function(){return{render:function(v,w){w.push('<span class="cke_separator" role="separator"></span>');return{};}};}});}});})();e.UI_SEPARATOR='separator';m.toolbarLocation='top';m.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];m.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}];m.toolbar='Full';m.toolbarCanCollapse=true;(function(){n.add('undo',{requires:['selection','wysiwygarea'],init:function(w){var x=new s(w),y=w.addCommand('undo',{exec:function(){if(x.undo()){w.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),z=w.addCommand('redo',{exec:function(){if(x.redo()){w.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});x.onChange=function(){y.setState(x.undoable()?2:0);z.setState(x.redoable()?2:0);};function A(B){if(x.enabled&&B.data.command.canUndo!==false)x.save();};w.on('beforeCommandExec',A);w.on('afterCommandExec',A);w.on('saveSnapshot',function(){x.save();});w.on('contentDom',function(){w.document.on('keydown',function(B){if(!B.data.$.ctrlKey&&!B.data.$.metaKey)x.type(B);});});w.on('beforeModeUnload',function(){w.mode=='wysiwyg'&&x.save(true);});w.on('mode',function(){x.enabled=w.readOnly?false:w.mode=='wysiwyg';x.onChange();});w.ui.addButton('Undo',{label:w.lang.undo,command:'undo'});w.ui.addButton('Redo',{label:w.lang.redo,command:'redo'});w.resetUndo=function(){x.reset();w.fire('saveSnapshot');};w.on('updateSnapshot',function(){if(x.currentImage&&new q(w).equals(x.currentImage))setTimeout(function(){x.update();},0);});}});n.undo={};var q=n.undo.Image=function(w){this.editor=w;w.fire('beforeUndoImage');var x=w.getSnapshot(),y=x&&w.getSelection();g&&x&&(x=x.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=x;this.bookmarks=y&&y.createBookmarks2(true);w.fire('afterUndoImage');},r=/\b(?:href|src|name)="[^"]*?"/gi;q.prototype={equals:function(w,x){var y=this.contents,z=w.contents;if(g&&(f.ie7Compat||f.ie6Compat)){y=y.replace(r,'');z=z.replace(r,'');}if(y!=z)return false;if(x)return true;var A=this.bookmarks,B=w.bookmarks;if(A||B){if(!A||!B||A.length!=B.length)return false;for(var C=0;C<A.length;C++){var D=A[C],E=B[C];if(D.startOffset!=E.startOffset||D.endOffset!=E.endOffset||!i.arrayCompare(D.start,E.start)||!i.arrayCompare(D.end,E.end))return false;}}return true;}};function s(w){this.editor=w;this.reset();};var t={8:1,46:1},u={16:1,17:1,18:1},v={37:1,38:1,39:1,40:1};s.prototype={type:function(w){var x=w&&w.data.getKey(),y=x in u,z=x in t,A=this.lastKeystroke in t,B=z&&x==this.lastKeystroke,C=x in v,D=this.lastKeystroke in v,E=!z&&!C,F=z&&!B,G=!(y||this.typing)||E&&(A||D);if(G||F){var H=new q(this.editor);i.setTimeout(function(){var J=this;var I=J.editor.getSnapshot();if(g)I=I.replace(/\s+data-cke-expando=".*?"/g,'');if(H.contents!=I){J.typing=true;if(!J.save(false,H,false))J.snapshots.splice(J.index+1,J.snapshots.length-J.index-1);J.hasUndo=true;J.hasRedo=false;J.typesCount=1;J.modifiersCount=1;J.onChange();}},0,this);}this.lastKeystroke=x;if(z){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1;}}else if(!C){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var w=this;w.lastKeystroke=0;w.snapshots=[];w.index=-1;w.limit=w.editor.config.undoStackSize||20;w.currentImage=null;w.hasUndo=false;w.hasRedo=false;w.resetType();},resetType:function(){var w=this;w.typing=false;delete w.lastKeystroke;w.typesCount=0;w.modifiersCount=0;},fireChange:function(){var w=this;w.hasUndo=!!w.getNextImage(true);w.hasRedo=!!w.getNextImage(false);w.resetType();w.onChange();},save:function(w,x,y){var A=this;var z=A.snapshots;if(!x)x=new q(A.editor);if(x.contents===false)return false;if(A.currentImage&&x.equals(A.currentImage,w))return false;z.splice(A.index+1,z.length-A.index-1);if(z.length==A.limit)z.shift();A.index=z.push(x)-1;A.currentImage=x;if(y!==false)A.fireChange();return true;},restoreImage:function(w){var y=this;y.editor.loadSnapshot(w.contents);if(w.bookmarks)y.editor.getSelection().selectBookmarks(w.bookmarks);else if(g){var x=y.editor.document.getBody().$.createTextRange();x.collapse(true);x.select();}y.index=w.index;y.update();y.fireChange();},getNextImage:function(w){var B=this;var x=B.snapshots,y=B.currentImage,z,A;if(y)if(w)for(A=B.index-1;A>=0;A--){z=x[A];if(!y.equals(z,true)){z.index=A;return z;}}else for(A=B.index+1;A<x.length;A++){z=x[A];if(!y.equals(z,true)){z.index=A;return z;}}return null;},redoable:function(){return this.enabled&&this.hasRedo;},undoable:function(){return this.enabled&&this.hasUndo;},undo:function(){var x=this;if(x.undoable()){x.save(true);var w=x.getNextImage(true);if(w)return x.restoreImage(w),true;}return false;},redo:function(){var x=this;if(x.redoable()){x.save(true);if(x.redoable()){var w=x.getNextImage(false);if(w)return x.restoreImage(w),true;}}return false;},update:function(){var w=this;w.snapshots.splice(w.index,1,w.currentImage=new q(w.editor));}};})();(function(){var q=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,r=h.walker.whitespaces(true);function s(G){return G.isBlockBoundary()&&j.$empty[G.getName()];};function t(G){return function(H){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');G.call(this,H.data);i.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function u(G){var Q=this;if(Q.dataProcessor)G=Q.dataProcessor.toHtml(G);if(!G)return;var H=Q.getSelection(),I=H.getRanges()[0];if(I.checkReadOnly())return;if(f.opera){var J=new h.elementPath(I.startContainer);if(J.block){var K=e.htmlParser.fragment.fromHtml(G,false).children;for(var L=0,M=K.length;L<M;L++){if(K[L]._.isBlockLike){I.splitBlock(Q.enterMode==3?'div':'p');I.insertNode(I.document.createText(''));I.select();break;}}}}if(g){var N=H.isLocked;if(N)H.unlock();var O=H.getNative();if(O.type=='Control')O.clear();else if(H.getType()==2){I=H.getRanges()[0];var P=I&&I.endContainer;if(P&&P.type==1&&P.getAttribute('contenteditable')=='false'&&I.checkBoundaryOfElement(P,2)){I.setEndAfter(I.endContainer);I.deleteContents();}}try{O.createRange().pasteHTML(G);}catch(R){}if(N)Q.getSelection().lock();}else Q.document.$.execCommand('inserthtml',false,G);if(f.webkit){H=Q.getSelection();H.scrollIntoView();}};function v(G){var H=this.getSelection(),I=H.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,J=I==2,K=i.htmlEncode(G.replace(/\r\n|\r/g,'\n'));K=K.replace(/^[ \t]+|[ \t]+$/g,function(Q,R,S){if(Q.length==1)return'&nbsp;';else if(!R)return i.repeat('&nbsp;',Q.length-1)+' ';else return' '+i.repeat('&nbsp;',Q.length-1);});K=K.replace(/[ \t]{2,}/g,function(Q){return i.repeat('&nbsp;',Q.length-1)+' ';});var L=I==1?'p':'div';if(!J)K=K.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(Q,R,S){return'<'+L+'>'+S+'</'+L+'>';});K=K.replace(/\n/g,'<br>');if(!(J||g))K=K.replace(new RegExp('<br>(?=</'+L+'>)'),function(Q){return i.repeat(Q,2);});if(f.gecko||f.webkit){var M=new h.elementPath(H.getStartElement()),N=[];for(var O=0;O<M.elements.length;O++){var P=M.elements[O].getName();if(P in j.$inline)N.unshift(M.elements[O].getOuterHtml().match(/^<.*?>/));else if(P in j.$block)break;}K=N.join('')+K;}u.call(this,K);};function w(G){var H=this.getSelection(),I=H.getRanges(),J=G.getName(),K=j.$block[J],L=H.isLocked;if(L)H.unlock();var M,N,O,P;for(var Q=I.length-1;Q>=0;Q--){M=I[Q];if(!M.checkReadOnly()){M.deleteContents(1);N=!Q&&G||G.clone(1);var R,S;if(K)while((R=M.getCommonAncestor(0,1))&&(S=j[R.getName()])&&!(S&&S[J])){if(R.getName()in j.span)M.splitElement(R);else if(M.checkStartOfBlock()&&M.checkEndOfBlock()){M.setStartBefore(R);M.collapse(true);R.remove();}else M.splitBlock();}M.insertNode(N);if(!O)O=N;}}if(O){M.moveToPosition(O,4);if(K){var T=O.getNext(r),U=T&&T.type==1&&T.getName();if(U&&j.$block[U]&&j[U]['#'])M.moveToElementEditStart(T);}}H.selectRanges([M]);if(L)this.getSelection().lock();};function x(G){if(!G.checkDirty())setTimeout(function(){G.resetDirty();},0);};var y=h.walker.whitespaces(true),z=h.walker.bookmark(false,true);function A(G){return y(G)&&z(G);};function B(G){return G.type==3&&i.trim(G.getText()).match(/^(?:&nbsp;|\xa0)$/);};function C(G){if(G.isLocked){G.unlock();setTimeout(function(){G.lock();},0);}};function D(G){return G.getOuterHtml().match(q);};y=h.walker.whitespaces(true);function E(G){var H=G.window,I=G.document,J=G.document.getBody(),K=J.getFirst(),L=J.getChildren().count();if(!L||L==1&&K.type==1&&K.hasAttribute('_moz_editor_bogus_node')){x(G);var M=G.element.getDocument(),N=M.getDocumentElement(),O=N.$.scrollTop,P=N.$.scrollLeft,Q=I.$.createEvent('KeyEvents');Q.initKeyEvent('keypress',true,true,H.$,false,false,false,false,0,32);I.$.dispatchEvent(Q);if(O!=N.$.scrollTop||P!=N.$.scrollLeft)M.getWindow().$.scrollTo(P,O);L&&J.getFirst().remove();I.getBody().appendBogus();var R=new h.range(I);R.setStartAt(J,1);R.select();}};function F(G){var H=G.editor,I=G.data.path,J=I.blockLimit,K=G.data.selection,L=K.getRanges()[0],M=H.document.getBody(),N=H.config.enterMode;if(f.gecko){E(H);var O=I.block||I.blockLimit,P=O&&O.getLast(A);if(O&&O.isBlockBoundary()&&!(P&&P.type==1&&P.isBlockBoundary())&&!O.is('pre')&&!O.getBogus()){H.fire('updateSnapshot');x(H);O.appendBogus();}}if(H.config.autoParagraph!==false&&N!=2&&L.collapsed&&J.getName()=='body'&&!I.block){H.fire('updateSnapshot');x(H);g&&C(K);var Q=L.fixBlock(true,H.config.enterMode==3?'div':'p');if(g){var R=Q.getFirst(A);R&&B(R)&&R.remove();}if(D(Q)){var S=Q.getNext(y);if(S&&S.type==1&&!s(S)){L.moveToElementEditStart(S);Q.remove();}else{S=Q.getPrevious(y);if(S&&S.type==1&&!s(S)){L.moveToElementEditEnd(S);Q.remove();}}}L.select();G.cancel();}var T=new h.range(H.document);T.moveToElementEditEnd(H.document.getBody());var U=new h.elementPath(T.startContainer);if(!U.blockLimit.is('body')){H.fire('updateSnapshot');x(H);g&&C(K);var V;if(N!=2)V=M.append(H.document.createElement(N==1?'p':'div'));else V=M;if(!g)V.appendBogus();}};n.add('wysiwygarea',{requires:['editingblock'],init:function(G){var H=G.config.enterMode!=2&&G.config.autoParagraph!==false?G.config.enterMode==3?'div':'p':false,I=G.lang.editorTitle.replace('%1',G.name),J;G.on('editingBlockReady',function(){var P,Q,R,S,T,U,V=f.isCustomDomain(),W=function(Z){if(Q)Q.remove();var aa='document.open();'+(V?'document.domain="'+document.domain+'";':'')+'document.close();';aa=f.air?'javascript:void(0)':g?'javascript:void(function(){'+encodeURIComponent(aa)+'}())':'';Q=l.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+I+'"'+' src="'+aa+'"'+' tabIndex="'+(f.webkit?-1:G.tabIndex)+'"'+' allowTransparency="true"'+'></iframe>');if(document.location.protocol=='chrome:')e.event.useCapture=true;Q.on('load',function(ab){T=1;ab.removeListener();var ac=Q.getFrameDocument();ac.write(Z);f.air&&Y(ac.getWindow().$);});if(document.location.protocol=='chrome:')e.event.useCapture=false;P.append(Q);};J=i.addFunction(Y);var X='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(V?'document.domain="'+document.domain+'";':'')+'window.parent.CKEDITOR.tools.callFunction( '+J+', window );'+'</script>';function Y(Z){if(!T)return;T=0;G.fire('ariaWidget',Q);var aa=Z.document,ab=aa.body,ac=aa.getElementById('cke_actscrpt');ac&&ac.parentNode.removeChild(ac);ab.spellcheck=!G.config.disableNativeSpellChecker;var ad=!G.readOnly;if(g){ab.hideFocus=true;ab.disabled=true;ab.contentEditable=ad;ab.removeAttribute('disabled');}else setTimeout(function(){if(f.gecko&&f.version>=10900||f.opera)aa.$.body.contentEditable=ad;else if(f.webkit)aa.$.body.parentNode.contentEditable=ad;else aa.$.designMode=ad?'off':'on';},0);ad&&f.gecko&&i.setTimeout(E,0,null,G);Z=G.window=new h.window(Z);aa=G.document=new k(aa);ad&&aa.on('dblclick',function(aj){var ak=aj.data.getTarget(),al={element:ak,dialog:''};G.fire('doubleclick',al);al.dialog&&G.openDialog(al.dialog);});g&&aa.on('click',function(aj){var ak=aj.data.getTarget();if(ak.is('input')){var al=ak.getAttribute('type');if(al=='submit'||al=='reset')aj.data.preventDefault();}});if(!(g||f.opera))aa.on('mousedown',function(aj){var ak=aj.data.getTarget();if(ak.is('img','hr','input','textarea','select'))G.getSelection().selectElement(ak);});if(f.gecko)aa.on('mouseup',function(aj){if(aj.data.$.button==2){var ak=aj.data.getTarget();if(!ak.getOuterHtml().replace(q,'')){var al=new h.range(aa);al.moveToElementEditStart(ak);al.select(true);}}});aa.on('click',function(aj){aj=aj.data;if(aj.getTarget().is('a')&&aj.$.button!=2)aj.preventDefault();});if(f.webkit){aa.on('mousedown',function(){ag=1;});aa.on('click',function(aj){if(aj.data.getTarget().is('input','select'))aj.data.preventDefault();});aa.on('mouseup',function(aj){if(aj.data.getTarget().is('input','textarea'))aj.data.preventDefault();});}if(ad&&g&&aa.$.compatMode=='CSS1Compat'||f.gecko||f.opera){var ae=aa.getDocumentElement();ae.on('mousedown',function(aj){if(aj.data.getTarget().equals(ae)){if(f.gecko&&f.version>=10900)N();O.focus();}});}var af=g?Q:Z;af.on('blur',function(){G.focusManager.blur();});var ag;af.on('focus',function(){var aj=G.document;if(ad&&f.gecko&&f.version>=10900)N();else if(f.opera)aj.getBody().focus();else if(f.webkit)if(!ag){G.document.getDocumentElement().focus();ag=1;}G.focusManager.focus();});var ah=G.keystrokeHandler;ah.blockedKeystrokes[8]=!ad;ah.attach(aa);if(g){aa.getDocumentElement().addClass(aa.$.compatMode);ad&&aa.on('keydown',function(aj){var ak=aj.data.getKeystroke();if(ak in{8:1,46:1}){var al=G.getSelection(),am=al.getSelectedElement();if(am){G.fire('saveSnapshot');var an=al.getRanges()[0].createBookmark();am.remove();al.selectBookmarks([an]);G.fire('saveSnapshot');aj.data.preventDefault();}}});if(aa.$.compatMode=='CSS1Compat'){var ai={33:1,34:1};aa.on('keydown',function(aj){if(aj.data.getKeystroke()in ai)setTimeout(function(){G.getSelection().scrollIntoView();},0);});}G.config.enterMode!=1&&aa.on('selectionchange',function(){var aj=aa.getBody(),ak=G.getSelection().getRanges()[0];if(aj.getHtml().match(/^<p>&nbsp;<\/p>$/i)&&ak.startContainer.equals(aj))setTimeout(function(){ak=G.getSelection().getRanges()[0];if(!ak.startContainer.equals('body')){aj.getFirst().remove(1);ak.moveToElementEditEnd(aj);ak.select(1);}},0);});}if(G.contextMenu)G.contextMenu.addTarget(aa,G.config.browserContextMenuOnCtrl!==false);setTimeout(function(){G.fire('contentDom');if(U){G.mode='wysiwyg';G.fire('mode');U=false;}R=false;if(S){G.focus();S=false;}setTimeout(function(){G.fire('dataReady');},0);try{G.document.$.execCommand('enableInlineTableEditing',false,!G.config.disableNativeTableHandles);}catch(aj){}if(G.config.disableObjectResizing)try{G.document.$.execCommand('enableObjectResizing',false,false);}catch(ak){G.document.getBody().on(g?'resizestart':'resize',function(al){al.data.preventDefault();});}if(g)setTimeout(function(){if(G.document){var al=G.document.$.body;al.runtimeStyle.marginBottom='0px';al.runtimeStyle.marginBottom='';}},1000);},0);};G.addMode('wysiwyg',{load:function(Z,aa,ab){P=Z;if(g&&f.quirks)Z.setStyle('position','relative');G.mayBeDirty=true;U=true;if(ab)this.loadSnapshotData(aa);else this.loadData(aa);},loadData:function(Z){R=true;G._.dataStore={id:1};var aa=G.config,ab=aa.fullPage,ac=aa.docType,ad='<style type="text/css" data-cke-temp="1">'+G._.styles.join('\n')+'</style>';!ab&&(ad=i.buildStyleHtml(G.config.contentsCss)+ad);var ae=aa.baseHref?'<base href="'+aa.baseHref+'" data-cke-temp="1" />':'';if(ab)Z=Z.replace(/<!DOCTYPE[^>]*>/i,function(af){G.docType=ac=af;return'';}).replace(/<\?xml\s[^\?]*\?>/i,function(af){G.xmlDeclaration=af;return'';});if(G.dataProcessor)Z=G.dataProcessor.toHtml(Z,H);if(ab){if(!/<body[\s|>]/.test(Z))Z='<body>'+Z;if(!/<html[\s|>]/.test(Z))Z='<html>'+Z+'</html>';if(!/<head[\s|>]/.test(Z))Z=Z.replace(/<html[^>]*>/,'$&<head><title></title></head>');else if(!/<title[\s|>]/.test(Z))Z=Z.replace(/<head[^>]*>/,'$&<title></title>');ae&&(Z=Z.replace(/<head>/,'$&'+ae));Z=Z.replace(/<\/head\s*>/,ad+'$&');Z=ac+Z;}else Z=aa.docType+'<html dir="'+aa.contentsLangDirection+'"'+' lang="'+(aa.contentsLanguage||G.langCode)+'">'+'<head>'+'<title>'+I+'</title>'+ae+ad+'</head>'+'<body'+(aa.bodyId?' id="'+aa.bodyId+'"':'')+(aa.bodyClass?' class="'+aa.bodyClass+'"':'')+'>'+Z+'</html>';if(f.gecko)Z=Z.replace(/<br \/>(?=\s*<\/(:?html|body)>)/,'$&<br type="_moz" />');Z+=X;this.onDispose();W(Z);},getData:function(){var Z=G.config,aa=Z.fullPage,ab=aa&&G.docType,ac=aa&&G.xmlDeclaration,ad=Q.getFrameDocument(),ae=aa?ad.getDocumentElement().getOuterHtml():ad.getBody().getHtml();if(f.gecko)ae=ae.replace(/<br>(?=\s*(:?$|<\/body>))/,'');if(G.dataProcessor)ae=G.dataProcessor.toDataFormat(ae,H);if(Z.ignoreEmptyParagraph)ae=ae.replace(q,function(af,ag){return ag;});if(ac)ae=ac+'\n'+ae;if(ab)ae=ab+'\n'+ae;return ae;},getSnapshotData:function(){return Q.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(Z){Q.getFrameDocument().getBody().setHtml(Z);},onDispose:function(){if(!G.document)return;G.document.getDocumentElement().clearCustomData();G.document.getBody().clearCustomData();G.window.clearCustomData();G.document.clearCustomData();Q.clearCustomData();Q.remove();},unload:function(Z){this.onDispose();G.window=G.document=Q=P=S=null;G.fire('contentDomUnload');},focus:function(){var Z=G.window;if(R)S=true;else if(f.opera&&G.document){var aa=G.window.$.frameElement;aa.blur(),aa.focus();G.document.getBody().focus();G.selectionChange();}else if(!f.opera&&Z){f.air?setTimeout(function(){Z.focus();},0):Z.focus();G.selectionChange();}}});G.on('insertHtml',t(u),null,null,20);G.on('insertElement',t(w),null,null,20);G.on('insertText',t(v),null,null,20);G.on('selectionChange',F,null,null,1);});var K;G.on('contentDom',function(){var P=G.document.getElementsByTag('title').getItem(0);P.data('cke-title',G.document.$.title);G.document.$.title=I;});G.on('readOnly',function(){if(G.mode=='wysiwyg'){var P=G.getMode();P.loadData(P.getData());}});if(e.document.$.documentMode>=8){G.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var L=[];for(var M in j.$removeEmpty)L.push('html.CSS1Compat '+M+'[contenteditable=false]');G.addCss(L.join(',')+'{ display:inline-block;}');}else if(f.gecko){G.addCss('html { height: 100% !important; }');G.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\twidth : 24px; height : 24px; }');}G.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');G.addCss('img, input, textarea { cursor: default;}');function N(P){if(G.readOnly)return;i.tryThese(function(){G.document.$.designMode='on';setTimeout(function(){G.document.$.designMode='off';if(e.currentInstance==G)G.document.getBody().focus();},50);},function(){G.document.$.designMode='off';var Q=G.document.getBody();Q.setAttribute('contentEditable',false);Q.setAttribute('contentEditable',true);!P&&N(1);});};if(f.gecko||g||f.opera){var O;G.on('uiReady',function(){O=G.container.append(l.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));O.on('focus',function(){G.focus();});G.focusGrabber=O;});G.on('destroy',function(){i.removeFunction(J);O.clearCustomData();delete G.focusGrabber;});}G.on('insertElement',function(P){var Q=P.data;if(Q.type==1&&(Q.is('input')||Q.is('textarea'))){if(!Q.isReadOnly())Q.data('cke-editable',Q.hasAttribute('contenteditable')?'true':'1');Q.setAttribute('contentEditable',false);}});}});if(f.gecko)(function(){var G=document.body;if(!G)window.addEventListener('load',arguments.callee,false);else{var H=G.getAttribute('onpageshow');G.setAttribute('onpageshow',(H?H+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();m.disableObjectResizing=false;m.disableNativeTableHandles=true;m.disableNativeSpellChecker=true;m.ignoreEmptyParagraph=true;e.DIALOG_RESIZE_NONE=0;e.DIALOG_RESIZE_WIDTH=1;e.DIALOG_RESIZE_HEIGHT=2;e.DIALOG_RESIZE_BOTH=3;(function(){var q=i.cssLength;function r(W){return!!this._.tabs[W][0].$.offsetHeight;};function s(){var aa=this;var W=aa._.currentTabId,X=aa._.tabIdList.length,Y=i.indexOf(aa._.tabIdList,W)+X;for(var Z=Y-1;Z>Y-X;Z--){if(r.call(aa,aa._.tabIdList[Z%X]))return aa._.tabIdList[Z%X];}return null;};function t(){var aa=this;var W=aa._.currentTabId,X=aa._.tabIdList.length,Y=i.indexOf(aa._.tabIdList,W);for(var Z=Y+1;Z<Y+X;Z++){if(r.call(aa,aa._.tabIdList[Z%X]))return aa._.tabIdList[Z%X];}return null;};function u(W,X){var Y=W.$.getElementsByTagName('input');for(var Z=0,aa=Y.length;Z<aa;Z++){var ab=new l(Y[Z]);if(ab.getAttribute('type').toLowerCase()=='text')if(X){ab.setAttribute('value',ab.getCustomData('fake_value')||'');ab.removeCustomData('fake_value');}else{ab.setCustomData('fake_value',ab.getAttribute('value'));ab.setAttribute('value','');}}};function v(W,X){var Z=this;var Y=Z.getInputElement();if(Y)W?Y.removeAttribute('aria-invalid'):Y.setAttribute('aria-invalid',true);if(!W)if(Z.select)Z.select();else Z.focus();X&&alert(X);Z.fire('validated',{valid:W,msg:X});};function w(){var W=this.getInputElement();W&&W.removeAttribute('aria-invalid');};e.dialog=function(W,X){var Y=e.dialog._.dialogDefinitions[X],Z=i.clone(y),aa=W.config.dialog_buttonsOrder||'OS',ab=W.lang.dir;if(aa=='OS'&&f.mac||aa=='rtl'&&ab=='ltr'||aa=='ltr'&&ab=='rtl')Z.buttons.reverse();Y=i.extend(Y(W),Z);Y=i.clone(Y);Y=new C(this,Y);var ac=e.document,ad=W.theme.buildDialog(W);this._={editor:W,element:ad.element,name:X,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=ad.parts;i.setTimeout(function(){W.fire('ariaWidget',this.parts.contents);},0,this);var ae={position:f.ie6Compat?'absolute':'fixed',top:0,visibility:'hidden'};ae[ab=='rtl'?'right':'left']=0;this.parts.dialog.setStyles(ae);e.event.call(this);this.definition=Y=e.fire('dialogDefinition',{name:X,definition:Y},W).definition;var af={};if(!('removeDialogTabs'in W._)&&W.config.removeDialogTabs){var ag=W.config.removeDialogTabs.split(';');for(i=0;i<ag.length;i++){var ah=ag[i].split(':');if(ah.length==2){var ai=ah[0];if(!af[ai])af[ai]=[];af[ai].push(ah[1]);}}W._.removeDialogTabs=af;}if(W._.removeDialogTabs&&(af=W._.removeDialogTabs[X]))for(i=0;i<af.length;i++)Y.removeContents(af[i]);if(Y.onLoad)this.on('load',Y.onLoad);if(Y.onShow)this.on('show',Y.onShow);if(Y.onHide)this.on('hide',Y.onHide);if(Y.onOk)this.on('ok',function(av){W.fire('saveSnapshot');setTimeout(function(){W.fire('saveSnapshot');},0);if(Y.onOk.call(this,av)===false)av.data.hide=false;});if(Y.onCancel)this.on('cancel',function(av){if(Y.onCancel.call(this,av)===false)av.data.hide=false;});var aj=this,ak=function(av){var aw=aj._.contents,ax=false;for(var ay in aw)for(var az in aw[ay]){ax=av.call(this,aw[ay][az]);if(ax)return;}};this.on('ok',function(av){ak(function(aw){if(aw.validate){var ax=aw.validate(this),ay=typeof ax=='string'||ax===false;if(ay){av.data.hide=false;av.stop();}v.call(aw,!ay,typeof ax=='string'?ax:undefined);return ay;}});},this,null,0);this.on('cancel',function(av){ak(function(aw){if(aw.isChanged()){if(!confirm(W.lang.common.confirmCancel))av.data.hide=false;return true;}});},this,null,0);this.parts.close.on('click',function(av){if(this.fire('cancel',{hide:true}).hide!==false)this.hide();av.data.preventDefault();},this);function al(){var av=aj._.focusList;av.sort(function(ay,az){if(ay.tabIndex!=az.tabIndex)return az.tabIndex-ay.tabIndex;else return ay.focusIndex-az.focusIndex;});var aw=av.length;for(var ax=0;ax<aw;ax++)av[ax].focusIndex=ax;};function am(av){var aw=aj._.focusList,ax=av?1:-1;if(aw.length<1)return;var ay=aj._.currentFocusIndex;try{aw[ay].getInputElement().$.blur();}catch(aB){}var az=(ay+ax+aw.length)%aw.length,aA=az;while(!aw[aA].isFocusable()){aA=(aA+ax+aw.length)%aw.length;if(aA==az)break;}aw[aA].focus();if(aw[aA].type=='text')aw[aA].select();};this.changeFocus=am;var an;function ao(av){var aA=this;if(aj!=e.dialog._.currentTop)return;var aw=av.data.getKeystroke(),ax=W.lang.dir=='rtl';an=0;if(aw==9||aw==2228224+9){var ay=aw==2228224+9;if(aj._.tabBarMode){var az=ay?s.call(aj):t.call(aj);aj.selectPage(az);aj._.tabs[az][0].focus();}else am(!ay);an=1;}else if(aw==4456448+121&&!aj._.tabBarMode&&aj.getPageCount()>1){aj._.tabBarMode=true;aj._.tabs[aj._.currentTabId][0].focus();an=1;}else if((aw==37||aw==39)&&aj._.tabBarMode){az=aw==(ax?39:37)?s.call(aj):t.call(aj);aj.selectPage(az);aj._.tabs[az][0].focus();an=1;}else if((aw==13||aw==32)&&aj._.tabBarMode){aA.selectPage(aA._.currentTabId);aA._.tabBarMode=false;aA._.currentFocusIndex=-1;am(true);an=1;}if(an){av.stop();av.data.preventDefault();}};function ap(av){an&&av.data.preventDefault();};var aq=this._.element;this.on('show',function(){aq.on('keydown',ao,this,null,0);if(f.opera||f.gecko&&f.mac)aq.on('keypress',ap,this);});this.on('hide',function(){aq.removeListener('keydown',ao);if(f.opera||f.gecko&&f.mac)aq.removeListener('keypress',ap);ak(function(av){w.apply(av);});});this.on('iframeAdded',function(av){var aw=new k(av.data.iframe.$.contentWindow.document);aw.on('keydown',ao,this,null,0);});this.on('show',function(){var az=this;al();if(W.config.dialog_startupFocusTab&&aj._.pageCount>1){aj._.tabBarMode=true;aj._.tabs[aj._.currentTabId][0].focus();}else if(!az._.hasFocus){az._.currentFocusIndex=-1;if(Y.onFocus){var av=Y.onFocus.call(az);av&&av.focus();}else am(true);if(az._.editor.mode=='wysiwyg'&&g){var aw=W.document.$.selection,ax=aw.createRange();if(ax)if(ax.parentElement&&ax.parentElement().ownerDocument==W.document.$||ax.item&&ax.item(0).ownerDocument==W.document.$){var ay=document.body.createTextRange();ay.moveToElementText(az.getElement().getFirst().$);ay.collapse(true);ay.select();}}}},this,null,4294967295);if(f.ie6Compat)this.on('load',function(av){var aw=this.getElement(),ax=aw.getFirst();ax.remove();ax.appendTo(aw);},this);E(this);F(this);new h.text(Y.title,e.document).appendTo(this.parts.title);for(var ar=0;ar<Y.contents.length;ar++){var as=Y.contents[ar];as&&this.addPage(as);}this.parts.tabs.on('click',function(av){var ay=this;var aw=av.data.getTarget();if(aw.hasClass('cke_dialog_tab')){var ax=aw.$.id;ay.selectPage(ax.substring(4,ax.lastIndexOf('_')));if(ay._.tabBarMode){ay._.tabBarMode=false;ay._.currentFocusIndex=-1;am(true);}av.data.preventDefault();}},this);var at=[],au=e.dialog._.uiElementBuilders.hbox.build(this,{type:'hbox',className:'cke_dialog_footer_buttons',widths:[],children:Y.buttons},at).getChild();this.parts.footer.setHtml(at.join(''));for(ar=0;ar<au.length;ar++)this._.buttons[au[ar].id]=au[ar];};function x(W,X,Y){this.element=X;this.focusIndex=Y;this.tabIndex=0;this.isFocusable=function(){return!X.getAttribute('disabled')&&X.isVisible();};this.focus=function(){W._.currentFocusIndex=this.focusIndex;this.element.focus();};X.on('keydown',function(Z){if(Z.data.getKeystroke()in{32:1,13:1})this.fire('click');});X.on('focus',function(){this.fire('mouseover');});X.on('blur',function(){this.fire('mouseout');});};e.dialog.prototype={destroy:function(){this.hide();this._.element.remove();},resize:(function(){return function(W,X){var Y=this;if(Y._.contentSize&&Y._.contentSize.width==W&&Y._.contentSize.height==X)return;e.dialog.fire('resize',{dialog:Y,skin:Y._.editor.skinName,width:W,height:X},Y._.editor);Y.fire('resize',{skin:Y._.editor.skinName,width:W,height:X},Y._.editor);if(Y._.editor.lang.dir=='rtl'&&Y._.position)Y._.position.x=e.document.getWindow().getViewPaneSize().width-Y._.contentSize.width-parseInt(Y._.element.getFirst().getStyle('right'),10);Y._.contentSize={width:W,height:X};};})(),getSize:function(){var W=this._.element.getFirst();return{width:W.$.offsetWidth||0,height:W.$.offsetHeight||0};},move:(function(){var W;return function(X,Y,Z){var ag=this;var aa=ag._.element.getFirst(),ab=ag._.editor.lang.dir=='rtl';if(W===undefined)W=aa.getComputedStyle('position')=='fixed';if(W&&ag._.position&&ag._.position.x==X&&ag._.position.y==Y)return;ag._.position={x:X,y:Y};if(!W){var ac=e.document.getWindow().getScrollPosition();X+=ac.x;Y+=ac.y;}if(ab){var ad=ag.getSize(),ae=e.document.getWindow().getViewPaneSize();X=ae.width-ad.width-X;}var af={top:(Y>0?Y:0)+'px'};af[ab?'right':'left']=(X>0?X:0)+'px';aa.setStyles(af);Z&&(ag._.moved=1);};})(),getPosition:function(){return i.extend({},this._.position);},show:function(){var W=this._.element,X=this.definition;if(!(W.getParent()&&W.getParent().equals(e.document.getBody())))W.appendTo(e.document.getBody());else W.setStyle('display','block');if(f.gecko&&f.version<10900){var Y=this.parts.dialog;Y.setStyle('position','absolute');setTimeout(function(){Y.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||X.width||X.minWidth,this._.contentSize&&this._.contentSize.height||X.height||X.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(e.dialog._.currentZIndex===null)e.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',e.dialog._.currentZIndex+=10);if(e.dialog._.currentTop===null){e.dialog._.currentTop=this;this._.parentDialog=null;K(this._.editor);W.on('keydown',O);W.on(f.opera?'keypress':'keyup',P);for(var Z in{keyup:1,keydown:1,keypress:1})W.on(Z,V);}else{this._.parentDialog=e.dialog._.currentTop;var aa=this._.parentDialog.getElement().getFirst();aa.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);e.dialog._.currentTop=this;}Q(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;i.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});o.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(ab){ab.setInitValue&&ab.setInitValue();});},100,this);},layout:function(){var Y=this;var W=e.document.getWindow().getViewPaneSize(),X=Y.getSize();Y.move(Y._.moved?Y._.position.x:(W.width-X.width)/2,Y._.moved?Y._.position.y:(W.height-X.height)/2);},foreach:function(W){var Z=this;for(var X in Z._.contents)for(var Y in Z._.contents[X])W.call(Z,Z._.contents[X][Y]);return Z;},reset:(function(){var W=function(X){if(X.reset)X.reset(1);};return function(){this.foreach(W);return this;};})(),setupContent:function(){var W=arguments;this.foreach(function(X){if(X.setup)X.setup.apply(X,W);});},commitContent:function(){var W=arguments;this.foreach(function(X){if(g&&this._.currentFocusIndex==X.focusIndex)X.getInputElement().$.blur();if(X.commit)X.commit.apply(X,W);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var W=this._.element;W.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');R(this);while(e.dialog._.currentTop!=this)e.dialog._.currentTop.hide();if(!this._.parentDialog)L();else{var X=this._.parentDialog.getElement().getFirst();X.setStyle('z-index',parseInt(X.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}e.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){e.dialog._.currentZIndex=null;W.removeListener('keydown',O);W.removeListener(f.opera?'keypress':'keyup',P);for(var Y in{keyup:1,keydown:1,keypress:1})W.removeListener(Y,V);var Z=this._.editor;Z.focus();if(Z.mode=='wysiwyg'&&g){var aa=Z.getSelection();aa&&aa.unlock(true);}}else e.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(ab){ab.resetInitValue&&ab.resetInitValue();});},addPage:function(W){var ai=this;var X=[],Y=W.label?' title="'+i.htmlEncode(W.label)+'"':'',Z=W.elements,aa=e.dialog._.uiElementBuilders.vbox.build(ai,{type:'vbox',className:'cke_dialog_page_contents',children:W.elements,expand:!!W.expand,padding:W.padding,style:W.style||'width: 100%;height:100%'},X),ab=l.createFromHtml(X.join(''));ab.setAttribute('role','tabpanel');var ac=f,ad='cke_'+W.id+'_'+i.getNextNumber(),ae=l.createFromHtml(['<a class="cke_dialog_tab"',ai._.pageCount>0?' cke_last':'cke_first',Y,!!W.hidden?' style="display:none"':'',' id="',ad,'"',ac.gecko&&ac.version>=10900&&!ac.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',W.label,'</a>'].join(''));ab.setAttribute('aria-labelledby',ad);ai._.tabs[W.id]=[ae,ab];ai._.tabIdList.push(W.id);!W.hidden&&ai._.pageCount++;ai._.lastTab=ae;ai.updateStyle();var af=ai._.contents[W.id]={},ag,ah=aa.getChild();while(ag=ah.shift()){af[ag.id]=ag;if(typeof ag.getChild=='function')ah.push.apply(ah,ag.getChild());}ab.setAttribute('name',W.id);ab.appendTo(ai.parts.contents);ae.unselectable();ai.parts.tabs.append(ae);if(W.accessKey){Q(ai,ai,'CTRL+'+W.accessKey,T,S);ai._.accessKeyMap['CTRL+'+W.accessKey]=W.id;}},selectPage:function(W){if(this._.currentTabId==W)return;if(this.fire('selectPage',{page:W,currentPage:this._.currentTabId})===true)return;for(var X in this._.tabs){var Y=this._.tabs[X][0],Z=this._.tabs[X][1];if(X!=W){Y.removeClass('cke_dialog_tab_selected');Z.hide();}Z.setAttribute('aria-hidden',X!=W);}var aa=this._.tabs[W];aa[0].addClass('cke_dialog_tab_selected');if(f.ie6Compat||f.ie7Compat){u(aa[1]);aa[1].show();setTimeout(function(){u(aa[1],1);},0);}else aa[1].show();this._.currentTabId=W;this._.currentTabIndex=i.indexOf(this._.tabIdList,W);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(W){var Y=this;var X=Y._.tabs[W]&&Y._.tabs[W][0];if(!X||Y._.pageCount==1||!X.isVisible())return;else if(W==Y._.currentTabId)Y.selectPage(s.call(Y));X.hide();Y._.pageCount--;Y.updateStyle();},showPage:function(W){var Y=this;var X=Y._.tabs[W]&&Y._.tabs[W][0];if(!X)return;X.show();Y._.pageCount++;Y.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(W,X){var Y=this._.contents[W];return Y&&Y[X];},getValueOf:function(W,X){return this.getContentElement(W,X).getValue();},setValueOf:function(W,X,Y){return this.getContentElement(W,X).setValue(Y);},getButton:function(W){return this._.buttons[W];},click:function(W){return this._.buttons[W].click();},disableButton:function(W){return this._.buttons[W].disable();},enableButton:function(W){return this._.buttons[W].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(W,X){var Z=this;if(typeof X=='undefined'){X=Z._.focusList.length;Z._.focusList.push(new x(Z,W,X));}else{Z._.focusList.splice(X,0,new x(Z,W,X));for(var Y=X+1;Y<Z._.focusList.length;Y++)Z._.focusList[Y].focusIndex++;}}};i.extend(e.dialog,{add:function(W,X){if(!this._.dialogDefinitions[W]||typeof X=='function')this._.dialogDefinitions[W]=X;},exists:function(W){return!!this._.dialogDefinitions[W];},getCurrent:function(){return e.dialog._.currentTop;},okButton:(function(){var W=function(X,Y){Y=Y||{};return i.extend({id:'ok',type:'button',label:X.lang.common.ok,'class':'cke_dialog_ui_button_ok',onClick:function(Z){var aa=Z.data.dialog;if(aa.fire('ok',{hide:true}).hide!==false)aa.hide();}},Y,true);};W.type='button';W.override=function(X){return i.extend(function(Y){return W(Y,X);},{type:'button'},true);};return W;})(),cancelButton:(function(){var W=function(X,Y){Y=Y||{};return i.extend({id:'cancel',type:'button',label:X.lang.common.cancel,'class':'cke_dialog_ui_button_cancel',onClick:function(Z){var aa=Z.data.dialog;if(aa.fire('cancel',{hide:true}).hide!==false)aa.hide();}},Y,true);};W.type='button';W.override=function(X){return i.extend(function(Y){return W(Y,X);},{type:'button'},true);};return W;})(),addUIElement:function(W,X){this._.uiElementBuilders[W]=X;}});e.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};e.event.implementOn(e.dialog);e.event.implementOn(e.dialog.prototype,true);var y={resizable:3,minWidth:600,minHeight:400,buttons:[e.dialog.okButton,e.dialog.cancelButton]},z=function(W,X,Y){for(var Z=0,aa;aa=W[Z];Z++){if(aa.id==X)return aa;if(Y&&aa[Y]){var ab=z(aa[Y],X,Y);if(ab)return ab;}}return null;},A=function(W,X,Y,Z,aa){if(Y){for(var ab=0,ac;ac=W[ab];ab++){if(ac.id==Y){W.splice(ab,0,X);return X;}if(Z&&ac[Z]){var ad=A(ac[Z],X,Y,Z,true);if(ad)return ad;}}if(aa)return null;}W.push(X);return X;},B=function(W,X,Y){for(var Z=0,aa;aa=W[Z];Z++){if(aa.id==X)return W.splice(Z,1);if(Y&&aa[Y]){var ab=B(aa[Y],X,Y);if(ab)return ab;}}return null;},C=function(W,X){this.dialog=W;var Y=X.contents;for(var Z=0,aa;aa=Y[Z];Z++)Y[Z]=aa&&new D(W,aa);i.extend(this,X);};C.prototype={getContents:function(W){return z(this.contents,W);},getButton:function(W){return z(this.buttons,W);},addContents:function(W,X){return A(this.contents,W,X);},addButton:function(W,X){return A(this.buttons,W,X);},removeContents:function(W){B(this.contents,W);},removeButton:function(W){B(this.buttons,W);}};function D(W,X){this._={dialog:W};i.extend(this,X);};D.prototype={get:function(W){return z(this.elements,W,'children');},add:function(W,X){return A(this.elements,W,X,'children');},remove:function(W){B(this.elements,W,'children');}};function E(W){var X=null,Y=null,Z=W.getElement().getFirst(),aa=W.getParentEditor(),ab=aa.config.dialog_magnetDistance,ac=aa.skin.margins||[0,0,0,0];if(typeof ab=='undefined')ab=20;function ad(af){var ag=W.getSize(),ah=e.document.getWindow().getViewPaneSize(),ai=af.data.$.screenX,aj=af.data.$.screenY,ak=ai-X.x,al=aj-X.y,am,an;X={x:ai,y:aj};Y.x+=ak;Y.y+=al;if(Y.x+ac[3]<ab)am=-ac[3];else if(Y.x-ac[1]>ah.width-ag.width-ab)am=ah.width-ag.width+(aa.lang.dir=='rtl'?0:ac[1]);else am=Y.x;if(Y.y+ac[0]<ab)an=-ac[0];else if(Y.y-ac[2]>ah.height-ag.height-ab)an=ah.height-ag.height+ac[2];else an=Y.y;W.move(am,an,1);af.data.preventDefault();};function ae(af){e.document.removeListener('mousemove',ad);e.document.removeListener('mouseup',ae);if(f.ie6Compat){var ag=I.getChild(0).getFrameDocument();ag.removeListener('mousemove',ad);ag.removeListener('mouseup',ae);}};W.parts.title.on('mousedown',function(af){X={x:af.data.$.screenX,y:af.data.$.screenY};e.document.on('mousemove',ad);e.document.on('mouseup',ae);Y=W.getPosition();if(f.ie6Compat){var ag=I.getChild(0).getFrameDocument();ag.on('mousemove',ad);ag.on('mouseup',ae);}af.data.preventDefault();},W);};function F(W){var X=W.definition,Y=X.resizable;if(Y==0)return;var Z=W.getParentEditor(),aa,ab,ac,ad,ae,af,ag=i.addFunction(function(aj){ae=W.getSize();var ak=W.parts.contents,al=ak.$.getElementsByTagName('iframe').length;if(al){af=l.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');ak.append(af);}ab=ae.height-W.parts.contents.getSize('height',!(f.gecko||f.opera||g&&f.quirks));aa=ae.width-W.parts.contents.getSize('width',1);ad={x:aj.screenX,y:aj.screenY};ac=e.document.getWindow().getViewPaneSize();e.document.on('mousemove',ah);e.document.on('mouseup',ai);if(f.ie6Compat){var am=I.getChild(0).getFrameDocument();am.on('mousemove',ah);am.on('mouseup',ai);}aj.preventDefault&&aj.preventDefault();});W.on('load',function(){var aj='';if(Y==1)aj=' cke_resizer_horizontal';else if(Y==2)aj=' cke_resizer_vertical';var ak=l.createFromHtml('<div class="cke_resizer'+aj+' cke_resizer_'+Z.lang.dir+'"'+' title="'+i.htmlEncode(Z.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+ag+', event )"></div>');W.parts.footer.append(ak,1);});Z.on('destroy',function(){i.removeFunction(ag);});function ah(aj){var ak=Z.lang.dir=='rtl',al=(aj.data.$.screenX-ad.x)*(ak?-1:1),am=aj.data.$.screenY-ad.y,an=ae.width,ao=ae.height,ap=an+al*(W._.moved?1:2),aq=ao+am*(W._.moved?1:2),ar=W._.element.getFirst(),as=ak&&ar.getComputedStyle('right'),at=W.getPosition();if(at.y+aq>ac.height)aq=ac.height-at.y;if((ak?as:at.x)+ap>ac.width)ap=ac.width-(ak?as:at.x);if(Y==1||Y==3)an=Math.max(X.minWidth||0,ap-aa);if(Y==2||Y==3)ao=Math.max(X.minHeight||0,aq-ab);W.resize(an,ao);if(!W._.moved)W.layout();aj.data.preventDefault();};function ai(){e.document.removeListener('mouseup',ai);e.document.removeListener('mousemove',ah);if(af){af.remove();af=null;}if(f.ie6Compat){var aj=I.getChild(0).getFrameDocument();aj.removeListener('mouseup',ai);aj.removeListener('mousemove',ah);}};};var G,H={},I;function J(W){W.data.preventDefault(1);};function K(W){var X=e.document.getWindow(),Y=W.config,Z=Y.dialog_backgroundCoverColor||'white',aa=Y.dialog_backgroundCoverOpacity,ab=Y.baseFloatZIndex,ac=i.genKey(Z,aa,ab),ad=H[ac];if(!ad){var ae=['<div tabIndex="-1" style="position: ',f.ie6Compat?'absolute':'fixed','; z-index: ',ab,'; top: 0px; left: 0px; ',!f.ie6Compat?'background-color: '+Z:'','" class="cke_dialog_background_cover">'];if(f.ie6Compat){var af=f.isCustomDomain(),ag="<html><body style=\\'background-color:"+Z+";\\'></body></html>";ae.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');ae.push('void((function(){document.open();'+(af?"document.domain='"+document.domain+"';":'')+"document.write( '"+ag+"' );"+'document.close();'+'})())');ae.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>');}ae.push('</div>');ad=l.createFromHtml(ae.join(''));ad.setOpacity(aa!=undefined?aa:0.5);ad.on('keydown',J);ad.on('keypress',J);ad.on('keyup',J);ad.appendTo(e.document.getBody());H[ac]=ad;}else ad.show();I=ad;var ah=function(){var ak=X.getViewPaneSize();ad.setStyles({width:ak.width+'px',height:ak.height+'px'});},ai=function(){var ak=X.getScrollPosition(),al=e.dialog._.currentTop;ad.setStyles({left:ak.x+'px',top:ak.y+'px'});if(al)do{var am=al.getPosition();al.move(am.x,am.y);}while(al=al._.parentDialog)};G=ah;X.on('resize',ah);ah();if(!(f.mac&&f.webkit))ad.focus();if(f.ie6Compat){var aj=function(){ai();arguments.callee.prevScrollHandler.apply(this,arguments);};X.$.setTimeout(function(){aj.prevScrollHandler=window.onscroll||(function(){});window.onscroll=aj;},0);ai();}};function L(){if(!I)return;var W=e.document.getWindow();I.hide();W.removeListener('resize',G);if(f.ie6Compat)W.$.setTimeout(function(){var X=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=X||null;},0);G=null;};function M(){for(var W in H)H[W].remove();H={};};var N={},O=function(W){var X=W.data.$.ctrlKey||W.data.$.metaKey,Y=W.data.$.altKey,Z=W.data.$.shiftKey,aa=String.fromCharCode(W.data.$.keyCode),ab=N[(X?'CTRL+':'')+(Y?'ALT+':'')+(Z?'SHIFT+':'')+aa];if(!ab||!ab.length)return;ab=ab[ab.length-1];ab.keydown&&ab.keydown.call(ab.uiElement,ab.dialog,ab.key);W.data.preventDefault();},P=function(W){var X=W.data.$.ctrlKey||W.data.$.metaKey,Y=W.data.$.altKey,Z=W.data.$.shiftKey,aa=String.fromCharCode(W.data.$.keyCode),ab=N[(X?'CTRL+':'')+(Y?'ALT+':'')+(Z?'SHIFT+':'')+aa];if(!ab||!ab.length)return;ab=ab[ab.length-1];if(ab.keyup){ab.keyup.call(ab.uiElement,ab.dialog,ab.key);W.data.preventDefault();}},Q=function(W,X,Y,Z,aa){var ab=N[Y]||(N[Y]=[]);ab.push({uiElement:W,dialog:X,key:Y,keyup:aa||W.accessKeyUp,keydown:Z||W.accessKeyDown});},R=function(W){for(var X in N){var Y=N[X];for(var Z=Y.length-1;Z>=0;Z--){if(Y[Z].dialog==W||Y[Z].uiElement==W)Y.splice(Z,1);}if(Y.length===0)delete N[X];}},S=function(W,X){if(W._.accessKeyMap[X])W.selectPage(W._.accessKeyMap[X]);},T=function(W,X){},U={27:1,13:1},V=function(W){if(W.data.getKeystroke()in U)W.data.stopPropagation();};(function(){o.dialog={uiElement:function(W,X,Y,Z,aa,ab,ac){if(arguments.length<4)return;var ad=(Z.call?Z(X):Z)||'div',ae=['<',ad,' '],af=(aa&&aa.call?aa(X):aa)||{},ag=(ab&&ab.call?ab(X):ab)||{},ah=(ac&&ac.call?ac.call(this,W,X):ac)||'',ai=this.domId=ag.id||i.getNextId()+'_uiElement',aj=this.id=X.id,ak;ag.id=ai;var al={};if(X.type)al['cke_dialog_ui_'+X.type]=1;if(X.className)al[X.className]=1;if(X.disabled)al.cke_disabled=1;var am=ag['class']&&ag['class'].split?ag['class'].split(' '):[];for(ak=0;ak<am.length;ak++){if(am[ak])al[am[ak]]=1;}var an=[];for(ak in al)an.push(ak);ag['class']=an.join(' ');if(X.title)ag.title=X.title;var ao=(X.style||'').split(';');if(X.align){var ap=X.align;af['margin-left']=ap=='left'?0:'auto';af['margin-right']=ap=='right'?0:'auto';}for(ak in af)ao.push(ak+':'+af[ak]);if(X.hidden)ao.push('display:none');for(ak=ao.length-1;ak>=0;ak--){if(ao[ak]==='')ao.splice(ak,1);}if(ao.length>0)ag.style=(ag.style?ag.style+'; ':'')+ao.join('; ');for(ak in ag)ae.push(ak+'="'+i.htmlEncode(ag[ak])+'" ');ae.push('>',ah,'</',ad,'>');Y.push(ae.join(''));(this._||(this._={})).dialog=W;if(typeof X.isChanged=='boolean')this.isChanged=function(){return X.isChanged;};if(typeof X.isChanged=='function')this.isChanged=X.isChanged;if(typeof X.setValue=='function')this.setValue=i.override(this.setValue,function(ar){return function(as){ar.call(this,X.setValue.call(this,as));};});if(typeof X.getValue=='function')this.getValue=i.override(this.getValue,function(ar){return function(){return X.getValue.call(this,ar.call(this));};});e.event.implementOn(this);this.registerEvents(X);if(this.accessKeyUp&&this.accessKeyDown&&X.accessKey)Q(this,W,'CTRL+'+X.accessKey);var aq=this;W.on('load',function(){if(aq.getInputElement())aq.getInputElement().on('focus',function(){W._.tabBarMode=false;W._.hasFocus=true;aq.fire('focus');},aq);});if(this.keyboardFocusable){this.tabIndex=X.tabIndex||0;this.focusIndex=W._.focusList.push(this)-1;this.on('focus',function(){W._.currentFocusIndex=aq.focusIndex;});}i.extend(this,X);},hbox:function(W,X,Y,Z,aa){if(arguments.length<4)return;this._||(this._={});var ab=this._.children=X,ac=aa&&aa.widths||null,ad=aa&&aa.height||null,ae={},af,ag=function(){var ai=['<tbody><tr class="cke_dialog_ui_hbox">'];for(af=0;af<Y.length;af++){var aj='cke_dialog_ui_hbox_child',ak=[];if(af===0)aj='cke_dialog_ui_hbox_first';if(af==Y.length-1)aj='cke_dialog_ui_hbox_last';ai.push('<td class="',aj,'" role="presentation" ');if(ac){if(ac[af])ak.push('width:'+q(ac[af]));}else ak.push('width:'+Math.floor(100/Y.length)+'%');if(ad)ak.push('height:'+q(ad));if(aa&&aa.padding!=undefined)ak.push('padding:'+q(aa.padding));if(g&&f.quirks&&ab[af].align)ak.push('text-align:'+ab[af].align);if(ak.length>0)ai.push('style="'+ak.join('; ')+'" ');ai.push('>',Y[af],'</td>');}ai.push('</tr></tbody>');return ai.join('');},ah={role:'presentation'};aa&&aa.align&&(ah.align=aa.align);o.dialog.uiElement.call(this,W,aa||{type:'hbox'},Z,'table',ae,ah,ag);},vbox:function(W,X,Y,Z,aa){if(arguments.length<3)return;this._||(this._={});var ab=this._.children=X,ac=aa&&aa.width||null,ad=aa&&aa.heights||null,ae=function(){var af=['<table role="presentation" cellspacing="0" border="0" '];af.push('style="');if(aa&&aa.expand)af.push('height:100%;');af.push('width:'+q(ac||'100%'),';');af.push('"');af.push('align="',i.htmlEncode(aa&&aa.align||(W.getParentEditor().lang.dir=='ltr'?'left':'right')),'" ');af.push('><tbody>');for(var ag=0;ag<Y.length;ag++){var ah=[];af.push('<tr><td role="presentation" ');if(ac)ah.push('width:'+q(ac||'100%'));if(ad)ah.push('height:'+q(ad[ag]));else if(aa&&aa.expand)ah.push('height:'+Math.floor(100/Y.length)+'%');if(aa&&aa.padding!=undefined)ah.push('padding:'+q(aa.padding));if(g&&f.quirks&&ab[ag].align)ah.push('text-align:'+ab[ag].align);if(ah.length>0)af.push('style="',ah.join('; '),'" ');af.push(' class="cke_dialog_ui_vbox_child">',Y[ag],'</td></tr>');}af.push('</tbody></table>');return af.join('');};o.dialog.uiElement.call(this,W,aa||{type:'vbox'},Z,'div',null,{role:'presentation'},ae);}};})();o.dialog.uiElement.prototype={getElement:function(){return e.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(W,X){this.getInputElement().setValue(W);!X&&this.fire('change',{value:W});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var Z=this;var W=Z.getInputElement(),X=W,Y;while((X=X.getParent())&&X.$.className.search('cke_dialog_page_contents')==-1){}if(!X)return Z;Y=X.getAttribute('name');if(Z._.dialog._.currentTabId!=Y)Z._.dialog.selectPage(Y);return Z;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(W){var X=/^on([A-Z]\w+)/,Y,Z=function(ab,ac,ad,ae){ac.on('load',function(){ab.getInputElement().on(ad,ae,ab);});};for(var aa in W){if(!(Y=aa.match(X)))continue;if(this.eventProcessors[aa])this.eventProcessors[aa].call(this,this._.dialog,W[aa]);else Z(this,this._.dialog,Y[1].toLowerCase(),W[aa]);}return this;},eventProcessors:{onLoad:function(W,X){W.on('load',X,this);},onShow:function(W,X){W.on('show',X,this);},onHide:function(W,X){W.on('hide',X,this);}},accessKeyDown:function(W,X){this.focus();},accessKeyUp:function(W,X){},disable:function(){var W=this.getElement(),X=this.getInputElement();X.setAttribute('disabled','true');W.addClass('cke_disabled');},enable:function(){var W=this.getElement(),X=this.getInputElement();X.removeAttribute('disabled');W.removeClass('cke_disabled');},isEnabled:function(){return!this.getElement().hasClass('cke_disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};o.dialog.hbox.prototype=i.extend(new o.dialog.uiElement(),{getChild:function(W){var X=this;if(arguments.length<1)return X._.children.concat();if(!W.splice)W=[W];if(W.length<2)return X._.children[W[0]];else return X._.children[W[0]]&&X._.children[W[0]].getChild?X._.children[W[0]].getChild(W.slice(1,W.length)):null;}},true);o.dialog.vbox.prototype=new o.dialog.hbox();(function(){var W={build:function(X,Y,Z){var aa=Y.children,ab,ac=[],ad=[];for(var ae=0;ae<aa.length&&(ab=aa[ae]);ae++){var af=[];ac.push(af);ad.push(e.dialog._.uiElementBuilders[ab.type].build(X,ab,af));}return new o.dialog[Y.type](X,ad,ac,Z,Y);}};e.dialog.addUIElement('hbox',W);e.dialog.addUIElement('vbox',W);})();e.dialogCommand=function(W){this.dialogName=W;};e.dialogCommand.prototype={exec:function(W){W.openDialog(this.dialogName);},canUndo:false,editorFocus:g||f.webkit};(function(){var W=/^([a]|[^a])+$/,X=/^\d*$/,Y=/^\d*(?:\.\d+)?$/,Z=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,aa=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i;e.VALIDATE_OR=1;e.VALIDATE_AND=2;e.dialog.validate={functions:function(){var ab=arguments;return function(){var ac=this&&this.getValue?this.getValue():ab[0],ad=undefined,ae=2,af=[],ag;for(ag=0;ag<ab.length;ag++){if(typeof ab[ag]=='function')af.push(ab[ag]);else break;}if(ag<ab.length&&typeof ab[ag]=='string'){ad=ab[ag];ag++;}if(ag<ab.length&&typeof ab[ag]=='number')ae=ab[ag];var ah=ae==2?true:false;for(ag=0;ag<af.length;ag++){if(ae==2)ah=ah&&af[ag](ac);else ah=ah||af[ag](ac);}return!ah?ad:true;};},regex:function(ab,ac){return function(){var ad=this&&this.getValue?this.getValue():arguments[0];return!ab.test(ad)?ac:true;};},notEmpty:function(ab){return this.regex(W,ab);},integer:function(ab){return this.regex(X,ab);},number:function(ab){return this.regex(Y,ab);},cssLength:function(ab){return this.functions(function(ac){return aa.test(i.trim(ac));},ab);},htmlLength:function(ab){return this.functions(function(ac){return Z.test(i.trim(ac));},ab);},equals:function(ab,ac){return this.functions(function(ad){return ad==ab;},ac);},notEqual:function(ab,ac){return this.functions(function(ad){return ad!=ab;},ac);}};e.on('instanceDestroyed',function(ab){if(i.isEmpty(e.instances)){var ac;while(ac=e.dialog._.currentTop)ac.hide();M();}var ad=ab.editor._.storedDialogs;for(var ae in ad)ad[ae].destroy();});})();i.extend(e.editor.prototype,{openDialog:function(W,X){if(this.mode=='wysiwyg'&&g){var Y=this.getSelection();Y&&Y.lock();}var Z=e.dialog._.dialogDefinitions[W],aa=this.skin.dialog;if(e.dialog._.currentTop===null)K(this);if(typeof Z=='function'&&aa._isLoaded){var ab=this._.storedDialogs||(this._.storedDialogs={}),ac=ab[W]||(ab[W]=new e.dialog(this,W));X&&X.call(ac,ac);ac.show();return ac;}else if(Z=='failed'){L();throw new Error('[CKEDITOR.dialog.openDialog] Dialog "'+W+'" failed when loading definition.');}var ad=this;function ae(ag){var ah=e.dialog._.dialogDefinitions[W],ai=ad.skin.dialog;if(!ai._isLoaded||af&&typeof ag=='undefined')return;if(typeof ah!='function')e.dialog._.dialogDefinitions[W]='failed';ad.openDialog(W,X);};if(typeof Z=='string'){var af=1;e.scriptLoader.load(e.getUrl(Z),ae,null,0,1);}e.skins.load(this,'dialog',ae);return null;}});})();n.add('dialog',{requires:['dialogui']});n.add('styles',{requires:['selection'],init:function(q){q.on('contentDom',function(){q.document.setCustomData('cke_includeReadonly',!q.config.disableReadonlyStyling);});}});e.editor.prototype.attachStyleStateChange=function(q,r){var s=this._.styleStateChangeCallbacks;if(!s){s=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(t){for(var u=0;u<s.length;u++){var v=s[u],w=v.style.checkActive(t.data.path)?1:2;v.fn.call(this,w);}});}s.push({style:q,fn:r});};e.STYLE_BLOCK=1;e.STYLE_INLINE=2;e.STYLE_OBJECT=3;(function(){var q={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},r={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},s=/\s*(?:;\s*|$)/,t=/#\((.+?)\)/g,u=h.walker.bookmark(0,1),v=h.walker.whitespaces(1);e.style=function(X,Y){var aa=this;if(Y){X=i.clone(X);P(X.attributes,Y);P(X.styles,Y);}var Z=aa.element=X.element?typeof X.element=='string'?X.element.toLowerCase():X.element:'*';aa.type=q[Z]?1:r[Z]?3:2;if(typeof aa.element=='object')aa.type=3;aa._={definition:X};};e.style.prototype={apply:function(X){W.call(this,X,false);},remove:function(X){W.call(this,X,true);},applyToRange:function(X){var Y=this;return(Y.applyToRange=Y.type==2?x:Y.type==1?B:Y.type==3?z:null).call(Y,X);},removeFromRange:function(X){var Y=this;return(Y.removeFromRange=Y.type==2?y:Y.type==1?C:Y.type==3?A:null).call(Y,X);},applyToObject:function(X){O(X,this);},checkActive:function(X){var ac=this;switch(ac.type){case 1:return ac.checkElementRemovable(X.block||X.blockLimit,true);case 3:case 2:var Y=X.elements;for(var Z=0,aa;Z<Y.length;Z++){aa=Y[Z];if(ac.type==2&&(aa==X.block||aa==X.blockLimit))continue;if(ac.type==3){var ab=aa.getName();if(!(typeof ac.element=='string'?ab==ac.element:ab in ac.element))continue;}if(ac.checkElementRemovable(aa,true))return true;}}return false;},checkApplicable:function(X){switch(this.type){case 2:case 1:break;case 3:return X.lastElement.getAscendant(this.element,true);}return true;},checkElementRemovable:function(X,Y){var ai=this;if(!X||X.isReadOnly())return false;var Z=ai._.definition,aa,ab=X.getName();if(typeof ai.element=='string'?ab==ai.element:ab in ai.element){if(!Y&&!X.hasAttributes())return true;aa=Q(Z);if(aa._length){for(var ac in aa){if(ac=='_length')continue;var ad=X.getAttribute(ac)||'';if(ac=='style'?V(aa[ac],T(ad,false)):aa[ac]==ad){if(!Y)return true;}else if(Y)return false;}if(Y)return true;}else return true;}var ae=R(ai)[X.getName()];if(ae){if(!(aa=ae.attributes))return true;for(var af=0;af<aa.length;af++){ac=aa[af][0];var ag=X.getAttribute(ac);if(ag){var ah=aa[af][1];if(ah===null||typeof ah=='string'&&ag==ah||ah.test(ag))return true;}}}return false;},buildPreview:function(X){var Y=this._.definition,Z=[],aa=Y.element;if(aa=='bdo')aa='span';Z=['<',aa];var ab=Y.attributes;if(ab)for(var ac in ab)Z.push(' ',ac,'="',ab[ac],'"');var ad=e.style.getStyleText(Y);if(ad)Z.push(' style="',ad,'"');Z.push('>',X||Y.name,'</',aa,'>');return Z.join('');}};e.style.getStyleText=function(X){var Y=X._ST;if(Y)return Y;Y=X.styles;var Z=X.attributes&&X.attributes.style||'',aa='';if(Z.length)Z=Z.replace(s,';');for(var ab in Y){var ac=Y[ab],ad=(ab+':'+ac).replace(s,';');if(ac=='inherit')aa+=ad;else Z+=ad;}if(Z.length)Z=T(Z);Z+=aa;return X._ST=Z;};function w(X){var Y,Z;while(X=X.getParent()){if(X.getName()=='body')break;if(X.getAttribute('data-nostyle'))Y=X;else if(!Z){var aa=X.getAttribute('contentEditable');if(aa=='false')Y=X;else if(aa=='true')Z=1;}}return Y;};function x(X){var aB=this;var Y=X.document;if(X.collapsed){var Z=N(aB,Y);X.insertNode(Z);X.moveToPosition(Z,2);return;}var aa=aB.element,ab=aB._.definition,ac,ad=ab.includeReadonly;if(ad==undefined)ad=Y.getCustomData('cke_includeReadonly');var ae=j[aa]||(ac=true,j.span);X.enlarge(1,1);X.trim();var af=X.createBookmark(),ag=af.startNode,ah=af.endNode,ai=ag,aj,ak=w(ag),al=w(ah);if(ak)ai=ak.getNextSourceNode(true);if(al)ah=al;if(ai.getPosition(ah)==2)ai=0;while(ai){var am=false;if(ai.equals(ah)){ai=null;am=true;}else{var an=ai.type,ao=an==1?ai.getName():null,ap=ao&&ai.getAttribute('contentEditable')=='false',aq=ao&&ai.getAttribute('data-nostyle');if(ao&&ai.data('cke-bookmark')){ai=ai.getNextSourceNode(true);continue;}if(!ao||ae[ao]&&!aq&&(!ap||ad)&&(ai.getPosition(ah)|4|0|8)==4+0+8&&(!ab.childRule||ab.childRule(ai))){var ar=ai.getParent();if(ar&&((ar.getDtd()||j.span)[aa]||ac)&&(!ab.parentRule||ab.parentRule(ar))){if(!aj&&(!ao||!j.$removeEmpty[ao]||(ai.getPosition(ah)|4|0|8)==4+0+8)){aj=new h.range(Y);aj.setStartBefore(ai);}if(an==3||ap||an==1&&!ai.getChildCount()){var as=ai,at;while((am=!as.getNext(u))&&(at=as.getParent(),ae[at.getName()])&&(at.getPosition(ag)|2|0|8)==2+0+8&&(!ab.childRule||ab.childRule(at)))as=at;aj.setEndAfter(as);}}else am=true;}else am=true;ai=ai.getNextSourceNode(aq||ap);}if(am&&aj&&!aj.collapsed){var au=N(aB,Y),av=au.hasAttributes(),aw=aj.getCommonAncestor(),ax={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},ay,az,aA;while(au&&aw){if(aw.getName()==aa){for(ay in ab.attributes){if(ax.blockedAttrs[ay]||!(aA=aw.getAttribute(az)))continue;if(au.getAttribute(ay)==aA)ax.attrs[ay]=1;else ax.blockedAttrs[ay]=1;}for(az in ab.styles){if(ax.blockedStyles[az]||!(aA=aw.getStyle(az)))continue;if(au.getStyle(az)==aA)ax.styles[az]=1;else ax.blockedStyles[az]=1;}}aw=aw.getParent();}for(ay in ax.attrs)au.removeAttribute(ay);for(az in ax.styles)au.removeStyle(az);if(av&&!au.hasAttributes())au=null;if(au){aj.extractContents().appendTo(au);K(aB,au);aj.insertNode(au);au.mergeSiblings();if(!g)au.$.normalize();}else{au=new l('span');aj.extractContents().appendTo(au);aj.insertNode(au);K(aB,au);au.remove(true);}aj=null;}}X.moveToBookmark(af);X.shrink(2);};function y(X){X.enlarge(1,1);var Y=X.createBookmark(),Z=Y.startNode;if(X.collapsed){var aa=new h.elementPath(Z.getParent()),ab;for(var ac=0,ad;ac<aa.elements.length&&(ad=aa.elements[ac]);ac++){if(ad==aa.block||ad==aa.blockLimit)break;if(this.checkElementRemovable(ad)){var ae;if(X.collapsed&&(X.checkBoundaryOfElement(ad,2)||(ae=X.checkBoundaryOfElement(ad,1)))){ab=ad;ab.match=ae?'start':'end';}else{ad.mergeSiblings();if(ad.getName()==this.element)J(this,ad);else L(ad,R(this)[ad.getName()]);}}}if(ab){var af=Z;for(ac=0;true;ac++){var ag=aa.elements[ac];if(ag.equals(ab))break;else if(ag.match)continue;else ag=ag.clone();ag.append(af);af=ag;}af[ab.match=='start'?'insertBefore':'insertAfter'](ab);}}else{var ah=Y.endNode,ai=this;function aj(){var am=new h.elementPath(Z.getParent()),an=new h.elementPath(ah.getParent()),ao=null,ap=null;for(var aq=0;aq<am.elements.length;aq++){var ar=am.elements[aq];if(ar==am.block||ar==am.blockLimit)break;if(ai.checkElementRemovable(ar))ao=ar;}for(aq=0;aq<an.elements.length;aq++){ar=an.elements[aq];if(ar==an.block||ar==an.blockLimit)break;if(ai.checkElementRemovable(ar))ap=ar;}if(ap)ah.breakParent(ap);if(ao)Z.breakParent(ao);};aj();var ak=Z.getNext();while(!ak.equals(ah)){var al=ak.getNextSourceNode();if(ak.type==1&&this.checkElementRemovable(ak)){if(ak.getName()==this.element)J(this,ak);else L(ak,R(this)[ak.getName()]);if(al.type==1&&al.contains(Z)){aj();al=Z.getNext();}}ak=al;}}X.moveToBookmark(Y);};function z(X){var Y=X.getCommonAncestor(true,true),Z=Y.getAscendant(this.element,true);Z&&!Z.isReadOnly()&&O(Z,this);};function A(X){var Y=X.getCommonAncestor(true,true),Z=Y.getAscendant(this.element,true);if(!Z)return;var aa=this,ab=aa._.definition,ac=ab.attributes,ad=e.style.getStyleText(ab);if(ac)for(var ae in ac)Z.removeAttribute(ae,ac[ae]);if(ab.styles)for(var af in ab.styles){if(!ab.styles.hasOwnProperty(af))continue;Z.removeStyle(af);}};function B(X){var Y=X.createBookmark(true),Z=X.createIterator();Z.enforceRealBlocks=true;if(this._.enterMode)Z.enlargeBr=this._.enterMode!=2;var aa,ab=X.document,ac;while(aa=Z.getNextParagraph()){if(!aa.isReadOnly()){var ad=N(this,ab,aa);D(aa,ad);}}X.moveToBookmark(Y);};function C(X){var ac=this;var Y=X.createBookmark(1),Z=X.createIterator();Z.enforceRealBlocks=true;Z.enlargeBr=ac._.enterMode!=2;var aa;while(aa=Z.getNextParagraph()){if(ac.checkElementRemovable(aa))if(aa.is('pre')){var ab=ac._.enterMode==2?null:X.document.createElement(ac._.enterMode==1?'p':'div');ab&&aa.copyAttributes(ab);D(aa,ab);}else J(ac,aa,1);}X.moveToBookmark(Y);};function D(X,Y){var Z=!Y;if(Z){Y=X.getDocument().createElement('div');X.copyAttributes(Y);}var aa=Y&&Y.is('pre'),ab=X.is('pre'),ac=aa&&!ab,ad=!aa&&ab;if(ac)Y=I(X,Y);else if(ad)Y=H(Z?[X.getHtml()]:F(X),Y);else X.moveChildren(Y);Y.replace(X);if(aa)E(Y);else if(Z)M(Y);};function E(X){var Y;if(!((Y=X.getPrevious(v))&&Y.is&&Y.is('pre')))return;var Z=G(Y.getHtml(),/\n$/,'')+'\n\n'+G(X.getHtml(),/^\n/,'');if(g)X.$.outerHTML='<pre>'+Z+'</pre>';else X.setHtml(Z);Y.remove();};function F(X){var Y=/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,Z=X.getName(),aa=G(X.getOuterHtml(),Y,function(ac,ad,ae){return ad+'</pre>'+ae+'<pre>';}),ab=[];aa.replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(ac,ad){ab.push(ad);});return ab;};function G(X,Y,Z){var aa='',ab='';X=X.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(ac,ad,ae){ad&&(aa=ad);ae&&(ab=ae);return'';});return aa+X.replace(Y,Z)+ab;};function H(X,Y){var Z;if(X.length>1)Z=new h.documentFragment(Y.getDocument());for(var aa=0;aa<X.length;aa++){var ab=X[aa];ab=ab.replace(/(\r\n|\r)/g,'\n');ab=G(ab,/^[ \t]*\n/,'');ab=G(ab,/\n$/,'');ab=G(ab,/^[ \t]+|[ \t]+$/g,function(ad,ae,af){if(ad.length==1)return'&nbsp;';else if(!ae)return i.repeat('&nbsp;',ad.length-1)+' ';else return' '+i.repeat('&nbsp;',ad.length-1);});ab=ab.replace(/\n/g,'<br>');ab=ab.replace(/[ \t]{2,}/g,function(ad){return i.repeat('&nbsp;',ad.length-1)+' ';});if(Z){var ac=Y.clone();ac.setHtml(ab);Z.append(ac);}else Y.setHtml(ab);}return Z||Y;};function I(X,Y){var Z=X.getBogus();Z&&Z.remove();var aa=X.getHtml();aa=G(aa,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');aa=aa.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,'$1');aa=aa.replace(/([ \t\n\r]+|&nbsp;)/g,' ');aa=aa.replace(/<br\b[^>]*>/gi,'\n');if(g){var ab=X.getDocument().createElement('div');ab.append(Y);Y.$.outerHTML='<pre>'+aa+'</pre>';Y.copyAttributes(ab.getFirst());Y=ab.getFirst().remove();}else Y.setHtml(aa);return Y;};function J(X,Y){var Z=X._.definition,aa=i.extend({},Z.attributes,R(X)[Y.getName()]),ab=Z.styles,ac=i.isEmpty(aa)&&i.isEmpty(ab);for(var ad in aa){if((ad=='class'||X._.definition.fullMatch)&&Y.getAttribute(ad)!=S(ad,aa[ad]))continue;ac=Y.hasAttribute(ad);Y.removeAttribute(ad);}for(var ae in ab){if(X._.definition.fullMatch&&Y.getStyle(ae)!=S(ae,ab[ae],true))continue;ac=ac||!!Y.getStyle(ae);Y.removeStyle(ae);}if(ac)!j.$block[Y.getName()]||X._.enterMode==2&&!Y.hasAttributes()?M(Y):Y.renameNode(X._.enterMode==1?'p':'div');};function K(X,Y){var Z=X._.definition,aa=Z.attributes,ab=Z.styles,ac=R(X),ad=Y.getElementsByTag(X.element);for(var ae=ad.count();--ae>=0;)J(X,ad.getItem(ae));for(var af in ac){if(af!=X.element){ad=Y.getElementsByTag(af);for(ae=ad.count()-1;ae>=0;ae--){var ag=ad.getItem(ae);L(ag,ac[af]);}}}};function L(X,Y){var Z=Y&&Y.attributes;if(Z)for(var aa=0;aa<Z.length;aa++){var ab=Z[aa][0],ac;if(ac=X.getAttribute(ab)){var ad=Z[aa][1];if(ad===null||ad.test&&ad.test(ac)||typeof ad=='string'&&ac==ad)X.removeAttribute(ab);}}M(X);};function M(X){if(!X.hasAttributes())if(j.$block[X.getName()]){var Y=X.getPrevious(v),Z=X.getNext(v);if(Y&&(Y.type==3||!Y.isBlockBoundary({br:1})))X.append('br',1);if(Z&&(Z.type==3||!Z.isBlockBoundary({br:1})))X.append('br');X.remove(true);}else{var aa=X.getFirst(),ab=X.getLast();X.remove(true);if(aa){aa.type==1&&aa.mergeSiblings();if(ab&&!aa.equals(ab)&&ab.type==1)ab.mergeSiblings();}}};function N(X,Y,Z){var aa,ab=X._.definition,ac=X.element;if(ac=='*')ac='span';aa=new l(ac,Y);if(Z)Z.copyAttributes(aa);aa=O(aa,X);if(Y.getCustomData('doc_processing_style')&&aa.hasAttribute('id'))aa.removeAttribute('id');else Y.setCustomData('doc_processing_style',1);return aa;};function O(X,Y){var Z=Y._.definition,aa=Z.attributes,ab=e.style.getStyleText(Z);if(aa)for(var ac in aa)X.setAttribute(ac,aa[ac]);if(ab)X.setAttribute('style',ab);return X;};function P(X,Y){for(var Z in X)X[Z]=X[Z].replace(t,function(aa,ab){return Y[ab];});};function Q(X){var Y=X._AC;if(Y)return Y;Y={};var Z=0,aa=X.attributes;if(aa)for(var ab in aa){Z++;Y[ab]=aa[ab];}var ac=e.style.getStyleText(X);if(ac){if(!Y.style)Z++;Y.style=ac;}Y._length=Z;return X._AC=Y;};function R(X){if(X._.overrides)return X._.overrides;var Y=X._.overrides={},Z=X._.definition.overrides;if(Z){if(!i.isArray(Z))Z=[Z];for(var aa=0;aa<Z.length;aa++){var ab=Z[aa],ac,ad,ae;if(typeof ab=='string')ac=ab.toLowerCase();else{ac=ab.element?ab.element.toLowerCase():X.element;ae=ab.attributes;}ad=Y[ac]||(Y[ac]={});if(ae){var af=ad.attributes=ad.attributes||[];for(var ag in ae)af.push([ag.toLowerCase(),ae[ag]]);}}}return Y;};function S(X,Y,Z){var aa=new l('span');aa[Z?'setStyle':'setAttribute'](X,Y);return aa[Z?'getStyle':'getAttribute'](X);};function T(X,Y){var Z;if(Y!==false){var aa=new l('span');aa.setAttribute('style',X);Z=aa.getAttribute('style')||'';}else Z=X;Z=Z.replace(/(font-family:)(.*?)(?=;|$)/,function(ab,ac,ad){var ae=ad.split(',');for(var af=0;af<ae.length;af++)ae[af]=i.trim(ae[af].replace(/["']/g,''));return ac+ae.join(',');});return Z.replace(/\s*([;:])\s*/,'$1').replace(/([^\s;])$/,'$1;').replace(/,\s+/g,',').replace(/\"/g,'').toLowerCase();};function U(X){var Y={};X.replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(Z,aa,ab){Y[aa]=ab;});return Y;};function V(X,Y){typeof X=='string'&&(X=U(X));typeof Y=='string'&&(Y=U(Y));for(var Z in X){if(!(Z in Y&&(Y[Z]==X[Z]||X[Z]=='inherit'||Y[Z]=='inherit')))return false;}return true;};function W(X,Y){var Z=X.getSelection(),aa=Z.createBookmarks(1),ab=Z.getRanges(),ac=Y?this.removeFromRange:this.applyToRange,ad,ae=ab.createIterator();while(ad=ae.getNextRange())ac.call(this,ad);if(aa.length==1&&aa[0].collapsed){Z.selectRanges(ab);X.getById(aa[0].startNode).remove();}else Z.selectBookmarks(aa);X.removeCustomData('doc_processing_style');};})();e.styleCommand=function(q){this.style=q;};e.styleCommand.prototype.exec=function(q){var s=this;q.focus();var r=q.document;if(r)if(s.state==2)s.style.apply(r);else if(s.state==1)s.style.remove(r);return!!r;};e.stylesSet=new e.resourceManager('','stylesSet');e.addStylesSet=i.bind(e.stylesSet.add,e.stylesSet);e.loadStylesSet=function(q,r,s){e.stylesSet.addExternal(q,r,'');e.stylesSet.load(q,s);};e.editor.prototype.getStylesSet=function(q){if(!this._.stylesDefinitions){var r=this,s=r.config.stylesCombo_stylesSet||r.config.stylesSet||'default';if(s instanceof Array){r._.stylesDefinitions=s;q(s);return;}var t=s.split(':'),u=t[0],v=t[1],w=n.registered.styles.path;e.stylesSet.addExternal(u,v?t.slice(1).join(':'):w+'styles/'+u+'.js','');e.stylesSet.load(u,function(x){r._.stylesDefinitions=x[u];q(r._.stylesDefinitions);});}else q(this._.stylesDefinitions);};n.add('domiterator');(function(){function q(w){var x=this;if(arguments.length<1)return;x.range=w;x.forceBrBreak=0;x.enlargeBr=1;x.enforceRealBlocks=0;x._||(x._={});};var r=/^[\r\n\t ]+$/,s=h.walker.bookmark(false,true),t=h.walker.whitespaces(true),u=function(w){return s(w)&&t(w);};function v(w,x,y){var z=w.getNextSourceNode(x,null,y);while(!s(z))z=z.getNextSourceNode(x,null,y);return z;};q.prototype={getNextParagraph:function(w){var W=this;var x,y,z,A,B,C;if(!W._.lastNode){y=W.range.clone();y.shrink(1,true);A=y.endContainer.hasAscendant('pre',true)||y.startContainer.hasAscendant('pre',true);y.enlarge(W.forceBrBreak&&!A||!W.enlargeBr?3:2);var D=new h.walker(y),E=h.walker.bookmark(true,true);D.evaluator=E;W._.nextNode=D.next();D=new h.walker(y);D.evaluator=E;var F=D.previous();W._.lastNode=F.getNextSourceNode(true);if(W._.lastNode&&W._.lastNode.type==3&&!i.trim(W._.lastNode.getText())&&W._.lastNode.getParent().isBlockBoundary()){var G=new h.range(y.document);G.moveToPosition(W._.lastNode,4);if(G.checkEndOfBlock()){var H=new h.elementPath(G.endContainer),I=H.block||H.blockLimit;W._.lastNode=I.getNextSourceNode(true);}}if(!W._.lastNode){W._.lastNode=W._.docEndMarker=y.document.createText('');W._.lastNode.insertAfter(F);}y=null;}var J=W._.nextNode;F=W._.lastNode;W._.nextNode=null;while(J){var K=0,L=J.hasAscendant('pre'),M=J.type!=1,N=0;if(!M){var O=J.getName();if(J.isBlockBoundary(W.forceBrBreak&&!L&&{br:1})){if(O=='br')M=1;else if(!y&&!J.getChildCount()&&O!='hr'){x=J;z=J.equals(F);break;}if(y){y.setEndAt(J,3);if(O!='br')W._.nextNode=J;}K=1;}else{if(J.getFirst()){if(!y){y=new h.range(W.range.document);y.setStartAt(J,3);}J=J.getFirst();continue;}M=1;}}else if(J.type==3)if(r.test(J.getText()))M=0;if(M&&!y){y=new h.range(W.range.document);y.setStartAt(J,3);}z=(!K||M)&&J.equals(F);if(y&&!K)while(!J.getNext(u)&&!z){var P=J.getParent();if(P.isBlockBoundary(W.forceBrBreak&&!L&&{br:1})){K=1;M=0;z=z||P.equals(F);y.setEndAt(P,2);break;}J=P;M=1;z=J.equals(F);N=1;}if(M)y.setEndAt(J,4);J=v(J,N,F);z=!J;if(z||K&&y)break;}if(!x){if(!y){W._.docEndMarker&&W._.docEndMarker.remove();W._.nextNode=null;return null;}var Q=new h.elementPath(y.startContainer),R=Q.blockLimit,S={div:1,th:1,td:1};x=Q.block;if(!x&&!W.enforceRealBlocks&&S[R.getName()]&&y.checkStartOfBlock()&&y.checkEndOfBlock())x=R;else if(!x||W.enforceRealBlocks&&x.getName()=='li'){x=W.range.document.createElement(w||'p');y.extractContents().appendTo(x);x.trim();y.insertNode(x);B=C=true;}else if(x.getName()!='li'){if(!y.checkStartOfBlock()||!y.checkEndOfBlock()){x=x.clone(false);y.extractContents().appendTo(x);x.trim();var T=y.splitBlock();B=!T.wasStartOfBlock;C=!T.wasEndOfBlock;y.insertNode(x);}}else if(!z)W._.nextNode=x.equals(F)?null:v(y.getBoundaryNodes().endNode,1,F);}if(B){var U=x.getPrevious();if(U&&U.type==1)if(U.getName()=='br')U.remove();else if(U.getLast()&&U.getLast().$.nodeName.toLowerCase()=='br')U.getLast().remove();}if(C){var V=x.getLast();if(V&&V.type==1&&V.getName()=='br')if(g||V.getPrevious(s)||V.getNext(s))V.remove();}if(!W._.nextNode)W._.nextNode=z||x.equals(F)?null:v(x,1,F);return x;}};h.range.prototype.createIterator=function(){return new q(this);};})();n.add('panelbutton',{requires:['button'],onLoad:function(){function q(r){var t=this;var s=t._;if(s.state==0)return;t.createPanel(r);if(s.on){s.panel.hide();return;}s.panel.showBlock(t._.id,t.document.getById(t._.id),4);};o.panelButton=i.createClass({base:o.button,$:function(r){var t=this;var s=r.panel;delete r.panel;t.base(r);t.document=s&&s.parent&&s.parent.getDocument()||e.document;s.block={attributes:s.attributes};t.hasArrow=true;t.click=q;t._={panelDefinition:s};},statics:{handler:{create:function(r){return new o.panelButton(r);}}},proto:{createPanel:function(r){var s=this._;if(s.panel)return;var t=this._.panelDefinition||{},u=this._.panelDefinition.block,v=t.parent||e.document.getBody(),w=this._.panel=new o.floatPanel(r,v,t),x=w.addBlock(s.id,u),y=this;w.onShow=function(){if(y.className)this.element.getFirst().addClass(y.className+'_panel');y.setState(1);s.on=1;if(y.onOpen)y.onOpen();};w.onHide=function(z){if(y.className)this.element.getFirst().removeClass(y.className+'_panel');y.setState(y.modes&&y.modes[r.mode]?2:0);s.on=0;if(!z&&y.onClose)y.onClose();};w.onEscape=function(){w.hide();y.document.getById(s.id).focus();};if(this.onBlock)this.onBlock(w,x);x.onHide=function(){s.on=0;y.setState(2);};}}});},beforeInit:function(q){q.ui.addHandler('panelbutton',o.panelButton.handler);}});e.UI_PANELBUTTON='panelbutton';n.add('floatpanel',{requires:['panel']});(function(){var q={},r=false;function s(t,u,v,w,x){var y=i.genKey(u.getUniqueId(),v.getUniqueId(),t.skinName,t.lang.dir,t.uiColor||'',w.css||'',x||''),z=q[y];if(!z){z=q[y]=new o.panel(u,w);z.element=v.append(l.createFromHtml(z.renderHtml(t),u));z.element.setStyles({display:'none',position:'absolute'});}return z;};o.floatPanel=i.createClass({$:function(t,u,v,w){v.forceIFrame=1;var x=u.getDocument(),y=s(t,x,u,v,w||0),z=y.element,A=z.getFirst().getFirst();this.element=z;this._={editor:t,panel:y,parentElement:u,definition:v,document:x,iframe:A,children:[],dir:t.lang.dir};t.on('mode',function(){this.hide();},this);},proto:{addBlock:function(t,u){return this._.panel.addBlock(t,u);},addListBlock:function(t,u){return this._.panel.addListBlock(t,u);},getBlock:function(t){return this._.panel.getBlock(t);},showBlock:function(t,u,v,w,x){var y=this._.panel,z=y.showBlock(t);this.allowBlur(false);r=1;this._.returnFocus=this._.editor.focusManager.hasFocus?this._.editor:new l(e.document.$.activeElement);var A=this.element,B=this._.iframe,C=this._.definition,D=u.getDocumentPosition(A.getDocument()),E=this._.dir=='rtl',F=D.x+(w||0),G=D.y+(x||0);if(E&&(v==1||v==4))F+=u.$.offsetWidth;else if(!E&&(v==2||v==3))F+=u.$.offsetWidth-1;if(v==3||v==4)G+=u.$.offsetHeight-1;this._.panel._.offsetParentId=u.getId();A.setStyles({top:G+'px',left:0,display:''});A.setOpacity(0);A.getFirst().removeStyle('width');if(!this._.blurSet){var H=g?B:new h.window(B.$.contentWindow);e.event.useCapture=true;H.on('blur',function(I){var K=this;if(!K.allowBlur())return;var J=I.data.getTarget();if(J.getName&&J.getName()!='iframe')return;if(K.visible&&!K._.activeChild&&!r){delete K._.returnFocus;K.hide();}},this);H.on('focus',function(){this._.focused=true;this.hideChild();this.allowBlur(true);},this);e.event.useCapture=false;this._.blurSet=1;}y.onEscape=i.bind(function(I){if(this.onEscape&&this.onEscape(I)===false)return false;},this);i.setTimeout(function(){if(E)F-=A.$.offsetWidth;var I=i.bind(function(){var J=A.getFirst();if(z.autoSize){var K=z.element.$;if(f.gecko||f.opera)K=K.parentNode;if(g)K=K.document.body;var L=K.scrollWidth;if(g&&f.quirks&&L>0)L+=(J.$.offsetWidth||0)-(J.$.clientWidth||0)+3;L+=4;J.setStyle('width',L+'px');z.element.addClass('cke_frameLoaded');var M=z.element.$.scrollHeight;if(g&&f.quirks&&M>0)M+=(J.$.offsetHeight||0)-(J.$.clientHeight||0)+3;J.setStyle('height',M+'px');y._.currentBlock.element.setStyle('display','none').removeStyle('display');}else J.removeStyle('height');var N=y.element,O=N.getWindow(),P=O.getScrollPosition(),Q=O.getViewPaneSize(),R={height:N.$.offsetHeight,width:N.$.offsetWidth};if(E?F<0:F+R.width>Q.width+P.x)F+=R.width*(E?1:-1);if(G+R.height>Q.height+P.y)G-=R.height;if(g){var S=new l(A.$.offsetParent),T=S;if(T.getName()=='html')T=T.getDocument().getBody();if(T.getComputedStyle('direction')=='rtl')if(f.ie8Compat)F-=A.getDocument().getDocumentElement().$.scrollLeft*2;else F-=S.$.scrollWidth-S.$.clientWidth;}var U=A.getFirst(),V;if(V=U.getCustomData('activePanel'))V.onHide&&V.onHide.call(this,1);U.setCustomData('activePanel',this);A.setStyles({top:G+'px',left:F+'px'});A.setOpacity(1);},this);y.isLoaded?I():y.onLoad=I;i.setTimeout(function(){B.$.contentWindow.focus();this.allowBlur(true);},0,this);},f.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);r=0;},hide:function(t){var v=this;if(v.visible&&(!v.onHide||v.onHide.call(v)!==true)){v.hideChild();f.gecko&&v._.iframe.getFrameDocument().$.activeElement.blur();v.element.setStyle('display','none');v.visible=0;v.element.getFirst().removeCustomData('activePanel');var u=t!==false&&v._.returnFocus;if(u){if(f.webkit&&u.type)u.getWindow().$.focus();u.focus();}}},allowBlur:function(t){var u=this._.panel;if(t!=undefined)u.allowBlur=t;return u.allowBlur;},showAsChild:function(t,u,v,w,x,y){if(this._.activeChild==t&&t._.panel._.offsetParentId==v.getId())return;this.hideChild();t.onHide=i.bind(function(){i.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=t;this._.focused=false;t.showBlock(u,v,w,x,y);if(f.ie7Compat||f.ie8&&f.ie6Compat)setTimeout(function(){t.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var t=this._.activeChild;if(t){delete t.onHide;delete t._.returnFocus;delete this._.activeChild;t.hide();}}}});e.on('instanceDestroyed',function(){var t=i.isEmpty(e.instances);for(var u in q){var v=q[u];if(t)v.destroy();else v.element.hide();}t&&(q={});});})();n.add('menu',{beforeInit:function(q){var r=q.config.menu_groups.split(','),s=q._.menuGroups={},t=q._.menuItems={};for(var u=0;u<r.length;u++)s[r[u]]=u+1;q.addMenuGroup=function(v,w){s[v]=w||100;};q.addMenuItem=function(v,w){if(s[w.group])t[v]=new e.menuItem(this,v,w);};q.addMenuItems=function(v){for(var w in v)this.addMenuItem(w,v[w]);};q.getMenuItem=function(v){return t[v];};q.removeMenuItem=function(v){delete t[v];};},requires:['floatpanel']});(function(){e.menu=i.createClass({$:function(r,s){var v=this;s=v._.definition=s||{};v.id=i.getNextId();v.editor=r;v.items=[];v._.listeners=[];v._.level=s.level||1;var t=i.extend({},s.panel,{css:r.skin.editor.css,level:v._.level-1,block:{}}),u=t.block.attributes=t.attributes||{};!u.role&&(u.role='menu');v._.panelDefinition=t;},_:{onShow:function(){var z=this;var r=z.editor.getSelection();if(g)r&&r.lock();var s=r&&r.getStartElement(),t=z._.listeners,u=[];z.removeAll();for(var v=0;v<t.length;v++){var w=t[v](s,r);if(w)for(var x in w){var y=z.editor.getMenuItem(x);if(y&&(!y.command||z.editor.getCommand(y.command).state)){y.state=w[x];z.add(y);}}}},onClick:function(r){this.hide(false);if(r.onClick)r.onClick();else if(r.command)this.editor.execCommand(r.command);},onEscape:function(r){var s=this.parent;if(s){s._.panel.hideChild();var t=s._.panel._.panel._.currentBlock,u=t._.focusIndex;t._.markItem(u);}else if(r==27)this.hide();return false;},onHide:function(){if(g){var r=this.editor.getSelection();r&&r.unlock();}this.onHide&&this.onHide();},showSubMenu:function(r){var z=this;var s=z._.subMenu,t=z.items[r],u=t.getItems&&t.getItems();if(!u){z._.panel.hideChild();return;}var v=z._.panel.getBlock(z.id);v._.focusIndex=r;if(s)s.removeAll();else{s=z._.subMenu=new e.menu(z.editor,i.extend({},z._.definition,{level:z._.level+1},true));s.parent=z;s._.onClick=i.bind(z._.onClick,z);}for(var w in u){var x=z.editor.getMenuItem(w);if(x){x.state=u[w];s.add(x);}}var y=z._.panel.getBlock(z.id).element.getDocument().getById(z.id+String(r));s.show(y,2);}},proto:{add:function(r){if(!r.order)r.order=this.items.length;this.items.push(r);},removeAll:function(){this.items=[];},show:function(r,s,t,u){if(!this.parent){this._.onShow();if(!this.items.length)return;}s=s||(this.editor.lang.dir=='rtl'?2:1);var v=this.items,w=this.editor,x=this._.panel,y=this._.element;if(!x){x=this._.panel=new o.floatPanel(this.editor,e.document.getBody(),this._.panelDefinition,this._.level);x.onEscape=i.bind(function(J){if(this._.onEscape(J)===false)return false;},this);x.onHide=i.bind(function(){this._.onHide&&this._.onHide();},this);var z=x.addBlock(this.id,this._.panelDefinition.block);z.autoSize=true;var A=z.keys;A[40]='next';A[9]='next';A[38]='prev';A[2228224+9]='prev';A[w.lang.dir=='rtl'?37:39]=g?'mouseup':'click';A[32]=g?'mouseup':'click';g&&(A[13]='mouseup');y=this._.element=z.element;y.addClass(w.skinClass);var B=y.getDocument();B.getBody().setStyle('overflow','hidden');B.getElementsByTag('html').getItem(0).setStyle('overflow','hidden');this._.itemOverFn=i.addFunction(function(J){var K=this;clearTimeout(K._.showSubTimeout);K._.showSubTimeout=i.setTimeout(K._.showSubMenu,w.config.menu_subMenuDelay||400,K,[J]);},this);this._.itemOutFn=i.addFunction(function(J){clearTimeout(this._.showSubTimeout);},this);this._.itemClickFn=i.addFunction(function(J){var L=this;var K=L.items[J];if(K.state==0){L.hide();return;}if(K.getItems)L._.showSubMenu(J);else L._.onClick(K);},this);}q(v);var C=w.container.getChild(1),D=C.hasClass('cke_mixed_dir_content')?' cke_mixed_dir_content':'',E=['<div class="cke_menu'+D+'" role="presentation">'],F=v.length,G=F&&v[0].group;for(var H=0;H<F;H++){var I=v[H];if(G!=I.group){E.push('<div class="cke_menuseparator" role="separator"></div>');G=I.group;}I.render(this,H,E);}E.push('</div>');y.setHtml(E.join(''));o.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(x,this.id,r,s,t,u);else x.showBlock(this.id,r,s,t,u);w.fire('menuShow',[x]);},addListener:function(r){this._.listeners.push(r);},hide:function(r){var s=this;s._.onHide&&s._.onHide();s._.panel&&s._.panel.hide(r);}}});function q(r){r.sort(function(s,t){if(s.group<t.group)return-1;else if(s.group>t.group)return 1;return s.order<t.order?-1:s.order>t.order?1:0;});};e.menuItem=i.createClass({$:function(r,s,t){var u=this;i.extend(u,t,{order:0,className:'cke_button_'+s});u.group=r._.menuGroups[u.group];u.editor=r;u.name=s;},proto:{render:function(r,s,t){var A=this;var u=r.id+String(s),v=typeof A.state=='undefined'?2:A.state,w=' cke_'+(v==1?'on':v==0?'disabled':'off'),x=A.label;if(A.className)w+=' '+A.className;var y=A.getItems;t.push('<span class="cke_menuitem'+(A.icon&&A.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">'+'<a id="',u,'" class="',w,'" href="javascript:void(\'',(A.label||'').replace("'",''),'\')" title="',A.label,'" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"'+(y?'aria-haspopup="true"':'')+(v==0?'aria-disabled="true"':'')+(v==1?'aria-pressed="true"':''));if(f.opera||f.gecko&&f.mac)t.push(' onkeypress="return false;"');if(f.gecko)t.push(' onblur="this.style.cssText = this.style.cssText;"');var z=(A.iconOffset||0)*-16;t.push(' onmouseover="CKEDITOR.tools.callFunction(',r._.itemOverFn,',',s,');" onmouseout="CKEDITOR.tools.callFunction(',r._.itemOutFn,',',s,');" '+(g?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',r._.itemClickFn,',',s,'); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"'+(A.icon?' style="background-image:url('+e.getUrl(A.icon)+');background-position:0 '+z+'px;"':'')+'></span></span>'+'<span class="cke_label">');if(y)t.push('<span class="cke_menuarrow">','<span>&#',A.editor.lang.dir=='rtl'?'9668':'9658',';</span>','</span>');t.push(x,'</span></a></span>');}}});})();m.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var q;n.add('editingblock',{init:function(r){if(!r.config.editingBlock)return;r.on('themeSpace',function(s){if(s.data.space=='contents')s.data.html+='<br>';});r.on('themeLoaded',function(){r.fireOnce('editingBlockReady');});r.on('uiReady',function(){r.setMode(r.config.startupMode);});r.on('afterSetData',function(){if(!q){function s(){q=true;r.getMode().loadData(r.getData());q=false;};if(r.mode)s();else r.on('mode',function(){if(r.mode){s();r.removeListener('mode',arguments.callee);}});}});r.on('beforeGetData',function(){if(!q&&r.mode){q=true;r.setData(r.getMode().getData(),null,1);q=false;}});r.on('getSnapshot',function(s){if(r.mode)s.data=r.getMode().getSnapshotData();});r.on('loadSnapshot',function(s){if(r.mode)r.getMode().loadSnapshotData(s.data);});r.on('mode',function(s){s.removeListener();f.webkit&&r.container.on('focus',function(){r.focus();});if(r.config.startupFocus)r.focus();setTimeout(function(){r.fireOnce('instanceReady');e.fire('instanceReady',null,r);},0);});r.on('destroy',function(){var s=this;if(s.mode)s._.modes[s.mode].unload(s.getThemeSpace('contents'));});}});e.editor.prototype.mode='';e.editor.prototype.addMode=function(r,s){s.name=r;(this._.modes||(this._.modes={}))[r]=s;};e.editor.prototype.setMode=function(r){this.fire('beforeSetMode',{newMode:r});var s,t=this.getThemeSpace('contents'),u=this.checkDirty();if(this.mode){if(r==this.mode)return;this.fire('beforeModeUnload');var v=this.getMode();s=v.getData();v.unload(t);this.mode='';}t.setHtml('');var w=this.getMode(r);if(!w)throw'[CKEDITOR.editor.setMode] Unknown mode "'+r+'".';if(!u)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});w.load(t,typeof s!='string'?this.getData():s);};e.editor.prototype.getMode=function(r){return this._.modes&&this._.modes[r||this.mode];};e.editor.prototype.focus=function(){this.forceNextSelectionCheck();var r=this.getMode();if(r)r.focus();};})();m.startupMode='wysiwyg';m.editingBlock=true;(function(){function q(){var F=this;try{var C=F.getSelection();if(!C||!C.document.getWindow().$)return;var D=C.getStartElement(),E=new h.elementPath(D);if(!E.compare(F._.selectionPreviousPath)){F._.selectionPreviousPath=E;F.fire('selectionChange',{selection:C,path:E,element:D});}}catch(G){}};var r,s;function t(){s=true;if(r)return;u.call(this);r=i.setTimeout(u,200,this);};function u(){r=null;if(s){i.setTimeout(q,0,this);s=false;}};function v(C){function D(H){return H&&H.type==1&&H.getName()in j.$removeEmpty;};function E(H){var I=C.document.getBody();return!H.is('body')&&I.getChildCount()==1;};var F=C.startContainer,G=C.startOffset;if(F.type==3)return false;return!i.trim(F.getHtml())?D(F)||E(F):D(F.getChild(G-1))||D(F.getChild(G));};var w={modes:{wysiwyg:1,source:1},readOnly:g||f.webkit,exec:function(C){switch(C.mode){case'wysiwyg':C.document.$.execCommand('SelectAll',false,null);C.forceNextSelectionCheck();C.selectionChange();break;case'source':var D=C.textarea.$;if(g)D.createTextRange().execCommand('SelectAll');else{D.selectionStart=0;D.selectionEnd=D.value.length;}D.focus();}},canUndo:false};function x(C){A(C);var D=C.createText('​');C.setCustomData('cke-fillingChar',D);return D;};function y(C){return C&&C.getCustomData('cke-fillingChar');};function z(C){var D=C&&y(C);if(D)if(D.getCustomData('ready'))A(C);else D.setCustomData('ready',1);};function A(C){var D=C&&C.removeCustomData('cke-fillingChar');if(D){D.setText(D.getText().replace(/\u200B/g,''));D=0;}};n.add('selection',{init:function(C){if(f.webkit){C.on('selectionChange',function(){z(C.document);});C.on('beforeSetMode',function(){A(C.document);});C.on('key',function(H){switch(H.data.keyCode){case 13:case 2228224+13:case 37:case 39:case 8:A(C.document);}},null,null,10);var D,E;function F(){var H=C.document,I=y(H);if(I){var J=H.$.defaultView.getSelection();if(J.type=='Caret'&&J.anchorNode==I.$)E=1;D=I.getText();I.setText(D.replace(/\u200B/g,''));}};function G(){var H=C.document,I=y(H);if(I){I.setText(D);if(E){H.$.defaultView.getSelection().setPosition(I.$,I.getLength());E=0;}}};C.on('beforeUndoImage',F);C.on('afterUndoImage',G);C.on('beforeGetData',F,null,null,0);C.on('getData',G);}C.on('contentDom',function(){var H=C.document,I=H.getBody(),J=H.getDocumentElement();if(g){var K,L,M=1;I.on('focusin',function(Q){if(Q.data.$.srcElement.nodeName!='BODY')return;if(K){if(M){try{K.select();}catch(S){}var R=H.getCustomData('cke_locked_selection');if(R){R.unlock();R.lock();}}K=null;}});I.on('focus',function(){L=1;P();});I.on('beforedeactivate',function(Q){if(Q.data.$.toElement)return;L=0;M=1;});if(g&&f.version<8)C.on('blur',function(Q){try{C.document&&C.document.$.selection.empty();}catch(R){}});J.on('mousedown',function(){M=0;});J.on('mouseup',function(){M=1;});if(g&&(f.ie7Compat||f.version<8||f.quirks))J.on('click',function(Q){if(Q.data.getTarget().getName()=='html')C.getSelection().getRanges()[0].select();});var N;I.on('mousedown',function(Q){if(Q.data.$.button==2){var R=C.document.$.selection;if(R.type=='None')N=C.window.getScrollPosition();}O();});I.on('mouseup',function(Q){if(Q.data.$.button==2&&N){C.document.$.documentElement.scrollLeft=N.x;C.document.$.documentElement.scrollTop=N.y;}N=null;L=1;setTimeout(function(){P(true);},0);});I.on('keydown',O);I.on('keyup',function(){L=1;P();});H.on('selectionchange',P);function O(){L=0;};function P(Q){if(L){var R=C.document,S=C.getSelection(),T=S&&S.getNative();if(Q&&T&&T.type=='None')if(!R.$.queryCommandEnabled('InsertImage')){i.setTimeout(P,50,this,true);return;}var U;if(T&&T.type&&T.type!='Control'&&(U=T.createRange())&&(U=U.parentElement())&&(U=U.nodeName)&&U.toLowerCase()in{input:1,textarea:1})return;K=T&&S.getRanges()[0];t.call(C);}};}else{H.on('mouseup',t,C);H.on('keyup',t,C);}});C.on('contentDomUnload',C.forceNextSelectionCheck,C);C.addCommand('selectAll',w);C.ui.addButton('SelectAll',{label:C.lang.selectAll,command:'selectAll'});C.selectionChange=t;f.ie9Compat&&C.on('destroy',function(){var H=C.getSelection();H&&H.getNative().clear();},null,null,9);}});e.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};e.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};k.prototype.getSelection=function(){var C=new h.selection(this);return!C||C.isInvalid?null:C;};e.SELECTION_NONE=1;e.SELECTION_TEXT=2;e.SELECTION_ELEMENT=3;h.selection=function(C){var F=this;var D=C.getCustomData('cke_locked_selection');if(D)return D;F.document=C;F.isLocked=0;F._={cache:{}};if(g){var E=F.getNative().createRange();if(!E||E.item&&E.item(0).ownerDocument!=F.document.$||E.parentElement&&E.parentElement().ownerDocument!=F.document.$)F.isInvalid=true;}return F;};var B={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};h.selection.prototype={getNative:g?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:g?function(){var C=this._.cache;if(C.type)return C.type;var D=1;try{var E=this.getNative(),F=E.type;if(F=='Text')D=2;if(F=='Control')D=3;if(E.createRange().parentElement)D=2;}catch(G){}return C.type=D;}:function(){var C=this._.cache;if(C.type)return C.type;var D=2,E=this.getNative();if(!E)D=1;else if(E.rangeCount==1){var F=E.getRangeAt(0),G=F.startContainer;if(G==F.endContainer&&G.nodeType==1&&F.endOffset-F.startOffset==1&&B[G.childNodes[F.startOffset].nodeName.toLowerCase()])D=3;}return C.type=D;},getRanges:(function(){var C=g?(function(){function D(F){return new h.node(F).getIndex();};var E=function(F,G){F=F.duplicate();F.collapse(G);var H=F.parentElement(),I=H.ownerDocument;if(!H.hasChildNodes())return{container:H,offset:0};var J=H.children,K,L,M=F.duplicate(),N=0,O=J.length-1,P=-1,Q,R;while(N<=O){P=Math.floor((N+O)/2);K=J[P];M.moveToElementText(K);Q=M.compareEndPoints('StartToStart',F);if(Q>0)O=P-1;else if(Q<0)N=P+1;else if(f.ie9Compat&&K.tagName=='BR'){var S='cke_range_marker';F.execCommand('CreateBookmark',false,S);K=I.getElementsByName(S)[0];var T=D(K);H.removeChild(K);return{container:H,offset:T};}else return{container:H,offset:D(K)};}if(P==-1||P==J.length-1&&Q<0){M.moveToElementText(H);M.setEndPoint('StartToStart',F);R=M.text.replace(/(\r\n|\r)/g,'\n').length;J=H.childNodes;if(!R){K=J[J.length-1];if(K.nodeType==1)return{container:H,offset:J.length};else return{container:K,offset:K.nodeValue.length};}var U=J.length;while(R>0)R-=J[--U].nodeValue.length;return{container:J[U],offset:-R};}else{M.collapse(Q>0?true:false);M.setEndPoint(Q>0?'StartToStart':'EndToStart',F);R=M.text.replace(/(\r\n|\r)/g,'\n').length;if(!R)return{container:H,offset:D(K)+(Q>0?0:1)};while(R>0)try{L=K[Q>0?'previousSibling':'nextSibling'];R-=L.nodeValue.length;K=L;}catch(V){return{container:H,offset:D(K)};}return{container:K,offset:Q>0?-R:K.nodeValue.length+R};}};return function(){var P=this;var F=P.getNative(),G=F&&F.createRange(),H=P.getType(),I;if(!F)return[];if(H==2){I=new h.range(P.document);var J=E(G,true);I.setStart(new h.node(J.container),J.offset);J=E(G);I.setEnd(new h.node(J.container),J.offset);if(I.endContainer.getPosition(I.startContainer)&4&&I.endOffset<=I.startContainer.getIndex())I.collapse();return[I];}else if(H==3){var K=[];for(var L=0;L<G.length;L++){var M=G.item(L),N=M.parentNode,O=0;I=new h.range(P.document);for(;O<N.childNodes.length&&N.childNodes[O]!=M;O++){}I.setStart(new h.node(N),O);I.setEnd(new h.node(N),O+1);K.push(I);}return K;}return[];};})():function(){var D=[],E,F=this.document,G=this.getNative();if(!G)return D;if(!G.rangeCount){E=new h.range(F);E.moveToElementEditStart(F.getBody());D.push(E);}for(var H=0;H<G.rangeCount;H++){var I=G.getRangeAt(H);E=new h.range(F);E.setStart(new h.node(I.startContainer),I.startOffset);E.setEnd(new h.node(I.endContainer),I.endOffset);D.push(E);}return D;};return function(D){var E=this._.cache;if(E.ranges&&!D)return E.ranges;else if(!E.ranges)E.ranges=new h.rangeList(C.call(this));if(D){var F=E.ranges;for(var G=0;G<F.length;G++){var H=F[G],I=H.getCommonAncestor();if(I.isReadOnly())F.splice(G,1);if(H.collapsed)continue;var J=H.startContainer,K=H.endContainer,L=H.startOffset,M=H.endOffset,N=H.clone(),O;if(O=J.isReadOnly())H.setStartAfter(O);if(J&&J.type==3)if(L>=J.getLength())N.setStartAfter(J);else N.setStartBefore(J);if(K&&K.type==3)if(!M)N.setEndBefore(K);else N.setEndAfter(K);var P=new h.walker(N);P.evaluator=function(Q){if(Q.type==1&&Q.isReadOnly()){var R=H.clone();H.setEndBefore(Q);if(H.collapsed)F.splice(G--,1);if(!(Q.getPosition(N.endContainer)&16)){R.setStartAfter(Q);if(!R.collapsed)F.splice(G+1,0,R);}return true;}return false;};P.next();}}return E.ranges;};})(),getStartElement:function(){var J=this;var C=J._.cache;if(C.startElement!==undefined)return C.startElement;var D,E=J.getNative();switch(J.getType()){case 3:return J.getSelectedElement();case 2:var F=J.getRanges()[0];if(F){if(!F.collapsed){F.optimize();while(1){var G=F.startContainer,H=F.startOffset;if(H==(G.getChildCount?G.getChildCount():G.getLength())&&!G.isBlockBoundary())F.setStartAfter(G);else break;}D=F.startContainer;if(D.type!=1)return D.getParent();D=D.getChild(F.startOffset);if(!D||D.type!=1)D=F.startContainer;else{var I=D.getFirst();while(I&&I.type==1){D=I;I=I.getFirst();}}}else{D=F.startContainer;if(D.type!=1)D=D.getParent();}D=D.$;}}return C.startElement=D?new l(D):null;},getSelectedElement:function(){var C=this._.cache;if(C.selectedElement!==undefined)return C.selectedElement;var D=this,E=i.tryThese(function(){return D.getNative().createRange().item(0);},function(){var F=D.getRanges()[0],G,H;for(var I=2;I&&!((G=F.getEnclosedNode())&&G.type==1&&B[G.getName()]&&(H=G));I--)F.shrink(1);return H.$;});return C.selectedElement=E?new l(E):null;},getSelectedText:function(){var C=this._.cache;if(C.selectedText!==undefined)return C.selectedText;var D='',E=this.getNative();if(this.getType()==2)D=g?E.createRange().text:E.toString();return C.selectedText=D;},lock:function(){var C=this;C.getRanges();C.getStartElement();C.getSelectedElement();C.getSelectedText();C._.cache.nativeSel={};C.isLocked=1;C.document.setCustomData('cke_locked_selection',C);},unlock:function(C){var H=this;var D=H.document,E=D.getCustomData('cke_locked_selection');if(E){D.setCustomData('cke_locked_selection',null);if(C){var F=E.getSelectedElement(),G=!F&&E.getRanges();H.isLocked=0;H.reset();D.getBody().focus();if(F)H.selectElement(F);else H.selectRanges(G);}}if(!E||!C){H.isLocked=0;H.reset();}},reset:function(){this._.cache={};},selectElement:function(C){var E=this;if(E.isLocked){var D=new h.range(E.document);D.setStartBefore(C);D.setEndAfter(C);E._.cache.selectedElement=C;E._.cache.startElement=C;E._.cache.ranges=new h.rangeList(D);E._.cache.type=3;return;}D=new h.range(C.getDocument());D.setStartBefore(C);D.setEndAfter(C);D.select();E.document.fire('selectionchange');E.reset();},selectRanges:function(C){var Q=this;if(Q.isLocked){Q._.cache.selectedElement=null;Q._.cache.startElement=C[0]&&C[0].getTouchedStartNode();Q._.cache.ranges=new h.rangeList(C);Q._.cache.type=2;return;}if(g){if(C.length>1){var D=C[C.length-1];C[0].setEnd(D.endContainer,D.endOffset);C.length=1;}if(C[0])C[0].select();Q.reset();}else{var E=Q.getNative();if(!E)return;if(C.length){E.removeAllRanges();f.webkit&&A(Q.document);}for(var F=0;F<C.length;F++){if(F<C.length-1){var G=C[F],H=C[F+1],I=G.clone();I.setStart(G.endContainer,G.endOffset);I.setEnd(H.startContainer,H.startOffset);if(!I.collapsed){I.shrink(1,true);var J=I.getCommonAncestor(),K=I.getEnclosedNode();if(J.isReadOnly()||K&&K.isReadOnly()){H.setStart(G.startContainer,G.startOffset);C.splice(F--,1);continue;}}}var L=C[F],M=Q.document.$.createRange(),N=L.startContainer;if(L.collapsed&&(f.opera||f.gecko&&f.version<10900)&&N.type==1&&!N.getChildCount())N.appendText('');if(L.collapsed&&f.webkit&&v(L)){var O=x(Q.document);L.insertNode(O);var P=O.getNext();if(P&&!O.getPrevious()&&P.type==1&&P.getName()=='br'){A(Q.document);L.moveToPosition(P,3);}else L.moveToPosition(O,4);}M.setStart(L.startContainer.$,L.startOffset);try{M.setEnd(L.endContainer.$,L.endOffset);}catch(R){if(R.toString().indexOf('NS_ERROR_ILLEGAL_VALUE')>=0){L.collapse(1);M.setEnd(L.endContainer.$,L.endOffset);}else throw R;}E.addRange(M);}Q.reset();}},createBookmarks:function(C){return this.getRanges().createBookmarks(C);},createBookmarks2:function(C){return this.getRanges().createBookmarks2(C);},selectBookmarks:function(C){var D=[];for(var E=0;E<C.length;E++){var F=new h.range(this.document);F.moveToBookmark(C[E]);D.push(F);}this.selectRanges(D);return this;},getCommonAncestor:function(){var C=this.getRanges(),D=C[0].startContainer,E=C[C.length-1].endContainer;return D.getCommonAncestor(E);},scrollIntoView:function(){var C=this.getStartElement();C.scrollIntoView();}};})();(function(){var q=h.walker.whitespaces(true),r=/\ufeff|\u00a0/,s={table:1,tbody:1,tr:1};h.range.prototype.select=g?function(t){var E=this;var u=E.collapsed,v,w,x,y=E.getEnclosedNode();if(y)try{x=E.document.$.body.createControlRange();x.addElement(y.$);x.select();return;}catch(F){}if(E.startContainer.type==1&&E.startContainer.getName()in s||E.endContainer.type==1&&E.endContainer.getName()in s)E.shrink(1,true);var z=E.createBookmark(),A=z.startNode,B;if(!u)B=z.endNode;x=E.document.$.body.createTextRange();x.moveToElementText(A.$);x.moveStart('character',1);if(B){var C=E.document.$.body.createTextRange();C.moveToElementText(B.$);x.setEndPoint('EndToEnd',C);x.moveEnd('character',-1);}else{var D=A.getNext(q);v=!(D&&D.getText&&D.getText().match(r))&&(t||!A.hasPrevious()||A.getPrevious().is&&A.getPrevious().is('br'));w=E.document.createElement('span');w.setHtml('&#65279;');w.insertBefore(A);if(v)E.document.createText('\ufeff').insertBefore(A);}E.setStartBefore(A);A.remove();if(u){if(v){x.moveStart('character',-1);x.select();E.document.$.selection.clear();}else x.select();E.moveToPosition(w,3);w.remove();}else{E.setEndBefore(B);B.remove();x.select();}E.document.fire('selectionchange');}:function(){this.document.getSelection().selectRanges([this]);};})();(function(){var q=e.htmlParser.cssStyle,r=i.cssLength,s=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;function t(v,w){var x=s.exec(v),y=s.exec(w);if(x){if(!x[2]&&y[2]=='px')return y[1];if(x[2]=='px'&&!y[2])return y[1]+'px';}return w;};var u={elements:{$:function(v){var w=v.attributes,x=w&&w['data-cke-realelement'],y=x&&new e.htmlParser.fragment.fromHtml(decodeURIComponent(x)),z=y&&y.children[0];if(z&&v.attributes['data-cke-resizable']){var A=new q(v).rules,B=z.attributes,C=A.width,D=A.height;C&&(B.width=t(B.width,C));D&&(B.height=t(B.height,D));}return z;}}};n.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(v){var w=v.dataProcessor,x=w&&w.htmlFilter;if(x)x.addRules(u);}});e.editor.prototype.createFakeElement=function(v,w,x,y){var z=this.lang.fakeobjects,A=z[x]||z.unknown,B={'class':w,src:e.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(v.getOuterHtml()),'data-cke-real-node-type':v.type,alt:A,title:A,align:v.getAttribute('align')||''};if(x)B['data-cke-real-element-type']=x;if(y){B['data-cke-resizable']=y;var C=new q(),D=v.getAttribute('width'),E=v.getAttribute('height');D&&(C.rules.width=r(D));E&&(C.rules.height=r(E));C.populate(B);}return this.document.createElement('img',{attributes:B});};e.editor.prototype.createFakeParserElement=function(v,w,x,y){var z=this.lang.fakeobjects,A=z[x]||z.unknown,B,C=new e.htmlParser.basicWriter();v.writeHtml(C);B=C.getHtml();var D={'class':w,src:e.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(B),'data-cke-real-node-type':v.type,alt:A,title:A,align:v.attributes.align||''};if(x)D['data-cke-real-element-type']=x;if(y){D['data-cke-resizable']=y;var E=v.attributes,F=new q(),G=E.width,H=E.height;G!=undefined&&(F.rules.width=r(G));H!=undefined&&(F.rules.height=r(H));F.populate(D);}return new e.htmlParser.element('img',D);};e.editor.prototype.restoreRealElement=function(v){if(v.data('cke-real-node-type')!=1)return null;var w=l.createFromHtml(decodeURIComponent(v.data('cke-realelement')),this.document);if(v.data('cke-resizable')){var x=v.getStyle('width'),y=v.getStyle('height');x&&w.setAttribute('width',t(w.getAttribute('width'),x));y&&w.setAttribute('height',t(w.getAttribute('height'),y));}return w;};})();n.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(q){q.ui.addHandler('richcombo',o.richCombo.handler);}});e.UI_RICHCOMBO='richcombo';o.richCombo=i.createClass({$:function(q){var s=this;i.extend(s,q,{title:q.label,modes:{wysiwyg:1}});var r=s.panel||{};delete s.panel;s.id=i.getNextNumber();s.document=r&&r.parent&&r.parent.getDocument()||e.document;r.className=(r.className||'')+' cke_rcombopanel';r.block={multiSelect:r.multiSelect,attributes:r.attributes};s._={panelDefinition:r,items:{},state:2};},statics:{handler:{create:function(q){return new o.richCombo(q);}}},proto:{renderHtml:function(q){var r=[];this.render(q,r);return r.join('');},render:function(q,r){var s=f,t='cke_'+this.id,u=i.addFunction(function(z){var C=this;var A=C._;if(A.state==0)return;C.createPanel(q);if(A.on){A.panel.hide();return;}C.commit();var B=C.getValue();if(B)A.list.mark(B);else A.list.unmarkAll();A.panel.showBlock(C.id,new l(z),4);},this),v={id:t,combo:this,focus:function(){var z=e.document.getById(t).getChild(1);z.focus();},clickFn:u};function w(){var A=this;var z=A.modes[q.mode]?2:0;A.setState(q.readOnly&&!A.readOnly?0:z);A.setValue('');};q.on('mode',w,this);!this.readOnly&&q.on('readOnly',w,this);var x=i.addFunction(function(z,A){z=new h.event(z);var B=z.getKeystroke();switch(B){case 13:case 32:case 40:i.callFunction(u,A);break;default:v.onkey(v,B);}z.preventDefault();}),y=i.addFunction(function(){v.onfocus&&v.onfocus();});v.keyDownFn=x;r.push('<span class="cke_rcombo" role="presentation">','<span id=',t);if(this.className)r.push(' class="',this.className,' cke_off"');r.push(' role="presentation">','<span id="'+t+'_label" class=cke_label>',this.label,'</span>','<a hidefocus=true title="',this.title,'" tabindex="-1"',s.gecko&&s.version>=10900&&!s.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',t,'_label" aria-describedby="',t,'_text" aria-haspopup="true"');if(f.opera||f.gecko&&f.mac)r.push(' onkeypress="return false;"');if(f.gecko)r.push(' onblur="this.style.cssText = this.style.cssText;"');r.push(' onkeydown="CKEDITOR.tools.callFunction( ',x,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',y,', event);" '+(g?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',u,', this); return false;"><span><span id="'+t+'_text" class="cke_text cke_inline_label">'+this.label+'</span>'+'</span>'+'<span class=cke_openbutton><span class=cke_icon>'+(f.hc?'&#9660;':f.air?'&nbsp;':'')+'</span></span>'+'</a>'+'</span>'+'</span>');if(this.onRender)this.onRender();return v;},createPanel:function(q){if(this._.panel)return;var r=this._.panelDefinition,s=this._.panelDefinition.block,t=r.parent||e.document.getBody(),u=new o.floatPanel(q,t,r),v=u.addListBlock(this.id,s),w=this;u.onShow=function(){if(w.className)this.element.getFirst().addClass(w.className+'_panel');w.setState(1);v.focus(!w.multiSelect&&w.getValue());w._.on=1;if(w.onOpen)w.onOpen();};u.onHide=function(x){if(w.className)this.element.getFirst().removeClass(w.className+'_panel');w.setState(w.modes&&w.modes[q.mode]?2:0);w._.on=0;if(!x&&w.onClose)w.onClose();};u.onEscape=function(){u.hide();};v.onClick=function(x,y){w.document.getWindow().focus();if(w.onClick)w.onClick.call(w,x,y);if(y)w.setValue(x,w._.items[x]);else w.setValue('');u.hide(false);};this._.panel=u;this._.list=v;u.getBlock(this.id).onHide=function(){w._.on=0;w.setState(2);};if(this.init)this.init();},setValue:function(q,r){var t=this;t._.value=q;var s=t.document.getById('cke_'+t.id+'_text');if(s){if(!(q||r)){r=t.label;s.addClass('cke_inline_label');}else s.removeClass('cke_inline_label');s.setHtml(typeof r!='undefined'?r:q);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(q){this._.list.mark(q);},hideItem:function(q){this._.list.hideItem(q);},hideGroup:function(q){this._.list.hideGroup(q);},showAll:function(){this._.list.showAll();},add:function(q,r,s){this._.items[q]=s||q;this._.list.add(q,r,s);},startGroup:function(q){this._.list.startGroup(q);},commit:function(){var q=this;if(!q._.committed){q._.list.commit();q._.committed=1;o.fire('ready',q);}q._.committed=1;},setState:function(q){var r=this;if(r._.state==q)return;r.document.getById('cke_'+r.id).setState(q);r._.state=q;}}});o.prototype.addRichCombo=function(q,r){this.add(q,'richcombo',r);};n.add('htmlwriter');e.htmlWriter=i.createClass({base:e.htmlParser.basicWriter,$:function(){var s=this;s.base();s.indentationChars='\t';s.selfClosingEnd=' />';s.lineBreakChars='\n';s.forceSimpleAmpersand=0;s.sortAttributes=1;s._.indent=0;s._.indentation='';s._.inPre=0;s._.rules={};var q=j;for(var r in i.extend({},q.$nonBodyContent,q.$block,q.$listItem,q.$tableContent))s.setRules(r,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!q[r]['#'],breakAfterClose:1});s.setRules('br',{breakAfterOpen:1});s.setRules('title',{indent:0,breakAfterOpen:0});s.setRules('style',{indent:0,breakBeforeClose:1});s.setRules('pre',{indent:0});},proto:{openTag:function(q,r){var t=this;var s=t._.rules[q];if(t._.indent)t.indentation();else if(s&&s.breakBeforeOpen){t.lineBreak();t.indentation();}t._.output.push('<',q);},openTagClose:function(q,r){var t=this;var s=t._.rules[q];if(r)t._.output.push(t.selfClosingEnd);else{t._.output.push('>');if(s&&s.indent)t._.indentation+=t.indentationChars;}if(s&&s.breakAfterOpen)t.lineBreak();q=='pre'&&(t._.inPre=1);},attribute:function(q,r){if(typeof r=='string'){this.forceSimpleAmpersand&&(r=r.replace(/&amp;/g,'&'));r=i.htmlEncodeAttr(r);}this._.output.push(' ',q,'="',r,'"');},closeTag:function(q){var s=this;var r=s._.rules[q];if(r&&r.indent)s._.indentation=s._.indentation.substr(s.indentationChars.length);if(s._.indent)s.indentation();else if(r&&r.breakBeforeClose){s.lineBreak();s.indentation();}s._.output.push('</',q,'>');q=='pre'&&(s._.inPre=0);if(r&&r.breakAfterClose)s.lineBreak();},text:function(q){var r=this;if(r._.indent){r.indentation();!r._.inPre&&(q=i.ltrim(q));}r._.output.push(q);},comment:function(q){if(this._.indent)this.indentation();this._.output.push('<!--',q,'-->');},lineBreak:function(){var q=this;if(!q._.inPre&&q._.output.length>0)q._.output.push(q.lineBreakChars);q._.indent=1;},indentation:function(){var q=this;if(!q._.inPre)q._.output.push(q._.indentation);q._.indent=0;},setRules:function(q,r){var s=this._.rules[q];if(s)i.extend(s,r,true);else this._.rules[q]=r;}}});n.add('menubutton',{requires:['button','menu'],beforeInit:function(q){q.ui.addHandler('menubutton',o.menuButton.handler);}});e.UI_MENUBUTTON='menubutton';(function(){var q=function(r){var s=this._;if(s.state===0)return;s.previousState=s.state;var t=s.menu;if(!t){t=s.menu=new e.menu(r,{panel:{className:r.skinClass+' cke_contextmenu',attributes:{'aria-label':r.lang.common.options}}});t.onHide=i.bind(function(){this.setState(this.modes&&this.modes[r.mode]?s.previousState:0);},this);if(this.onMenu)t.addListener(this.onMenu);}if(s.on){t.hide();return;}this.setState(1);t.show(e.document.getById(this._.id),4);};o.menuButton=i.createClass({base:o.button,$:function(r){var s=r.panel;delete r.panel;this.base(r);this.hasArrow=true;this.click=q;},statics:{handler:{create:function(r){return new o.menuButton(r);}}}});})();n.add('dialogui');(function(){var q=function(y){var B=this;B._||(B._={});B._['default']=B._.initValue=y['default']||'';B._.required=y.required||false;var z=[B._];for(var A=1;A<arguments.length;A++)z.push(arguments[A]);z.push(true);i.extend.apply(i,z);return B._;},r={build:function(y,z,A){return new o.dialog.textInput(y,z,A);}},s={build:function(y,z,A){return new o.dialog[z.type](y,z,A);}},t={build:function(y,z,A){var B=z.children,C,D=[],E=[];for(var F=0;F<B.length&&(C=B[F]);F++){var G=[];D.push(G);E.push(e.dialog._.uiElementBuilders[C.type].build(y,C,G));}return new o.dialog[z.type](y,E,D,A,z);}},u={isChanged:function(){return this.getValue()!=this.getInitValue();},reset:function(y){this.setValue(this.getInitValue(),y);},setInitValue:function(){this._.initValue=this.getValue();},resetInitValue:function(){this._.initValue=this._['default'];},getInitValue:function(){return this._.initValue;}},v=i.extend({},o.dialog.uiElement.prototype.eventProcessors,{onChange:function(y,z){if(!this._.domOnChangeRegistered){y.on('load',function(){this.getInputElement().on('change',function(){if(!y.parts.dialog.isVisible())return;this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',z);}},true),w=/^on([A-Z]\w+)/,x=function(y){for(var z in y){if(w.test(z)||z=='title'||z=='type')delete y[z];}return y;};i.extend(o.dialog,{labeledElement:function(y,z,A,B){if(arguments.length<4)return;var C=q.call(this,z);C.labelId=i.getNextId()+'_label';var D=this._.children=[],E=function(){var F=[],G=z.required?' cke_required':'';if(z.labelLayout!='horizontal')F.push('<label class="cke_dialog_ui_labeled_label'+G+'" ',' id="'+C.labelId+'"',' for="'+C.inputId+'"',(z.labelStyle?' style="'+z.labelStyle+'"':'')+'>',z.label,'</label>','<div class="cke_dialog_ui_labeled_content"'+(z.controlStyle?' style="'+z.controlStyle+'"':'')+' role="presentation">',B.call(this,y,z),'</div>');else{var H={type:'hbox',widths:z.widths,padding:0,children:[{type:'html',html:'<label class="cke_dialog_ui_labeled_label'+G+'"'+' id="'+C.labelId+'"'+' for="'+C.inputId+'"'+(z.labelStyle?' style="'+z.labelStyle+'"':'')+'>'+i.htmlEncode(z.label)+'</span>'},{type:'html',html:'<span class="cke_dialog_ui_labeled_content"'+(z.controlStyle?' style="'+z.controlStyle+'"':'')+'>'+B.call(this,y,z)+'</span>'}]};e.dialog._.uiElementBuilders.hbox.build(y,H,F);}return F.join('');};o.dialog.uiElement.call(this,y,z,A,'div',null,{role:'presentation'},E);},textInput:function(y,z,A){if(arguments.length<3)return;q.call(this,z);var B=this._.inputId=i.getNextId()+'_textInput',C={'class':'cke_dialog_ui_input_'+z.type,id:B,type:'text'},D;if(z.validate)this.validate=z.validate;if(z.maxLength)C.maxlength=z.maxLength;if(z.size)C.size=z.size;if(z.inputStyle)C.style=z.inputStyle;var E=this,F=false;y.on('load',function(){E.getInputElement().on('keydown',function(H){if(H.data.getKeystroke()==13)F=true;});E.getInputElement().on('keyup',function(H){if(H.data.getKeystroke()==13&&F){y.getButton('ok')&&setTimeout(function(){y.getButton('ok').click();},0);F=false;}},null,null,1000);});var G=function(){var H=['<div class="cke_dialog_ui_input_',z.type,'" role="presentation"'];if(z.width)H.push('style="width:'+z.width+'" ');H.push('><input ');C['aria-labelledby']=this._.labelId;this._.required&&(C['aria-required']=this._.required);for(var I in C)H.push(I+'="'+C[I]+'" ');H.push(' /></div>');return H.join('');};o.dialog.labeledElement.call(this,y,z,A,G);},textarea:function(y,z,A){if(arguments.length<3)return;q.call(this,z);var B=this,C=this._.inputId=i.getNextId()+'_textarea',D={};if(z.validate)this.validate=z.validate;D.rows=z.rows||5;D.cols=z.cols||20;if(typeof z.inputStyle!='undefined')D.style=z.inputStyle;var E=function(){D['aria-labelledby']=this._.labelId;this._.required&&(D['aria-required']=this._.required);var F=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',C,'" '];for(var G in D)F.push(G+'="'+i.htmlEncode(D[G])+'" ');F.push('>',i.htmlEncode(B._['default']),'</textarea></div>');return F.join('');};o.dialog.labeledElement.call(this,y,z,A,E);},checkbox:function(y,z,A){if(arguments.length<3)return;var B=q.call(this,z,{'default':!!z['default']});if(z.validate)this.validate=z.validate;var C=function(){var D=i.extend({},z,{id:z.id?z.id+'_checkbox':i.getNextId()+'_checkbox'},true),E=[],F=i.getNextId()+'_label',G={'class':'cke_dialog_ui_checkbox_input',type:'checkbox','aria-labelledby':F};x(D);if(z['default'])G.checked='checked';if(typeof D.inputStyle!='undefined')D.style=D.inputStyle;B.checkbox=new o.dialog.uiElement(y,D,E,'input',null,G);E.push(' <label id="',F,'" for="',G.id,'"'+(z.labelStyle?' style="'+z.labelStyle+'"':'')+'>',i.htmlEncode(z.label),'</label>');return E.join('');};o.dialog.uiElement.call(this,y,z,A,'span',null,null,C);},radio:function(y,z,A){if(arguments.length<3)return;q.call(this,z);if(!this._['default'])this._['default']=this._.initValue=z.items[0][1];if(z.validate)this.validate=z.valdiate;var B=[],C=this,D=function(){var E=[],F=[],G={'class':'cke_dialog_ui_radio_item','aria-labelledby':this._.labelId},H=z.id?z.id+'_radio':i.getNextId()+'_radio';for(var I=0;I<z.items.length;I++){var J=z.items[I],K=J[2]!==undefined?J[2]:J[0],L=J[1]!==undefined?J[1]:J[0],M=i.getNextId()+'_radio_input',N=M+'_label',O=i.extend({},z,{id:M,title:null,type:null},true),P=i.extend({},O,{title:K},true),Q={type:'radio','class':'cke_dialog_ui_radio_input',name:H,value:L,'aria-labelledby':N},R=[];if(C._['default']==L)Q.checked='checked';x(O);x(P);if(typeof O.inputStyle!='undefined')O.style=O.inputStyle;B.push(new o.dialog.uiElement(y,O,R,'input',null,Q));R.push(' ');new o.dialog.uiElement(y,P,R,'label',null,{id:N,'for':Q.id},J[0]);E.push(R.join(''));}new o.dialog.hbox(y,[],E,F);return F.join('');};o.dialog.labeledElement.call(this,y,z,A,D);this._.children=B;},button:function(y,z,A){if(!arguments.length)return;if(typeof z=='function')z=z(y.getParentEditor());q.call(this,z,{disabled:z.disabled||false});e.event.implementOn(this);var B=this;y.on('load',function(E){var F=this.getElement();(function(){F.on('click',function(G){B.fire('click',{dialog:B.getDialog()});G.data.preventDefault();});F.on('keydown',function(G){if(G.data.getKeystroke()in{32:1}){B.click();G.data.preventDefault();}});})();F.unselectable();},this);var C=i.extend({},z);delete C.style;var D=i.getNextId()+'_label';o.dialog.uiElement.call(this,y,C,A,'a',null,{style:z.style,href:'javascript:void(0)',title:z.label,hidefocus:'true','class':z['class'],role:'button','aria-labelledby':D},'<span id="'+D+'" class="cke_dialog_ui_button">'+i.htmlEncode(z.label)+'</span>');},select:function(y,z,A){if(arguments.length<3)return;var B=q.call(this,z);if(z.validate)this.validate=z.validate;B.inputId=i.getNextId()+'_select';var C=function(){var D=i.extend({},z,{id:z.id?z.id+'_select':i.getNextId()+'_select'},true),E=[],F=[],G={id:B.inputId,'class':'cke_dialog_ui_input_select','aria-labelledby':this._.labelId};if(z.size!=undefined)G.size=z.size;if(z.multiple!=undefined)G.multiple=z.multiple;x(D);for(var H=0,I;H<z.items.length&&(I=z.items[H]);H++)F.push('<option value="',i.htmlEncode(I[1]!==undefined?I[1]:I[0]).replace(/"/g,'&quot;'),'" /> ',i.htmlEncode(I[0]));if(typeof D.inputStyle!='undefined')D.style=D.inputStyle;B.select=new o.dialog.uiElement(y,D,E,'select',null,G,F.join(''));return E.join('');};o.dialog.labeledElement.call(this,y,z,A,C);},file:function(y,z,A){if(arguments.length<3)return;if(z['default']===undefined)z['default']='';var B=i.extend(q.call(this,z),{definition:z,buttons:[]});if(z.validate)this.validate=z.validate;var C=function(){B.frameId=i.getNextId()+'_fileInput';var D=f.isCustomDomain(),E=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="',B.frameId,'" title="',z.label,'" src="javascript:void('];E.push(D?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');E.push(')"></iframe>');return E.join('');};y.on('load',function(){var D=e.document.getById(B.frameId),E=D.getParent();E.addClass('cke_dialog_ui_input_file');});o.dialog.labeledElement.call(this,y,z,A,C);},fileButton:function(y,z,A){if(arguments.length<3)return;var B=q.call(this,z),C=this;if(z.validate)this.validate=z.validate;var D=i.extend({},z),E=D.onClick;D.className=(D.className?D.className+' ':'')+'cke_dialog_ui_button';D.onClick=function(F){var G=z['for'];if(!E||E.call(this,F)!==false){y.getContentElement(G[0],G[1]).submit();this.disable();}};y.on('load',function(){y.getContentElement(z['for'][0],z['for'][1])._.buttons.push(C);});o.dialog.button.call(this,y,D,A);},html:(function(){var y=/^\s*<[\w:]+\s+([^>]*)?>/,z=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,A=/\/$/;return function(B,C,D){if(arguments.length<3)return;var E=[],F,G=C.html,H,I;if(G.charAt(0)!='<')G='<span>'+G+'</span>';var J=C.focus;if(J){var K=this.focus;this.focus=function(){K.call(this);typeof J=='function'&&J.call(this);this.fire('focus');};if(C.isFocusable){var L=this.isFocusable;this.isFocusable=L;}this.keyboardFocusable=true;}o.dialog.uiElement.call(this,B,C,E,'span',null,null,'');F=E.join('');H=F.match(y);I=G.match(z)||['','',''];if(A.test(I[1])){I[1]=I[1].slice(0,-1);I[2]='/'+I[2];}D.push([I[1],' ',H[1]||'',I[2]].join(''));};})(),fieldset:function(y,z,A,B,C){var D=C.label,E=function(){var F=[];D&&F.push('<legend>'+D+'</legend>');for(var G=0;G<A.length;G++)F.push(A[G]);return F.join('');};this._={children:z};o.dialog.uiElement.call(this,y,C,B,'fieldset',null,null,E);}},true);o.dialog.html.prototype=new o.dialog.uiElement();o.dialog.labeledElement.prototype=i.extend(new o.dialog.uiElement(),{setLabel:function(y){var z=e.document.getById(this._.labelId);if(z.getChildCount()<1)new h.text(y,e.document).appendTo(z);else z.getChild(0).$.nodeValue=y;return this;},getLabel:function(){var y=e.document.getById(this._.labelId);if(!y||y.getChildCount()<1)return'';else return y.getChild(0).getText();},eventProcessors:v},true);o.dialog.button.prototype=i.extend(new o.dialog.uiElement(),{click:function(){var y=this;if(!y._.disabled)return y.fire('click',{dialog:y._.dialog});y.getElement().$.blur();return false;},enable:function(){this._.disabled=false;var y=this.getElement();y&&y.removeClass('cke_disabled');},disable:function(){this._.disabled=true;this.getElement().addClass('cke_disabled');},isVisible:function(){return this.getElement().getFirst().isVisible();},isEnabled:function(){return!this._.disabled;},eventProcessors:i.extend({},o.dialog.uiElement.prototype.eventProcessors,{onClick:function(y,z){this.on('click',z);}},true),accessKeyUp:function(){this.click();},accessKeyDown:function(){this.focus();},keyboardFocusable:true},true);o.dialog.textInput.prototype=i.extend(new o.dialog.labeledElement(),{getInputElement:function(){return e.document.getById(this._.inputId);},focus:function(){var y=this.selectParentTab();setTimeout(function(){var z=y.getInputElement();z&&z.$.focus();},0);},select:function(){var y=this.selectParentTab();setTimeout(function(){var z=y.getInputElement();if(z){z.$.focus();z.$.select();}},0);},accessKeyUp:function(){this.select();},setValue:function(y){!y&&(y='');return o.dialog.uiElement.prototype.setValue.apply(this,arguments);},keyboardFocusable:true},u,true);o.dialog.textarea.prototype=new o.dialog.textInput();o.dialog.select.prototype=i.extend(new o.dialog.labeledElement(),{getInputElement:function(){return this._.select.getElement();},add:function(y,z,A){var B=new l('option',this.getDialog().getParentEditor().document),C=this.getInputElement().$;B.$.text=y;B.$.value=z===undefined||z===null?y:z;if(A===undefined||A===null){if(g)C.add(B.$);else C.add(B.$,null);}else C.add(B.$,A);return this;},remove:function(y){var z=this.getInputElement().$;z.remove(y);return this;},clear:function(){var y=this.getInputElement().$;while(y.length>0)y.remove(0);return this;},keyboardFocusable:true},u,true);o.dialog.checkbox.prototype=i.extend(new o.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(y,z){this.getInputElement().$.checked=y;!z&&this.fire('change',{value:y});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(y,z){if(!g)return v.onChange.apply(this,arguments);else{y.on('load',function(){var A=this._.checkbox.getElement();A.on('propertychange',function(B){B=B.data.$;if(B.propertyName=='checked')this.fire('change',{value:A.$.checked});},this);},this);this.on('change',z);}return null;}},keyboardFocusable:true},u,true);o.dialog.radio.prototype=i.extend(new o.dialog.uiElement(),{setValue:function(y,z){var A=this._.children,B;for(var C=0;C<A.length&&(B=A[C]);C++)B.getElement().$.checked=B.getValue()==y;!z&&this.fire('change',{value:y});},getValue:function(){var y=this._.children;for(var z=0;z<y.length;z++){if(y[z].getElement().$.checked)return y[z].getValue();}return null;},accessKeyUp:function(){var y=this._.children,z;for(z=0;z<y.length;z++){if(y[z].getElement().$.checked){y[z].getElement().focus();return;}}y[0].getElement().focus();},eventProcessors:{onChange:function(y,z){if(!g)return v.onChange.apply(this,arguments);else{y.on('load',function(){var A=this._.children,B=this;for(var C=0;C<A.length;C++){var D=A[C].getElement();D.on('propertychange',function(E){E=E.data.$;if(E.propertyName=='checked'&&this.$.checked)B.fire('change',{value:this.getAttribute('value')});});}},this);this.on('change',z);}return null;}},keyboardFocusable:true},u,true);o.dialog.file.prototype=i.extend(new o.dialog.labeledElement(),u,{getInputElement:function(){var y=e.document.getById(this._.frameId).getFrameDocument();return y.$.forms.length>0?new l(y.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(){return this.getInputElement().getParent().$.action;},registerEvents:function(y){var z=/^on([A-Z]\w+)/,A,B=function(D,E,F,G){D.on('formLoaded',function(){D.getInputElement().on(F,G,D);});};for(var C in y){if(!(A=C.match(z)))continue;if(this.eventProcessors[C])this.eventProcessors[C].call(this,this._.dialog,y[C]);else B(this,this._.dialog,A[1].toLowerCase(),y[C]);}return this;},reset:function(){var y=this._,z=e.document.getById(y.frameId),A=z.getFrameDocument(),B=y.definition,C=y.buttons,D=this.formLoadedNumber,E=this.formUnloadNumber,F=y.dialog._.editor.lang.dir,G=y.dialog._.editor.langCode;if(!D){D=this.formLoadedNumber=i.addFunction(function(){this.fire('formLoaded');},this);E=this.formUnloadNumber=i.addFunction(function(){this.getInputElement().clearCustomData();},this);this.getDialog()._.editor.on('destroy',function(){i.removeFunction(D);i.removeFunction(E);});}function H(){A.$.open();if(f.isCustomDomain())A.$.domain=document.domain;var I='';if(B.size)I=B.size-(g?7:0);A.$.write(['<html dir="'+F+'" lang="'+G+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+F+'" lang="'+G+'" action="',i.htmlEncode(B.action),'">','<input type="file" name="',i.htmlEncode(B.id||'cke_upload'),'" size="',i.htmlEncode(I>0?I:''),'" />','</form>','</body></html>','<script>window.parent.CKEDITOR.tools.callFunction('+D+');','window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction('+E+')}</script>'].join(''));A.$.close();for(var J=0;J<C.length;J++)C[J].enable();};if(f.gecko)setTimeout(H,500);else H();},getValue:function(){return this.getInputElement().$.value||'';},setInitValue:function(){this._.initValue='';},eventProcessors:{onChange:function(y,z){if(!this._.domOnChangeRegistered){this.on('formLoaded',function(){this.getInputElement().on('change',function(){this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',z);}},keyboardFocusable:true},true);o.dialog.fileButton.prototype=new o.dialog.button();o.dialog.fieldset.prototype=i.clone(o.dialog.hbox.prototype);e.dialog.addUIElement('text',r);e.dialog.addUIElement('password',r);e.dialog.addUIElement('textarea',s);e.dialog.addUIElement('checkbox',s);e.dialog.addUIElement('radio',s);e.dialog.addUIElement('button',s);e.dialog.addUIElement('select',s);e.dialog.addUIElement('file',s);e.dialog.addUIElement('fileButton',s);e.dialog.addUIElement('html',s);e.dialog.addUIElement('fieldset',t);})();n.add('panel',{beforeInit:function(q){q.ui.addHandler('panel',o.panel.handler);}});e.UI_PANEL='panel';o.panel=function(q,r){var s=this;if(r)i.extend(s,r);i.extend(s,{className:'',css:[]});s.id=i.getNextId();s.document=q;s._={blocks:{}};};o.panel.handler={create:function(q){return new o.panel(q);}};o.panel.prototype={renderHtml:function(q){var r=[];this.render(q,r);return r.join('');},render:function(q,r){var t=this;var s=t.id;r.push('<div class="',q.skinClass,'" lang="',q.langCode,'" role="presentation" style="display:none;z-index:'+(q.config.baseFloatZIndex+1)+'">'+'<div'+' id=',s,' dir=',q.lang.dir,' role="presentation" class="cke_panel cke_',q.lang.dir);if(t.className)r.push(' ',t.className);r.push('">');if(t.forceIFrame||t.css.length){r.push('<iframe id="',s,'_frame" frameborder="0" role="application" src="javascript:void(');r.push(f.isCustomDomain()?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');r.push(')"></iframe>');}r.push('</div></div>');return s;},getHolderElement:function(){var q=this._.holder;if(!q){if(this.forceIFrame||this.css.length){var r=this.document.getById(this.id+'_frame'),s=r.getParent(),t=s.getAttribute('dir'),u=s.getParent().getAttribute('class'),v=s.getParent().getAttribute('lang'),w=r.getFrameDocument(),x=i.addFunction(i.bind(function(A){this.isLoaded=true;if(this.onLoad)this.onLoad();},this)),y='<!DOCTYPE html><html dir="'+t+'" class="'+u+'_container" lang="'+v+'">'+'<head>'+'<style>.'+u+'_container{visibility:hidden}</style>'+'</head>'+'<body class="cke_'+t+' cke_panel_frame '+f.cssClass+'" style="margin:0;padding:0"'+' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction('+x+');"></body>'+i.buildStyleHtml(this.css)+'</html>';w.write(y);var z=w.getWindow();z.$.CKEDITOR=e;w.on('key'+(f.opera?'press':'down'),function(A){var D=this;var B=A.data.getKeystroke(),C=D.document.getById(D.id).getAttribute('dir');if(D._.onKeyDown&&D._.onKeyDown(B)===false){A.data.preventDefault();return;}if(B==27||B==(C=='rtl'?39:37))if(D.onEscape&&D.onEscape(B)===false)A.data.preventDefault();},this);q=w.getBody();q.unselectable();f.air&&i.callFunction(x);}else q=this.document.getById(this.id);this._.holder=q;}return q;},addBlock:function(q,r){var s=this;r=s._.blocks[q]=r instanceof o.panel.block?r:new o.panel.block(s.getHolderElement(),r);if(!s._.currentBlock)s.showBlock(q);return r;},getBlock:function(q){return this._.blocks[q];},showBlock:function(q){var r=this._.blocks,s=r[q],t=this._.currentBlock,u=this.forceIFrame?this.document.getById(this.id+'_frame'):this._.holder;u.getParent().getParent().disableContextMenu();if(t){u.removeAttributes(t.attributes);t.hide();}this._.currentBlock=s;u.setAttributes(s.attributes);e.fire('ariaWidget',u);s._.focusIndex=-1;this._.onKeyDown=s.onKeyDown&&i.bind(s.onKeyDown,s);s.onMark=function(v){u.setAttribute('aria-activedescendant',v.getId()+'_option');};s.onUnmark=function(){u.removeAttribute('aria-activedescendant');};s.show();return s;},destroy:function(){this.element&&this.element.remove();}};o.panel.block=i.createClass({$:function(q,r){var s=this;s.element=q.append(q.getDocument().createElement('div',{attributes:{tabIndex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(r)i.extend(s,r);if(!s.attributes.title)s.attributes.title=s.attributes['aria-label'];s.keys={};s._.focusIndex=-1;s.element.disableContextMenu();},_:{markItem:function(q){var t=this;if(q==-1)return;var r=t.element.getElementsByTag('a'),s=r.getItem(t._.focusIndex=q);if(f.webkit||f.opera)s.getDocument().getWindow().focus();s.focus();t.onMark&&t.onMark(s);}},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var q=this;if(!q.onHide||q.onHide.call(q)!==true)q.element.setStyle('display','none');},onKeyDown:function(q){var v=this;var r=v.keys[q];switch(r){case'next':var s=v._.focusIndex,t=v.element.getElementsByTag('a'),u;while(u=t.getItem(++s)){if(u.getAttribute('_cke_focus')&&u.$.offsetWidth){v._.focusIndex=s;u.focus();break;}}return false;case'prev':s=v._.focusIndex;t=v.element.getElementsByTag('a');while(s>0&&(u=t.getItem(--s))){if(u.getAttribute('_cke_focus')&&u.$.offsetWidth){v._.focusIndex=s;u.focus();break;}}return false;case'click':case'mouseup':s=v._.focusIndex;u=s>=0&&v.element.getElementsByTag('a').getItem(s);if(u)u.$[r]?u.$[r]():u.$['on'+r]();return false;}return true;}}});n.add('listblock',{requires:['panel'],onLoad:function(){o.panel.prototype.addListBlock=function(q,r){return this.addBlock(q,new o.listBlock(this.getHolderElement(),r));};o.listBlock=i.createClass({base:o.panel.block,$:function(q,r){var u=this;r=r||{};var s=r.attributes||(r.attributes={});(u.multiSelect=!!r.multiSelect)&&(s['aria-multiselectable']=true);!s.role&&(s.role='listbox');u.base.apply(u,arguments);var t=u.keys;t[40]='next';t[9]='next';t[38]='prev';t[2228224+9]='prev';t[32]=g?'mouseup':'click';g&&(t[13]='mouseup');u._.pendingHtml=[];u._.items={};u._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('</ul>');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=i.addFunction(function(q){var s=this;var r=true;if(s.multiSelect)r=s.toggle(q);else s.mark(q);if(s.onClick)s.onClick(q,r);},this);return this._.click;}},proto:{add:function(q,r,s){var v=this;var t=v._.pendingHtml,u=i.getNextId();if(!v._.started){t.push('<ul role="presentation" class=cke_panel_list>');v._.started=1;v._.size=v._.size||0;}v._.items[q]=u;t.push('<li id=',u,' class=cke_panel_listItem role=presentation><a id="',u,'_option" _cke_focus=1 hidefocus=true title="',s||q,'" href="javascript:void(\'',q,"')\" "+(g?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',v._.getClick(),",'",q,"'); return false;\"",' role="option" aria-posinset="'+ ++v._.size+'">',r||q,'</a></li>');},startGroup:function(q){this._.close();var r=i.getNextId();this._.groups[q]=r;this._.pendingHtml.push('<h1 role="presentation" id=',r,' class=cke_panel_grouptitle>',q,'</h1>');},commit:function(){var t=this;t._.close();t.element.appendHtml(t._.pendingHtml.join(''));var q=t._.items,r=t.element.getDocument();for(var s in q)r.getById(q[s]+'_option').setAttribute('aria-setsize',t._.size);delete t._.size;t._.pendingHtml=[];},toggle:function(q){var r=this.isMarked(q);if(r)this.unmark(q);else this.mark(q);return!r;},hideGroup:function(q){var r=this.element.getDocument().getById(this._.groups[q]),s=r&&r.getNext();if(r){r.setStyle('display','none');if(s&&s.getName()=='ul')s.setStyle('display','none');}},hideItem:function(q){this.element.getDocument().getById(this._.items[q]).setStyle('display','none');},showAll:function(){var q=this._.items,r=this._.groups,s=this.element.getDocument();for(var t in q)s.getById(q[t]).setStyle('display','');for(var u in r){var v=s.getById(r[u]),w=v.getNext();v.setStyle('display','');if(w&&w.getName()=='ul')w.setStyle('display','');}},mark:function(q){var t=this;if(!t.multiSelect)t.unmarkAll();var r=t._.items[q],s=t.element.getDocument().getById(r);s.addClass('cke_selected');t.element.getDocument().getById(r+'_option').setAttribute('aria-selected',true);t.element.setAttribute('aria-activedescendant',r+'_option');t.onMark&&t.onMark(s);},unmark:function(q){var u=this;var r=u.element.getDocument(),s=u._.items[q],t=r.getById(s);t.removeClass('cke_selected');r.getById(s+'_option').removeAttribute('aria-selected');u.onUnmark&&u.onUnmark(t);},unmarkAll:function(){var u=this;var q=u._.items,r=u.element.getDocument();for(var s in q){var t=q[s];r.getById(t).removeClass('cke_selected');r.getById(t+'_option').removeAttribute('aria-selected');}u.onUnmark&&u.onUnmark();},isMarked:function(q){return this.element.getDocument().getById(this._.items[q]).hasClass('cke_selected');},focus:function(q){this._.focusIndex=-1;if(q){var r=this.element.getDocument().getById(this._.items[q]).getFirst(),s=this.element.getElementsByTag('a'),t,u=-1;while(t=s.getItem(++u)){if(t.equals(r)){this._.focusIndex=u;break;}}setTimeout(function(){r.focus();},0);}}}});}});e.themes.add('default',(function(){var q={};function r(s,t){var u,v;v=s.config.sharedSpaces;v=v&&v[t];v=v&&e.document.getById(v);if(v){var w='<span class="cke_shared " dir="'+s.lang.dir+'"'+'>'+'<span class="'+s.skinClass+' '+s.id+' cke_editor_'+s.name+'">'+'<span class="'+f.cssClass+'">'+'<span class="cke_wrapper cke_'+s.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+t+'">'+'</div></span></span></span></span></span>',x=v.append(l.createFromHtml(w,v.getDocument()));if(v.getCustomData('cke_hasshared'))x.hide();else v.setCustomData('cke_hasshared',1);u=x.getChild([0,0,0,0]);!s.sharedSpaces&&(s.sharedSpaces={});s.sharedSpaces[t]=u;s.on('focus',function(){for(var y=0,z,A=v.getChildren();z=A.getItem(y);y++){if(z.type==1&&!z.equals(x)&&z.hasClass('cke_shared'))z.hide();}x.show();});s.on('destroy',function(){x.remove();});}return u;};return{build:function(s,t){var u=s.name,v=s.element,w=s.elementMode;if(!v||w==0)return;if(w==1)v.hide();var x=s.fire('themeSpace',{space:'top',html:''}).html,y=s.fire('themeSpace',{space:'contents',html:''}).html,z=s.fireOnce('themeSpace',{space:'bottom',html:''}).html,A=y&&s.config.height,B=s.config.tabIndex||s.element.getAttribute('tabindex')||0;if(!y)A='auto';else if(!isNaN(A))A+='px';var C='',D=s.config.width;if(D){if(!isNaN(D))D+='px';C+='width: '+D+';';}var E=x&&r(s,'top'),F=r(s,'bottom');E&&(E.setHtml(x),x='');F&&(F.setHtml(z),z='');var G='<style>.'+s.skinClass+'{visibility:hidden;}</style>';if(q[s.skinClass])G='';else q[s.skinClass]=1;var H=l.createFromHtml(['<span id="cke_',u,'" class="',s.skinClass,' ',s.id,' cke_editor_',u,'" dir="',s.lang.dir,'" title="',f.gecko?' ':'','" lang="',s.langCode,'"'+(f.webkit?' tabindex="'+B+'"':'')+' role="application"'+' aria-labelledby="cke_',u,'_arialbl"'+(C?' style="'+C+'"':'')+'>'+'<span id="cke_',u,'_arialbl" class="cke_voice_label">'+s.lang.editor+'</span>'+'<span class="',f.cssClass,'" role="presentation"><span class="cke_wrapper cke_',s.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',x?'':' style="display:none"',' role="presentation"><td id="cke_top_',u,'" class="cke_top" role="presentation">',x,'</td></tr><tr',y?'':' style="display:none"',' role="presentation"><td id="cke_contents_',u,'" class="cke_contents" style="height:',A,'" role="presentation">',y,'</td></tr><tr',z?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',u,'" class="cke_bottom" role="presentation">',z,'</td></tr></tbody></table>'+G+'</span>'+'</span>'+'</span>'].join(''));H.getChild([1,0,0,0,0]).unselectable();H.getChild([1,0,0,0,2]).unselectable();if(w==1)H.insertAfter(v);else v.append(H);s.container=H;H.disableContextMenu();s.on('contentDirChanged',function(I){var J=(s.lang.dir!=I.data?'add':'remove')+'Class';H.getChild(1)[J]('cke_mixed_dir_content');var K=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];K&&K.getParent().getParent()[J]('cke_mixed_dir_content');});s.fireOnce('themeLoaded');s.fireOnce('uiReady');},buildDialog:function(s){var t=i.getNextNumber(),u=l.createFromHtml(['<div class="',s.id,'_dialog cke_editor_',s.name.replace('.','\\.'),'_dialog cke_skin_',s.skinName,'" dir="',s.lang.dir,'" lang="',s.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+f.cssClass,' cke_',s.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+s.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',g?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+t).replace(/%/g,'cke_dialog_')),v=u.getChild([0,0,0,0,0]),w=v.getChild(0),x=v.getChild(1);w.unselectable();x.unselectable();return{element:u,parts:{dialog:u.getChild(0),title:w,close:x,tabs:v.getChild(2),contents:v.getChild([3,0,0,0]),footer:v.getChild([3,0,1,0])}};},destroy:function(s){var t=s.container,u=s.element;if(t){t.clearCustomData();t.remove();}if(u){u.clearCustomData();s.elementMode==1&&u.show();delete s.element;}}};})());e.editor.prototype.getThemeSpace=function(q){var r='cke_'+q,s=this._[r]||(this._[r]=e.document.getById(r+'_'+this.name));return s;};e.editor.prototype.resize=function(q,r,s,t){var u=this.container,v=e.document.getById('cke_contents_'+this.name),w=t?u.getChild(1):u;f.webkit&&w.setStyle('display','none');w.setSize('width',q,true);if(f.webkit){w.$.offsetWidth;w.setStyle('display','');}var x=s?0:(w.$.offsetHeight||0)-(v.$.clientHeight||0);v.setStyle('height',Math.max(r-x,0)+'px');this.fire('resize');};e.editor.prototype.getResizable=function(q){return q?e.document.getById('cke_contents_'+this.name):this.container;};(function(){n.add('ajax',{requires:['xml']});e.ajax=(function(){var q=function(){if(!g||location.protocol!='file:')try{return new XMLHttpRequest();}catch(v){}try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(w){}try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(x){}return null;},r=function(v){return v.readyState==4&&(v.status>=200&&v.status<300||v.status==304||v.status===0||v.status==1223);},s=function(v){if(r(v))return v.responseText;return null;},t=function(v){if(r(v)){var w=v.responseXML;return new e.xml(w&&w.firstChild?w:v.responseText);}return null;},u=function(v,w,x){var y=!!w,z=q();if(!z)return null;z.open('GET',v,y);if(y)z.onreadystatechange=function(){if(z.readyState==4){w(x(z));z=null;}};z.send(null);return y?'':x(z);};return{load:function(v,w){return u(v,w,s);},loadXml:function(v,w){return u(v,w,t);}};})();})();var a={};window.CKeditorHelper=a;a.overrideTablePropDefaults=function(){e.on('dialogDefinition',function(q){var r=q.data.definition,s=q.data.name;if(s=='table'){if(r.defaultsModified)return;r.defaultsModified=true;var t=r.getContents('info'),u=t.get('txtBorder');u['default']='';var v=t.get('txtCellSpace');v['default']='';var w=t.get('txtCellPad');w['default']='';}});};a.fixBrokenDimCalc=function(){if(!(g&&navigator.userAgent.match(/MSIE [678]/)))return;e.on('instanceReady',function(q){var r=document.getElementById('cke_'+q.editor.name),s=r?r.firstChild:r;if(r&&r!=s&&s.offsetHeight<r.offsetHeight){var t,u=r.getElementsByTagName('iframe');if(u&&u.length==1){u=u[0].style;u.display='none';u.display='block';u=r.getElementsByTagName('td');for(t=0;t<u.length;t++){if(u[t].className=='cke_contents'){u[t].style.height=r.offsetHeight+'px';break;}}}}});};a.useAttributesForImgDim=function(){e.on('instanceReady',function(q){q.editor.dataProcessor.htmlFilter.addRules({elements:{img:function(r){var s=r.attributes,t;if(s.style){if(!s.width){t=s.style.replace(/.*?(?:^width|\swidth): ?(\d+)px.*/i,'$1');if(parseInt(t,10)>-1){s.style=s.style.replace(/(.*?)(?:^width|\swidth): ?\d+px;?(.*)/i,'$1$2').replace(/\s*/,'');s.width=t.replace(/\s*/,'');}}if(!s.height){t=s.style.replace(/.*?(?:^height|\sheight): ?(\d+)px.*/i,'$1');if(parseInt(t,10)>-1){s.style=s.style.replace(/(.*?)(?:^height|\sheight): ?\d+px;?(.*)/i,'$1$2').replace(/\s*/,'');s.height=t.replace(/\s*/,'');}}}}}});});};a.fckSetupRetryCount=0;a.integrationSetupCompleted=false;a.integrationSetup=function(){if(a.integrationSetupCompleted)return;if(e.status=='ready'||e.status=='loaded'){a.integrationSetupCompleted=true;d();if(typeof e.addStylesSet=='undefined')e.addStylesSet=function(r){e.stylesSet.add.apply(e.stylesSet,r);};a.overrideTablePropDefaults();a.fixBrokenDimCalc();a.useAttributesForImgDim();if(typeof Form!='undefined'&&Form.Element&&Form.Element.Serializers){var q=Form.Element.Serializers.textarea;Form.Element.Serializers.textarea=function(r){try{var s=e.instances[r.id];if(!s)s=e.instances[r.name];if(s)s.updateElement();}catch(t){log4js.logger.error('Unable to call update CKEditors',t);}return q(r);};}}else{a.fckSetupRetryCount++;if(a.fckSetupRetryCount<20)window.setTimeout(a.integrationSetup,500);else log4js.logger.warn('Gave up on integration setup for CKEditor.');}};a.integrationSetup();m.removePlugins='about,scayt,wsc';window.customConfigPath=resourcesPath+'FCKconfig/';a.fckactivate=function(q){if(typeof q.setup_fck!='undefined')return;q.setup_fck=true;var r={},s=l.get(q),t=s.getComputedStyle('height');if(!!t&&q.offsetHeight>200)r.height=t;var u=q.className.match(/fckeditor_config_(\w+)/);if(u){var v=u[1]+'.js';r.customConfig=customConfigPath+v;}q.serializeValue=function(w,x,y,z){x.push(encodeURIComponent(y)+'='+encodeURIComponent(e.instances[this.id].getData()));};e.replace(q,r);};window.CKeditorHelper.fckactivate=a.fckactivate;a.checkPermission=function(q){if(!q)return;var r=[],s=false,t=b(),u=t.length;if(u===0)return;for(var v=0,w=q.length;v<w;v++){var x=q[v];if(x==='/'&&!s){r[r.length]=x;s=true;continue;}var y=[];for(var z=0,A=x.length;z<A;z++){var B=x[z];if(c(B,t,u))y[y.length]=B;}if(y.length>0){r[r.length]=y;s=false;}q[v]=null;}if(r[0]==='/')r.shift();if(r[r.length-1]==='/')r.pop();q.length=0;q.push.apply(q,r);};function b(){var q,r=[],s=window.top.document.getElementsByTagName('dfn');for(var t=0,u=s.length;t<u;t++){q=s[t];if(!q)continue;if(!(q.className&&q.className.match(/richtexteditorpermissionhelper/)))continue;q=q.firstChild?q.firstChild.nodeValue.split(','):[];r.push.apply(r,q);}return r;};function c(q,r,s){for(var t=0;t<s;t++){if(r[t]===q)return false;}return true;};window.CKeditorHelper.checkPermission=a.checkPermission;a.addURLParam=function(q,r){var s=q.indexOf('?')==-1?'?':'&';return q+s+r;};window.CKeditorHelper.addURLParam=a.addURLParam;a.setupCKFileManager=function(q,r,s){if(r){q.filebrowserBrowseUrl=r;q.filebrowserImageBrowseUrl=a.addURLParam(r,'Type=Image');q.filebrowserFlashBrowseUrl=a.addURLParam(r,'Type=Flash');if(f.webkit)q.filebrowserWindowWidth=parseInt(document.body.offsetWidth*0.8,10);}if(s){}};window.CKeditorHelper.setupCKFileManager=a.setupCKFileManager;function d(){m.toolbar_Basic=[['Bold','Italic','Underline'],['NumberedList','BulletedList'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Outdent','Indent','Blockquote'],['Source']];m.toolbar_Media=[['Undo','Redo','Image','Flash','Link','Unlink','Source']];m.toolbar_Standard=[['Templates','Format','-','Bold','Italic','Underline','NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight'],['Link','Unlink','-','Image','Flash','Table','SpecialChar','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Source']];m.toolbar_Web=[['Templates','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Find','Replace','-','SelectAll','RemoveFormat','-','Undo','Redo'],['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor','-','Image','Flash','Table','SpecialChar','HorizontalRule'],['Format','Font','FontSize','-','TextColor','BGColor','-','Maximize','ShowBlocks','-','Source']];m.toolbar_Complete=[['Templates','-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Find','Replace','-','SelectAll','RemoveFormat','-','Undo','Redo'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['BidiLtr','BidiRtl'],['Link','Unlink','Anchor','-','Image','Flash','Table','Smiley','SpecialChar','HorizontalRule','PageBreak','Iframe'],['Styles','Format','Font','FontSize','-','TextColor','BGColor','-','Maximize','ShowBlocks','-','Source']];};e.on('instanceReady',function(q){var r=q.editor.dataProcessor.writer,s,t=this.dtd;for(var u in i.extend({},t.$block,t.$listItem,t.$tableContent))r.setRules(u,{indent:!t.$block[u]||t.$list[u],breakBeforeOpen:1,breakAfterOpen:0,breakBeforeClose:!t[u]['#'],breakAfterClose:1});});(function(){function q(r){if(r.cmspages)return;r.cmspages=true;var s=r.getContents('info'),t=s.get('linkType');t.items=[['CMS Page','cms']].concat(t.items);t.setup=i.override(t.setup,function(u){return function(v){if(v.url){if((v.url.url||'').indexOf('cms')==0)v.type='cms';}else if(!(!!v.email||!!v.anchor))v.type='cms';if(u)u.call(this,v);};});t.onChange=i.override(t.onChange,function(u){return function(v){if(u)u.call(this,v);var w=this.getDialog(),x=['cmsOptions'],y=this.getValue();if(y=='cms')if(w.getParentEditor().config.linkShowTargetTab)w.showPage('target');for(var z=0;z<x.length;z++){var A=w.getContentElement('info',x[z]);if(!A)continue;A=A.getElement().getParent().getParent();if(x[z]==y+'Options')A.show();else A.hide();}};});s.add({id:'cmsOptions',label:'Page',type:'select',items:[],pagesLoaded:false,onLoad:function(u){var v=this;e.ajax.load(connectorURL+'?Command=GetPages',function(w){v.pagesLoaded=true;var x,y=eval(w),z=v.getValue();v.clear();for(x=0;x<y.length;x++)v.add(y[x][0],y[x][1]);if(z)v.setValue(z);delete y.p;});},setup:function(u){if(u.url){if(!this.pagesLoaded)this.add(u.url.url);this.setValue(u.url.url);if(u.type=='cms')u.url.url='';}},commit:function(u){u.cmsUrl=this.getValue();if(!u.url)u.url={};}});r.onOk=i.override(r.onOk,function(u){return function(v){var w={},x=[],y={},z=this,A=this.getParentEditor();this.commitContent(y);if(y.type!='cms'){if(u)u.call(this,v);return;}var B=y.cmsUrl||'';w['data-cke-saved-href']=B;if(y.target)if(y.target.type=='popup'){var C=["window.open(this.href, '",y.target.name||'',"', '"],D=['resizable','status','location','toolbar','menubar','fullscreen','scrollbars','dependent'],E=D.length,F=function(Q){if(y.target[Q])D.push(Q+'='+y.target[Q]);};for(var G=0;G<E;G++)D[G]=D[G]+(y.target[D[G]]?'=yes':'=no');F('width');F('left');F('height');F('top');C.push(D.join(','),"'); return false;");w['data-cke-pa-onclick']=C.join('');x.push('target');}else{if(y.target.type!='notSet'&&y.target.name)w.target=y.target.name;else x.push('target');x.push('data-cke-pa-onclick','onclick');}if(y.adv){var H=function(Q,R){var S=y.adv[Q];if(S)w[R]=S;else x.push(R);};H('advId','id');H('advLangDir','dir');H('advAccessKey','accessKey');if(y.adv.advName){w.name=w['data-cke-saved-name']=y.adv.advName;w['class']=(w['class']?w['class']+' ':'')+'cke_anchor';}else x=x.concat(['data-cke-saved-name','name']);H('advLangCode','lang');H('advTabIndex','tabindex');H('advTitle','title');H('advContentType','type');H('advCSSClasses','class');H('advCharset','charset');H('advStyles','style');H('advRel','rel');}w.href=w['data-cke-saved-href'];if(!this._.selectedElement){var I=A.getSelection(),J=I.getRanges(true);if(J.length==1&&J[0].collapsed){var K=new h.text(y.type=='email'?y.email.address:w['data-cke-saved-href'],A.document);J[0].insertNode(K);J[0].selectNodeContents(K);I.selectRanges(J);}var L=new e.style({element:'a',attributes:w});L.type=2;L.apply(A.document);}else{var M=this._.selectedElement,N=M.data('cke-saved-href'),O=M.getHtml();if(g&&!(e.document.$.documentMode>=8)&&w.name!=M.getAttribute('name')){var P=new l('<a name="'+i.htmlEncode(w.name)+'">',A.document);I=A.getSelection();M.copyAttributes(P,{name:1});M.moveChildren(P);P.replace(M);M=P;I.selectElement(M);}M.setAttributes(w);M.removeAttributes(x);if(N==O||y.type=='email'&&O.indexOf('@')!=-1)M.setHtml(y.type=='email'?y.email.address:w['data-cke-saved-href']);if(M.getAttribute('name'))M.addClass('cke_anchor');else M.removeClass('cke_anchor');if(this.fakeObj)A.createFakeElement(M,'cke_anchor','anchor').replace(this.fakeObj);delete this._.selectedElement;}};});};m.cmsPageConnector=false;m.extraPlugins=m.extraPlugins+',cmspages';n.add('cmspages',{requires:['link','image'],init:function(r){if(!!r.config.cmsPageConnector)e.on('dialogDefinition',function(s){var t=s.data.definition,u=s.data.name;if(u=='link')q(t);else if(u=='image')t.removeContents('Link');});}});})();})();
/*  JS Resource: lib/miwt/miwt-lib.js  */

if(typeof miwt=='undefined')miwt={};if(typeof miwtutil=='undefined'){var miwtutil={};if(typeof Node=='undefined'){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};}
if(!Array.prototype.each){Array.prototype.each=function(f){for(var h=0,hb=this.length;h<hb;h++)f(h,this[h]);};}
if(!Array.prototype.filter){Array.prototype.filter=function(f,thisObj){var h=0,hb=this.length,r=[];for(;h++<hb;)if(f.call(thisObj,this[h],h,this))r.push(this[h]);return r;};};if(!Array.prototype.without){Array.prototype.without=function(w){return this.filter(function(v){return w!=v;})};}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(e){for(var h=0,hb=this.length;h<hb;h++)if(this[h]==e)return h;return -1;};}
if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};}
miwt.B=(function(){var ua=navigator.userAgent,isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{IE:!!window.attachEvent&&!isOpera,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/')> -1,Gecko:ua.indexOf('Gecko')> -1&&ua.indexOf('KHTML')=== -1};})();miwt.children=function(el){if(typeof el.children!='undefined')return miwt.array(el.children);else{var l=[],n=el.firstChild;while(n){if(n.nodeType==1)l.push(n);n=n.nextSibling;}
return l;}};miwt.childElementCount=function(el){if(typeof el.childElementCount!='undefined')return el.childElementCount;else{var c=0,n=el.firstChild;while(n){if(n.nodeType==1)c++;n=n.nextSibling;}
return c;}};miwt.parseUri=function(url){var p=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],u={},i=p.length,m=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);while(i--)u[p[i]]=m[i]||"";return u;};miwt.getComputedStyle=function(el,style){if(document.defaultView&&document.defaultView.getComputedStyle)
return document.defaultView.getComputedStyle(el,"").getPropertyValue(style);else if(el.currentStyle)return el.currentStyle[style];else return"";};miwt.height=function(el){var h,s=el.style,p={},sl={position:'absolute',visibility:'hidden',display:'block',top:'auto',bottom:'auto'},k;for(k in sl){p[k]=s[k];s[k]=sl[k];}
h=el.offsetHeight;for(k in sl){s[k]=p[k];}
return h;};miwt.hasCSSRule=function(el,style,excludeValue){if(!!el.style[style]&&(excludeValue==null||el.style[style]!=excludeValue))
return true;var ss,r,i=0,j,v;el=[el];try{for(;i<document.styleSheets.length&&(ss=document.styleSheets[i++]);){ss=ss.cssRules||ss.rules;if(!ss)continue;for(j=0;r=ss[j++];){try{v=r.style[style];if(v&&(excludeValue==null||v!=excludeValue)&&miwt.$$.matches(r.selectorText,el).length==1){return true;}}catch(e){}}}}catch(e2){miwt.debug('Unable to check stylesheets: '+e2,e2);}
return false;};miwt.closeCKEditors=function(el){if(typeof CKEDITOR=='undefined')return;var i,ta,list=el.getElementsByTagName('textarea');for(i=0;i<list.length;i++){ta=list[i];var editor=CKEDITOR.instances[ta.id];if(editor){try{}finally{if(editor)
editor.destroy();}}}};miwt.pointer=function(evt){var de=document.documentElement,body=document.body,x=evt.pageX||(evt.clientX +(de.scrollLeft||body.scrollLeft) -(de.clientLeft||0)),y=evt.pageY||(evt.clientY +(de.scrollTop||body.scrollTop) -(de.clientTop||0));return{0:x,1:y,x:x,y:y,left:x,top:y};};miwt.$=function element(el){return(typeof el=='string')?document.getElementById(el):el;};miwt.$$=Sizzle_i2rd;miwt.addClassName=function(el,cn){cn=cn.trim();if(!miwt.hasClassName(el,cn))el.className=((el.className||'') +' ' +cn).trim();};miwt.removeClassName=function(el,cn){if(!miwt.hasClassName(el,cn))return;el.className=(el.className||'').replace(RegExp("(^|\\s+)" +cn.trim() +"(\\s+|$)",'g'),' ').trim();};miwt.hasClassName=function(el,cn){var cur=(el.className||'');return(RegExp('\\b'+cn+'\\b').test(cur));};miwt.element=function element(evt){if(typeof evt=='string')return miwt.$(evt);evt=evt||window.event;evt=evt.target||evt.srcElement;if(evt&&evt.nodeType==Node.TEXT_NODE)evt=evt.parentNode;return evt;};miwt.scrollTo=function(el){el=miwt.$(el);var p=miwt.cumulativeOffset(el);window.scrollTo(p.x,p.y);};miwt.findElement=function findElement(start,expression){start=miwt.element(start)||start;while(start){var m=miwt.$$(expression,start);if(m[0])return m[0];start=start.parentNode;}
return null;};miwt.siblings=function(el){var i,l=[],n=miwt.$(el).parentNode.childNodes;for(i=0;i<n.length;i++)if(n[i]!=el)l.push(n[i]);return l;};miwt.array=function(nl){var i,l=[];for(i=0;i<nl.length;i++)l.push(nl[i]);return l;};miwt.wrap=function(el,tag){var w=document.createElement(tag);w.addChild(el);return w;};miwt.remove=function(el){el=miwt.$(el);if(el.parentNode)el.parentNode.removeChild(el);return el;};miwt.getDimensions=function(el){el=miwt.$(el);return{width:el.offsetWidth,height:el.offsetHeight};};miwt.up=function(el,expression){el=miwt.element(el)||el;while(el){var m=miwt.$$.matches(expression,[el]);if(m[0])return m[0];el=el.parentNode;}
return null;};miwt.words=function(s){return s?s.split(/\s+/):[];};miwt.stop=function(evt){evt=evt||window.event;if(evt.preventDefault)evt.preventDefault();if(evt.stopPropagation)evt.stopPropagation();evt.cancelBubble=true;evt.returnValue=false;};miwt.extend=function(dest,src){for(var p in src)
dest[p]=src[p];return dest;};miwt.cumulativeOffset=function(el,scroll){el=miwt.$(el);scroll=!!scroll;var y=0,x=0,t=scroll?'scroll':'offset',wk=miwt.B.WebKit,b=document.body;if(el.parentNode){do{y +=el[t +'Top']||0;x +=el[t +'Left']||0;el=scroll?el.parentNode:el.offsetParent;if(!scroll&&wk&&el==b&&miwt.getComputedStyle(el,'position')=='absolute')
break;}while(el);}
return{0:x,1:y,x:x,y:y,left:x,top:y};};miwt.observe=function(el,name,observer,cap){el=miwt.$(el);if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||el.attachEvent))
name='keydown';if(el.addEventListener){el.addEventListener(name,observer,(cap||false));}else if(el.attachEvent){el.attachEvent('on' +name,observer);}};miwt.stopObserving=function(el,name,observer,cap){el=miwt.$(el);if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||el.detachEvent))
name='keydown';if(el.removeEventListener){el.removeEventListener(name,observer,(cap||false));}else if(el.detachEvent){try{el.detachEvent('on' +name,observer);}catch(e){}}};miwt.serialize=function(form,sv){var t,e,i,s=[];sv=sv||miwt.serializeValue;for(i=0;e=form.elements[i];i++){t=e.type;if(e.serializeValue)e.serializeValue(form,s,e.name,e.value);else if(e.name&&!e.disabled&&t!='submit'&&t!='file'){switch(e.nodeName.toLowerCase()){case'input':switch(t){case'checkbox':case'radio':if(e.checked)sv(form,s,e.name,e.value);break;case'button':break;default:sv(form,s,e.name,e.value);break;}
break;case'select':for(var o,j=0;o=e.options[j];j++)if(o.selected)sv(form,s,e.name,o.value);break;case'button':break;default:sv(form,s,e.name,e.value);break;}}}
return s.join('&');};miwt.disabled=function(el){el.disabled||el.getAttribute("disabled")!=null;};miwt.serializeValue=function(f,s,n,v){if(n&&v!=null){s.push(encodeURIComponent(n) +'=' +encodeURIComponent(v));}};miwt.viewResource=function(url,newWindow){var f=miwt.$$("form.viewresource").pop(),pleaseNo=document.all&&!window.opera;if(f){f.action=url;if(newWindow)
f.target="_blank";else
f.target="_self";f.submit();}else{url=url +(miwt.parseUri(url).query?'&':'?') +"disposition=inline";if(newWindow){var nw=pleaseNo?window.open():window.open(url,'_blank');if(!nw){if(confirm(miwt.$$("dfn.miwt_popup_blocked").pop().firstChild.data))
window.location.href=url;}else if(pleaseNo){var mesg=miwt.$$("dfn.miwt_loading_file").pop().firstChild.data;nw.document.write('<p>' +mesg.replace(/\${url}/,url) +'</p>');nw.location=url;}}else{window.location.href=url;}}};miwt.saveResource=function(url){var f=miwt.$$("form.saveresource").pop();if(f){f.action=url;f.submit();}else{var nw=window.open(url +(miwt.parseUri(url).query?'&':'?') +"disposition=attachment");if(!nw){if(confirm(miwt.$$("dfn.miwt_popup_blocked").pop().firstChild.data))
window.location.href=url;}}};miwt._log=function logger(t,args){var l=window.console,t=arguments[0],f;if(typeof log4js!='undefined')l=log4js.logger;if(l&&typeof(f=l[t])=='function')f.apply(l,args);};miwt.error=function(){miwt._log("error",arguments);};miwt.warn=function(){miwt._log("warn",arguments);};miwt.info=function(){miwt._log("info",arguments);};miwt.debug=function(){miwt._log("debug",arguments);};}
if(typeof miwt.Form=='undefined'){miwt.prv_FormOnSubmitHandler=function(evt){var form=miwt.element(evt);if(!form||!form.MIWTOnSubmit)
return true;return form.MIWTOnSubmit.apply(form);};miwt.TransientFieldNames=["btnhit","dnd_source","dnd_target","dnd_location","dnd_option"];miwt.Form=function(){this.initialize();};miwt.Form.prototype={initialize:function(){this.submitters=[];this.submitter_functions=[];this.onsubmit=miwt.prv_FormOnSubmitHandler;},MIWTOnSubmit:function(){if(typeof(window.miwtReady)!='undefined'&&window.miwtReady==2)
return false;var submitter,el,i=0;for(;submitter=this.submitters[i++];){el=miwt.$(submitter);if(el){var f=this.submitter_functions[el.id];if(f&&!f(this))
{return false;}}}
window.miwtReady=2;return true;},MIWTSubmit:function(opts){if(typeof opts=='function'){opts={postUpdate:opts};}else opts=opts||this.submit_options||{};if(this.lastSubmit){var now=new Date().getTime(),then=this.lastSubmit.getTime();if((now -then)<250){this.ResetTransient();return false;}}
if(!this.MIWTOnSubmit())
return false;if(opts.onSubmit&&!opts.onSubmit.call(this))
return false;if(opts.hasOwnProperty('btnhit')){this.elements.btnhit.value=opts.btnhit;}
var ajax=!miwt.$(this.elements.btnhit.value+"_noajax");if(opts.hasOwnProperty('ajax')){ajax=opts.ajax;}
if(!ajax){var progress=miwtajax.showFormPostWait();if(opts.preUpdate){opts.preUpdate.call(this,progress);}
this.submit();return true;}
var ajax=new miwtajax.InputProcessor(this,opts);this.lastSubmit=new Date();if(!ajax.isRequestSubmitted()){var progress=miwtajax.showFormPostWait();if(opts.preUpdate){opts.preUpdate.call(this,progress);}
this.submit();}
else{}
return true;},RegisterOnSubmitHandler:function(el,handler){if(el==null)
return;this.submitter_functions[el.id]=handler;if(this.submitters.indexOf(el.id)== -1)
this.submitters.push(el.id);},CleanOnSubmitHandlers:function(){var list=[],el,elId,i=0;for(;elId=this.submitters[i++];){el=miwt.$(elId);if(el)
list.push(elId);else
this.submitter_functions[elId]=null;};this.submitters=list;},ResetTransient:function(){for(var name,i=0;name=miwt.TransientFieldNames[i++];){if(this.elements[name])
this.elements[name].value='';}}};}
if(typeof miwtsetup=='undefined'){var miwtsetup={};miwt.setupHandlers=[];for(var i=0,l=["any","a","button","div","img","input","select","dfn","table","textarea"];i<l.length;i++)
miwt.setupHandlers[l[i]]=[];miwt.AddSetupHandler=function(tags,f){if(tags==null)
tags=["any"];var i,tag;for(i=0;tag=tags[i];i++){if(!miwt.setupHandlers[tag])miwt.setupHandlers[tag]=[];miwt.setupHandlers[tag].push(f);}};miwt.setup=function(node){var nodes=node.getElementsByTagName('*');var f,a,j,i=0;var any=miwt.setupHandlers["any"];while(node){var tag=node.tagName.toLowerCase();if(node.className){if(tag=='select'&&node.type&&node.type=='select-one'&&!/\bmiwt_focus\b/.exec(node.className))
{if(miwt.lastFocusId==null)
node.blur();}}
for(j=0;f=any[j];j++){f(tag,node);}
a=miwt.setupHandlers[tag];if(a){for(j=0;f=a[j];j++){f(tag,node);}}
node=nodes.item(i++);}};miwt.scheduleUpdateKeydownHandler=function(evt){miwttimer.scheduleUpdate(miwt.element(evt).form.id);};miwt.observerFormSubmit=function(el){miwt.element(el).form.MIWTSubmit();};miwt.AddSetupHandler(['input','select','textarea'],function(tag,node){if(node.form&&miwt.hasClassName(node,'miwt_watch')){var nt=(node.type||'').toLowerCase();if((tag=='input'&&nt=='text')||tag=='textarea')
miwt.observe(node,'keydown',miwt.scheduleUpdateKeydownHandler);else if(tag=='input'&&(nt=='checkbox'||nt=='radio'))
miwt.observe(node,'click',miwt.observerFormSubmit);else
miwt.observe(node,'change',miwt.observerFormSubmit);}});miwt.AddSetupHandler(['button','input','select','textarea'],function(tag,node){if(node.focus&&miwt.hasClassName(node,'miwt_focus'))
window.setTimeout(function(){node.focus()},200);});miwt.setupForm=function(form){if(form.miwt_init)return;form.miwt_init=true;miwt.extend(form,miwt.Form.prototype);try{form.initialize();miwt.setup(form);}
catch(e){miwt.error("Error configuring MIWT form "+(form.id||form.name),e);}};miwt.setViewportPosition=function(){var wz,w,windows=miwt.$$("div.window");while((w=windows.pop())){if(!wz||(parseInt(wz.style.zIndex)<parseInt(w.style.zIndex)))
wz=w;}
if(!!wz){var pos=miwt.cumulativeOffset(wz);window.scrollTo(pos[0],pos[1] -20);}};miwt.initDoc=function(){var i=0,form;for(;form=document.forms[i++];){if(form.miwt_init)continue;if(miwt.hasClassName(form,'miwt_form')){miwt.setupForm(form);miwt.setViewportPosition();}else if(miwt.hasClassName(form,'miwt_external_action')){var form2=form;setTimeout(function(){form2.submit();},1);}}};miwt.onLoad=function(evt){miwt.initDoc();if(!miwt.domupdate_check){if(window.i2rd)
i2rd.addEvent(document,'dom:update',miwt.initDoc);if(document.addEventListener)
document.addEventListener('DOMNodeInsertedIntoDocument',miwt.initDoc,false);}
miwt.domupdate_check=true;}}
if(typeof miwtbutton=='undefined'){miwtbutton={};miwt.ButtonClicked=function(event){miwt.stop(event);var form=miwt.findElement(event,'form'),el=miwt.element(event),btnId,ct;while(el&&el.parentNode&&!(el.name||el.id))
el=el.parentNode;if(miwt.disabled(el))
return;btnId=el.name||el.id;ct=miwt.$(btnId+'_confirm');if(ct&&!confirm(ct.firstChild.data))
return;form.elements['btnhit'].value=btnId;form.MIWTSubmit();};miwt.resetEventHandler=function(event){miwt.findElement(event,'form').reset();};miwt.AddSetupHandler(null,function BtnSetup(tag,node){if(miwt.hasClassName(node,'miwt_reset'))
miwt.observe(node,"click",miwt.resetEventHandler);if(miwt.hasClassName(node,'miwt_submit')){if((tag=='input'&&(node.type=='text'||node.type=='password'))||tag=='textarea')
miwt.observe(node,"keydown",miwt.FieldAction);else
miwt.observe(node,"click",miwt.ButtonClicked);}});miwt.imagebutton={};miwt.imagebutton.groups=[];miwt.imagebutton.imageButtonEnabled=function(btn){return!miwt.disabled(btn);};miwt.imagebutton.imageButtonMouseOver=function(evt){var t=miwt.element(evt);if(t==null)
return;miwt.stop(evt);if(miwt.imagebutton.imageButtonEnabled(t))
miwt.imagebutton.imageButtonSetState(t,null,null,"rollover");};miwt.imagebutton.imageButtonMouseOut=function(evt){var t=miwt.element(evt);if(t==null)
return;miwt.stop(evt);if(miwt.imagebutton.imageButtonEnabled(t))
miwt.imagebutton.imageButtonSetState(t,null,null,"normal");};miwt.imagebutton.imageButtonMouseDown=function(evt){var t=miwt.element(evt);if(t==null)
return;miwt.stop(evt);if(miwt.imagebutton.imageButtonEnabled(t)){if(t.focus)
t.focus();miwt.imagebutton.imageButtonSetState(t,null,null,"pressed");}};miwt.imagebutton.imageButtonMouseUp=function(evt){var t=miwt.element(evt);if(t==null)
return;miwt.stop(evt);if(miwt.imagebutton.imageButtonEnabled(t))
miwt.imagebutton.imageButtonSetState(t,null,null,"normal");};miwt.imagebutton.imageButtonMouseClick=function(evt){var t=miwt.element(evt);if(t==null)
return;miwt.stop(evt);if(miwt.imagebutton.imageButtonEnabled(t)){var selected=t.miwt_isSelected;if(t.miwt_selectedvalue!=null){selected=(t.miwt_isSelected==false);}
if(t.miwt_buttonGroup==null||selected)
miwt.imagebutton.imageButtonSetState(t,null,selected,"normal");if(t.miwt_watch)
miwt.findElement(evt,'form').MIWTSubmit();}};miwt.imagebutton.imageButtonSetState=function(img,isActive,isSelected,state){isActive=isActive||img.miwt_isActive;isSelected=isSelected||img.miwt_isSelected;if(img.miwt_isActive==isActive&&img.miwt_isSelected==isSelected&&img.miwt_state==state){return false;}
var newimgsrc;if(isActive){if(state=="normal"){if(isSelected&&img.miwt_activeselected!=null)
newimgsrc=img.miwt_activeselected;else
newimgsrc=img.miwt_active;}
else if(state=="rollover"){newimgsrc=img.miwt_activerollover;}else if(state=="pressed"){newimgsrc=img.miwt_activepressed;}else{alert("Invalid button state "+state);}}else{if(state=="normal"){if(isSelected&&img.miwt_inactiveselected!=null){newimgsrc=img.miwt_inactiveselected;}else{newimgsrc=img.miwt_inactive;}}else if(state=="rollover"){newimgsrc=img.miwt_inactiverollover;}else if(state=="pressed"){newimgsrc=img.miwt_inactivepressed;}else{alert("Invalid button state "+state);}}
img.miwt_isActive=isActive;img.miwt_state=state;if(img.miwt_isActive&&img.miwt_isSelected!=isSelected){var wasSelected=img.miwt_isSelected,btn;img.miwt_isSelected=isSelected;if(isSelected){var group=null;if(img.miwt_buttonGroup&&(group=miwt.imagebutton.groups[img.miwt_buttonGroup])){group.each(function(btnId){if(btnId!=img.id){if(btn=miwt.$(btnId))
miwt.imagebutton.imageButtonSetState(btn,null,false,"normal");}});}
img.miwt_valuenode.value=img.miwt_selectedvalue;}else{img.miwt_valuenode.value="";}}
if(newimgsrc&&typeof(newimgsrc)!='undefined'&&newimgsrc!='undefined'&&newimgsrc!='null'){img.src=newimgsrc.src;return true;}else{return false;}};miwt.AddSetupHandler(['img'],function ImgBtnSetup(tag,node){if(tag!='img'||!node.className.match(/miwt_image\S*_button/))
return;var id=node.id;var buttonGroupId=null;var match=/miwt_button_group_(\S+)/.exec(node.className);if(match)
buttonGroupId=match[1];var valueid=null;var selectedvalue=null;if(id.match(/_img$/))
{valueid=id.replace(/(_r\d+)*_img$/,"");var valuenode=miwt.$(id+"_value");if(valuenode)
selectedvalue=valuenode.firstChild.data;}
var img=miwt.$(id);if(img==null)
{miwt.warn("There is an error with the generated page, cannot find image button with id '"+id+"'");return;}
img.miwt_active=miwt.$(id+"_unselected");img.miwt_activeselected=miwt.$(id+"_selected");img.miwt_activepressed=miwt.$(id+"_pressed");img.miwt_activerollover=miwt.$(id+"_rollover");img.miwt_inactive=miwt.$(id+"_unselected_inactive");img.miwt_inactiveselected=miwt.$(id+"_selected_inactive");img.miwt_inactivepressed=miwt.$(id+"_pressed_inactive");img.miwt_inactiverollover=miwt.$(id+"_rollover_inactive");img.miwt_valueid=valueid;img.miwt_valuenode=miwt.$(valueid);img.miwt_selectedvalue=selectedvalue;if(img.miwt_code==null)
img.miwt_code='null';img.miwt_isSelected=(img.miwt_valuenode!=null)&&(img.miwt_valuenode.value==selectedvalue);img.miwt_watch=node.className.match(/miwt_watch/);var isActive=(img.miwt_active&&img.src==img.miwt_active.src)||(img.miwt_activeselected&&img.src==img.miwt_activeselected.src);if(buttonGroupId!=null)
{img.miwt_buttonGroup=buttonGroupId;var group=miwt.imagebutton.groups[buttonGroupId];if(!group)
{group=[];miwt.imagebutton.groups[buttonGroupId]=group;}
else
{var bid=null;var newa=null;for(var i=0;bid=group[i];i++){var bobj=miwt.$(bid);if(!bobj){if(!newa){newa=[];for(var j=0;j<i;j++)
newa.push(group[j]);}}
else if(newa){newa.push(bobj);}}
if(newa){group=newa;miwt.imagebutton.groups[buttonGroupId]=group;}}
group.push(node.id);}
miwt.observe(img,"mouseover",miwt.imagebutton.imageButtonMouseOver,false);miwt.observe(img,"mouseout",miwt.imagebutton.imageButtonMouseOut,false);miwt.observe(img,"mousedown",miwt.imagebutton.imageButtonMouseDown,false);miwt.observe(img,"mouseup",miwt.imagebutton.imageButtonMouseUp,false);miwt.observe(img,"click",miwt.imagebutton.imageButtonMouseClick,false);miwt.imagebutton.imageButtonSetState(img,isActive,img.miwt_isSelected,"normal");});miwt.imagebutton.imageButtonActivate=function(id){var img=miwt.$(id);if(img==null){return;}
miwt.imagebutton.imageButtonSetState(img,true,null,img.miwt_state);};miwt.imagebutton.imageButtonDeactivate=function(id){var img=miwt.$(id);if(img==null){return;}
miwt.imagebutton.imageButtonSetState(img,false,null,img.miwt_state);};}
if(typeof miwtfield=='undefined'){miwtfield={};miwt.FieldAction=function(event){var element=miwt.element(event);var keycode=event.keyCode||event.which;if(keycode==10||keycode==13)
miwt.ButtonClicked(event);};miwt.FieldKeyDownHandler=function(evt){miwttimer.rescheduleTimer();return true;};miwt.FieldKeyUpHandler=function(evt){var field=miwt.element(evt);if(field.maxlength&&field.maxlength>0&&field.value.length>=field.maxlength){field.value=field.value.substring(0,field.maxlength);}
return true;};miwt.FieldFocusHandler=function(evt){var field=miwt.element(evt);miwt.lastFocusId=field.id;if(field.hinttexton){field.value='';field.hinttexton=false;field.style.color=null;}
return true;};miwt.FieldBlurHandler=function(evt){var field=(evt.tagName=='input')?evt:miwt.element(evt);miwt.lastFocusId=null;if(field&&field.hinttext&&field.value==''){field.value=field.hinttext;field.hinttexton=true;field.style.color='gray';}
return true;};miwt.prv_FieldSubmitHandler=function(nodeId){var node=miwt.$(nodeId);if(node.hinttexton){node.value='';node.hinttexton=false;node.style.color=null;}
window.setTimeout("miwt.FieldBlurHandler(miwt.$('"+node.id+"'))",10,"JavaScript");return true;}
miwt.AddSetupHandler(['a','input','textarea'],function(tag,node){if((tag=='input'&&node.type=='text')||tag=='textarea')
{miwt.observe(node,"keydown",miwt.FieldKeyDownHandler,true);miwt.observe(node,"focus",miwt.FieldFocusHandler,true);miwt.observe(node,"blur",miwt.FieldBlurHandler,true);var hint=miwt.$(node.id+"_hint");if(hint){var hinttext=hint.firstChild.data;node.hinttext=hinttext;if(node.value==''){node.value=hinttext;node.hinttexton=true;node.style.color='gray';}
var nodeId=node.id;node.form.RegisterOnSubmitHandler(node,function(){return miwt.prv_FieldSubmitHandler(nodeId);});}
var maxlength=miwt.$(node.id+"_maxlength");if(maxlength){var i=parseInt(maxlength.firstChild.data,10);if(!isNaN(i)){node.maxlength=i;miwt.observe(node,"keyup",miwt.FieldKeyUpHandler,true);}}
if(/\bfckeditor\b/.exec(node.className)){CKeditorHelper.fckactivate(node);node.serializeValue=function(f,s,n,v){s.push(encodeURIComponent(n) +'=' +encodeURIComponent(CKEDITOR.instances[this.id].getData()));};}}});}
if(typeof miwtsearchablecombo=='undefined'){var miwtsearchablecombo={};miwt.SearchableComboButtonClick=function(event){miwt.stop(event);miwt.element(event).combo.doSearch();};miwt.SetupSearchableCombo=function(tag,element){if(tag!='select'||!/\bmiwt_searchable\b/.exec(element.className))
return;try
{var field=miwt.$(element.id+"_field");field.combo=element;miwt.extend(element,miwt.SearchBox.prototype);element.initialize(field);miwt.observe(field,'keydown',miwt.SearchableComboKeydownHandler);var button=miwt.$(element.id+"_search");if(button&&!/\bmiwt_submit\b/.exec(button.className))
{button.combo=element;miwt.observe(button,'click',miwt.SearchableComboButtonClick);if(field.value&&element.mode==element.MODE_FILTER)
element.doSearch();}}
catch(e){miwt.error("Setup searchable combo "+element.id,e);}};miwt.AddSetupHandler(['select'],miwt.SetupSearchableCombo);miwt.SearchableComboKeydownHandler=function(event){if(event.keyCode==13){miwt.stop(event);miwt.element(event).combo.doSearch();}};miwt.SearchBox=function(){};miwt.SearchBox.prototype={MODE_ITERATE:0,MODE_FILTER:1,initialize:function(field)
{this.field=field;this.selectOptions=[];var opt,i;for(i=0;opt=this.options[i];i++)
this.selectOptions[i]=opt;this.mode=this.MODE_ITERATE;var me=this,cns=miwt.words(this.className),i,c;for(i=0;i<cns.length;i++){c=cns[i];if(/.*_flags_(\w+)/.exec(c)){me.flags=RegExp.$1.toLowerCase();}else if(/.*_mode_filter/.test(c)){me.mode=me.MODE_FILTER;}}},addAvailableOption:function(val,txt){var opt=new Option();opt.value=val;opt.text=txt;this.selectOptions.push(opt);},getAvailableOptions:function(){return this.selectOptions;},setVisibleOptions:function(visibleOptions){this.options.length=0;var opt;for(var i=0;opt=visibleOptions[i];i++)
this.options[i]=opt;},setSelectedIndex:function(index){if(index>=0&&index<this.options.length)
this.options[index].selected=true;},doSearch:function(){if(this.mode==this.MODE_ITERATE)
this.searchSelectIterative(false);else
this.searchSelectFilter(false);},searchSelectFilter:function(onlyIfNoMatch){var searchString=this.field.value;var searchTextLength=searchString.length;var allOptions=this.getAvailableOptions();var selectedIndex=0;var matches=[];var matcher=new RegExp(searchString,this.flags);for(j=0;j<allOptions.length;j++)
{var optionText=allOptions[j].text;if(searchTextLength==0||matcher.test(optionText))
{matches[matches.length]=allOptions[j];if(allOptions[j].selected)
{selectedIndex=matches.length-1;}}}
this.setVisibleOptions(matches);this.setSelectedIndex(selectedIndex);},searchSelectIterative:function(onlyIfNoMatch){var searchString=this.field.value;var searchTextLength=searchString.length;if(searchTextLength==0)
return;var start=this.selectedIndex +1;if(start>=this.options.length)
start=0;var end=this.selectedIndex -1;if(end<=0)
end=this.options.length;var matcher=new RegExp(searchString,this.flags);if(onlyIfNoMatch&&matcher.test(this.options[this.selectedIndex].text))
{return;}
var forEnd=(start<end?end:this.options.length);for(j=start;j<forEnd;j++)
{var optionText=this.options[j].text;if(matcher.test(optionText))
{this.selectedIndex=j;return;}}
if(start>end)
{for(j=0;j<=end;j++)
{var optionText=this.options[j].text;if(matcher.test(optionText))
{this.selectedIndex=j;return;}}}}};}
if(typeof miwt.menu=='undefined'){(function(){var PAT_MENU=/(^|\s)menu(\s|$)/;var PAT_MENU_ITEM=/(^|\s)menu_item(\s|$)/;var PAT_MENU_COMPONENT=/(^|\s)menu_component(\s|$)/;miwt.menu={};miwt.menu.ActiveMenuList=[];miwt.menu.ActivateMenu=function(evt){var menu=miwt.up(miwt.element(evt),"div.menu_component");if(!menu||miwt.hasClassName(menu,'active'))return null;miwt.addClassName(menu,"active");while(miwt.menu.ActiveMenuList.length>0)
miwt.menu.DeactivateLastActiveMenu();miwt.siblings(menu).each(function(idx,el){if(miwt.up(el,"div.menu_bar")&&PAT_MENU_COMPONENT.test(el.className))
miwt.observe(el,"mouseover",miwt.menu.ShowMenu);});miwt.menu.ActiveMenuList.push(menu);return menu;};miwt.menu.DeactivateLastActiveMenu=function(){var menu=miwt.menu.ActiveMenuList.pop();if(!menu)return;miwt.removeClassName(menu,"active");if(miwt.up(menu,"div.menu_bar")){miwt.stopObserving(menu,"mouseover",miwt.menu.ShowMenu);miwt.siblings(menu).each(function(idx,el){miwt.stopObserving(el,"mouseover",miwt.menu.ShowMenu);});}};miwt.menu.MenuItemHit=function(evt){miwt.stop(evt);var mi=miwt.up(evt,'.menu_item'),li=miwt.up(mi,'li.menu'),hasSubmenu=miwt.$$('.menu_items',li).length>0;if(mi&&!hasSubmenu){while(miwt.menu.ActiveMenuList.length>0)
miwt.menu.HideMenu(evt);var form=miwt.findElement(evt,'form');form.elements['btnhit'].value=mi.id;form.MIWTSubmit();}};miwt.menu.HideMenu=function(evt){if((evt.keyCode&&evt.keyCode!=27)||evt.which==3)
return;miwt.stop(evt);miwt.menu.DeactivateLastActiveMenu();if(miwt.menu.ActiveMenuList.length==0){miwt.stopObserving(document,"click",miwt.menu.HideMenu);miwt.stopObserving(document,"keydown",miwt.menu.HideMenu);}};miwt.menu.ShowMenu=function(evt){var target=miwt.findElement(evt,'a')
if(miwt.menu.ActivateMenu(evt)){miwt.stop(evt);window.setTimeout(function(){miwt.observe(document,"click",miwt.menu.HideMenu);miwt.observe(document,"keydown",miwt.menu.HideMenu);},5);}};miwt.AddSetupHandler(['a'],function(tag,node){if(PAT_MENU_ITEM.test(node.className)&&PAT_MENU_COMPONENT.test(node.parentNode.className))
miwt.observe(node,"click",miwt.menu.ShowMenu);});miwt.AddSetupHandler(['li'],function(tag,node){if(PAT_MENU.test(node.className)){miwt.observe(node,'click',miwt.menu.MenuItemHit);if(navigator.userAgent.match(/MSIE 6/)){miwt.observe(node,"mouseenter",function(evt){miwt.addClassName(miwt.element(evt),'active');});miwt.observe(node,"mouseleave",function(evt){miwt.removeClassName(miwt.element(evt),'active');});}}});})();}
if(typeof miwtselectall=='undefined'){var miwtselectall={};miwt.setupSelectAllCheckbox=function(checkbox){var selectall=miwt.$(checkbox.name+"_all");if(!selectall)
return;if(!selectall.checkboxes)
{selectall.checkboxes=[];miwt.observe(selectall,"click",miwt.selectAllChanged,false);}
checkbox.selectall=selectall;selectall.checkboxes.push(checkbox);miwt.observe(checkbox,"click",miwt.selectAllChildChanged,false);};miwt.selectAllChanged=function(event){var selectall=miwt.element(event),box,i;for(i=0;box=selectall.checkboxes[i];i++){box.checked=selectall.checked;}};miwt.selectAllChildChanged=function(event){var box=miwt.element(event);if(!box.checked)
box.selectall.checked=false;};miwt.AddSetupHandler(['input'],function(tag,node){if(tag=='input'&&node.type=='checkbox'&&/\bmiwt_row_select\b/.exec(node.className))
miwt.setupSelectAllCheckbox(node);});}
if(typeof miwtajax=='undefined'){var miwtajax={READY_STATE_UNINITIALIZED:0,READY_STATE_LOADING:1,READY_STATE_LOADED:2,READY_STATE_INTERACTIVE:3,READY_STATE_COMPLETE:4,serial:{},ajax_failed_update_callback:[],ajax_request_complete_callback:[]};miwtajax.getDocContentType=function(){var d=document,de=d.documentElement,ct=d.contentType,m,el;try{if(!ct){m=miwt.array(document.getElementsByTagName('head')[0].getElementsByTagName('meta'));while((el=m.pop())){if((el.getAttribute('http-equiv')+'').toLowerCase()=='content-type'){ct=el.getAttribute('content').replace(/;.+/,'');break;}}
if(!ct)
ct=de.getAttribute('xmlns')=='http://www.w3.org/1999/xhtml'?'application/xhtml+xml':'text/html';return ct;}}catch(e){return'text/html';}};miwtajax.currentSerial=function(form){var key=form['wm'].value,val=miwtajax.serial[key];if(!val)val=parseInt(form['ajax_serial'].value,10);return val;};miwtajax.nextSerial=function(form){var key=form['wm'].value,val=miwtajax.serial[key];if(!val)val=parseInt(form['ajax_serial'].value,10);miwtajax.serial[key]=(++val);return val;};miwtajax.Progress=function(){this.dialog=document.createElement("div");this.dialog.innerHTML='<div class="miwt_ajax_progress" style="position: absolute; top: 100px; left: 100px;">'
+miwt.$$("dfn.miwt_loading_message").pop().firstChild.data
+"<div id=\"miwt_loading_message_503\" style=\"display: none;\">" +miwt.$$("dfn.miwt_loading_message503").pop().firstChild.data +"</div>"
+'<br /><br />'
+'<span class="miwt_ajax_progress">'
+'<span id="miwt_ajax_progress_0">&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;</span>'
+'<span id="miwt_ajax_progress_1">&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;</span>'
+'<span id="miwt_ajax_progress_2">&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;</span>'
+'<span id="miwt_ajax_progress_3">&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;</span>'
+'<span id="miwt_ajax_progress_4">&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;</span>'
+'</span>'
+'</div>';this.dialog.firstChild.style.visibility='hidden';document.getElementsByTagName("body").item(0).appendChild(this.dialog);this.useCount=0;};miwtajax.Progress.prototype={start:function(){this.useCount++;if(this.useCount>1)
return;var progress=this;this.timeout_callback=function(){progress.callback.call(progress);}
for(var i=miwtajax.READY_STATE_UNINITIALIZED;i<=miwtajax.READY_STATE_COMPLETE;i++)
{var progressNode=miwt.$("miwt_ajax_progress_"+i);if(progressNode!=null)
progressNode.style.backgroundColor='white';}
if(this.indeterminate)
this.mark=miwtajax.READY_STATE_UNINITIALIZED;this.timeout=setTimeout(this.timeout_callback,500);},callback:function(){if(document.all)
this.dialog.firstChild.style.position='absolute';this.dialog.firstChild.style.visibility='visible';var w=miwt.getWindowWidth();var h=miwt.getWindowHeight();var scroll=miwt.getScrollOffset();this.dialog.firstChild.style.top=(scroll.y+((parseInt(h)/2)-17))+"px";this.dialog.firstChild.style.left=(scroll.x+((parseInt(w)/2)-100))+"px";if(this.indeterminate){this.mark++;if(this.mark>miwtajax.READY_STATE_COMPLETE)
this.mark=miwtajax.READY_STATE_UNINITIALIZED;for(var i=miwtajax.READY_STATE_UNINITIALIZED;i<=miwtajax.READY_STATE_COMPLETE;i++)
{var progressNode=miwt.$("miwt_ajax_progress_"+i);if(progressNode!=null){if(this.mark==i)
progressNode.style.backgroundColor='lightsteelblue';else
progressNode.style.backgroundColor='white';}}}
this.timeout=setTimeout(this.timeout_callback,300,"JavaScript");},stop:function(){if(this.useCount<=0)
return;this.useCount--;if(this.useCount>0)
return;if(this.timeout!=null)
{window.clearTimeout(this.timeout);this.timeout=null;this.timeout_callback=null;}
this.dialog.firstChild.style.visibility='hidden';}};miwtajax.showFormPostWait=function(){if(miwt.ajaxprogress==null)miwt.ajaxprogress=new miwtajax.Progress();miwt.ajaxprogress.indeterminate=true;miwt.ajaxprogress.start();return miwt.ajaxprogress;};miwtajax.InputProcessor=function(form,opts){this.req=null;this.opts=opts;if(form.encoding&&form.encoding.match(/multipart/))
{var el,i=0;for(;el=form.elements[i++];){if(el.type=='file'&&el.value!=null&&el.value.length>0)
return;}}
this.form=form;this.failsafe=false;if(miwt.ajaxprogress==null)miwt.ajaxprogress=new miwtajax.Progress();this.initXMLHttpRequest();if(this.req==null)
{return;}
var sv=opts.serializeValue||miwt.serializeValue,params=opts.serialize?opts.serialize.call(this.form,this.form,sv):miwt.serialize(this.form,sv);params +="&ajax="+miwtajax.nextSerial(form);this.form.ResetTransient();var dotimeout=deploymentcontext?deploymentcontext.doAjaxTimeout:true;if(dotimeout&&!miwtajax.debug){var ajax=this,to=opts.ajax_to||15;this.timeout_callback=function(){ajax.doFailsafe.call(ajax);}
this.timeout=setTimeout(this.timeout_callback,(to*1000));}
miwt.ajaxprogress.start();if(opts.preUpdate)opts.preUpdate.call(this.form,miwt.ajaxprogress);this.req.send(params);};miwtajax.InputProcessor.prototype={initXMLHttpRequest:function(){var uriEl=miwt.$$("dfn.ajax_uri",this.form).pop();if(!uriEl||!uriEl.firstChild)
return;this.uri=uriEl.firstChild.data;if(window.XMLHttpRequest){this.req=new XMLHttpRequest();}else if(window.ActiveXObject){this.req=new ActiveXObject("Microsoft.XMLHTTP");}
if(this.req){var processor=this;this.req.onreadystatechange=function(){processor.handleReadyStateForComponentUpdate.call(processor);};this.req.open("POST",this.uri,true);this.req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.req.setRequestHeader("X-MIWT-Ajax","true");this.req.setRequestHeader("X-DocumentContentType",miwtajax.getDocContentType());}},decomposeParts:function(node){var content="",partNodesFound=false,partnode,j=0,i;for(;partnode=node.childNodes[j++];){if(partnode.nodeName=='part'){for(i=0;i<partnode.childNodes.length;i++){content +=partnode.childNodes.item(i).nodeValue;}
partNodesFound=true;}}
if(!partNodesFound){content=node.firstChild.nodeValue;}
return content;},handleReadyStateForComponentUpdate:function(){for(var i=miwtajax.READY_STATE_UNINITIALIZED;i<=this.req.readyState;i++){var progressNode=miwt.$("miwt_ajax_progress_"+i);if(progressNode!=null&&progressNode.style.backgroundColor!='lightsteelblue')
progressNode.style.backgroundColor='lightsteelblue';}
if(this.failsafe)
return;if(this.req.readyState==miwtajax.READY_STATE_COMPLETE){delete this.req.onreadystatechange;this.req.onreadystatechange=function(){};if(this.timeout){window.clearTimeout(this.timeout);this.timeout=null;}
var failsafe=false,failsafeSkipParam=false,updatedNodes=[],action='failsafe';processXML:if(this.req.status==503){miwt.ajaxprogress.indeterminate=true;miwt.ajaxprogress.mark=miwtajax.READY_STATE_UNINITIALIZED;var retryTime=this.req.getResponseHeader("Retry-After")||'30',mesgElement=miwt.$("miwt_loading_message_503");mesgElement.style.display="block";mesgElement.innerHTML=mesgElement.innerHTML.replace("$(seconds)",retryTime);var retryTimeMillis=parseInt(retryTime)*1000,form=this.form,retryFunc=function(){mesgElement.style.display="none";form.submit();};window.setTimeout(retryFunc,retryTimeMillis);return;}else if(this.req.status==301||this.req.status==302){miwt.ajaxprogress.stop();var loc=this.req.getResponseHeader("Location"),data={status:this.req.status,action:'redirect',location:loc,success:true,nodesUpdated:[],source:this.form};if(this.opts.postUpdate)this.opts.postUpdate.call(this.form,data);this.req=null;window.location.href=loc;return;}else if(this.req.status!=200){miwt.debug("Unsuccessful HTTP response: "+this.req.status);failsafe=true;}else if(/html/.test(this.req.getResponseHeader("Content-Type"))){miwt.debug("Received HTML response: "+this.req.responseText);failsafe=true;}else if(this.req.responseXML!=null){var actionNodes=this.req.responseXML.getElementsByTagName("action");action="reload";if(actionNodes.length>0){action=actionNodes.item(0).firstChild.nodeValue;}else{miwt.debug("Received HTML response: "+this.req.responseText);miwt.error("No action specified");}
var firstChild=this.req.responseXML.firstChild;if(firstChild==null||firstChild.nodeName.toLowerCase()=="html"){if(miwtajax.debug){if(firstChild!=null){var stack=[];stack.push(firstChild);while(stack.length>0){var node=stack.pop();if(node.nodeType==3){miwt.error("Parse error: "+node.nodeValue);}else{for(var i=0;i<node.childNodes.length;i++)
stack.push(node.childNodes.item(i));}}}
break processXML;}
miwt.error("Parse error. firstChild is "
+(firstChild==null?"null":(firstChild.nodeName +" -> " +firstChild.innerHTML)));failsafe=true;}else if(action=='reload'){failsafe=true;failsafeSkipParam=true;}else if(action=='nochange'){break processXML;}else if(action=='update'){var lastFocusId=miwt.lastFocusId,closeNodes=this.req.responseXML.getElementsByTagName("closewindow");for(var i=0;i<closeNodes.length;i++){var refid=closeNodes.item(i).attributes.getNamedItem("ref").nodeValue;var n=miwt.$(refid);if(n){miwt.closeWindow(n);}}
var contentNodes=this.req.responseXML.getElementsByTagName("component"),preProcessNode=this.opts.preProcessNode,postProcessNode=this.opts.postProcessNode;try{for(var i=0;i<contentNodes.length;i++){var iecase,tmpnode,newcontent,newnode,updatenode=contentNodes.item(i),refid=updatenode.attributes.getNamedItem("ref").nodeValue,docnode=miwt.$(refid);if(docnode==null){miwt.info("Node not found: "+refid+", likely caused by update to component that was not rendered here");failsafe=true;break;}
miwt.closeCKEditors(docnode);newcontent=this.decomposeParts(updatenode);tmpnode=document.createElement("div");try{iecase=miwt.B.IE&&(docnode.tagName||'').toUpperCase()=='TD'&&!newcontent.match(/^</);if(preProcessNode){newcontent=preProcessNode.call(this.form,{content:newcontent,refid:refid});if(newcontent==null)continue;}
if(iecase)
tmpnode.innerHTML="<span>"+newcontent+"</span>";else
tmpnode.innerHTML=newcontent;}catch(exception){miwt.error("Exception creating DOM node from " +newcontent,exception);failsafe=true;break;}
newnode=tmpnode.firstChild;if(miwt.childElementCount(tmpnode)==1&&newnode.nodeName==docnode.nodeName&&newnode.getAttribute("id")==docnode.getAttribute("id"))
{docnode.parentNode.replaceChild(newnode,docnode);updatedNodes.push(newnode);}
else
{while(docnode.firstChild!=null)
docnode.removeChild(docnode.firstChild);while(tmpnode.firstChild!=null){var node=tmpnode.firstChild;tmpnode.removeChild(node);docnode.appendChild(node);}
updatedNodes.push(docnode);newnode=docnode;}
if(postProcessNode)postProcessNode.call(this.form,{node:newnode});}}
catch(exception)
{miwt.error("Exception updating DOM",exception);failsafe=true;}
var windowNodes=this.req.responseXML.getElementsByTagName("newwindow");for(var i=0;i<windowNodes.length;i++){var tmpnode=document.createElement("div"),tmpcontent=this.decomposeParts(windowNodes.item(i));if(preProcessNode){tmpcontent=preProcessNode.call(this.form,{content:tmpcontent,refid:null});if(tmpcontent==null)continue;}
tmpnode.innerHTML=tmpcontent;var newnode=tmpnode.firstChild;var windowcon=miwt.$$("form#"+this.form.id+" > div.miwt").pop();if(windowcon){var refid=windowNodes.item(i).attributes.getNamedItem("ref").nodeValue;var existing=miwt.$(refid);if(existing){existing.parentNode.replaceChild(newnode,existing);}
else{windowcon.appendChild(newnode);}
updatedNodes.push(newnode);if(postProcessNode)postProcessNode.call(this.form,{node:newnode});}else{failsafe=true;}}
try{miwt.ajaxprogress.stop();var oldloc=window.location.href;var locref=false;var initNodes=this.req.responseXML.getElementsByTagName("jsinit");for(var i=0;i<initNodes.length;i++){var node=initNodes.item(i);var script=this.decomposeParts(node);locref=locref||script.match(/window\.location\.href/);if(window.execScript)
window.execScript(script);else
window.eval(script);}
if(locref||oldloc!=window.location.href){return;}
if(failsafe)
break processXML;if(window.windowlist)
repairWindowsAfterUpdate();var focusChanged=false;if(lastFocusId!=null){var node=miwt.$(lastFocusId);if(node!=null&&node.focus){try{node.focus();focusChanged=true;}catch(e){miwt.info("Unable to reset focus for ID = "+lastFocusId,e);}}}
for(var i=0;i<updatedNodes.length;i++){var n=updatedNodes[i],w=miwt.up(n,"div.window");try{__i2rd_domupdate_fire(n);}catch(e){}
miwt.setup(n);if(w&&w!=n&&w.auto_size_serial!==miwtajax.currentSerial(this.form)){w.auto_size_serial=miwtajax.currentSerial(this.form);miwt.autoSizeWindow(w);}}
if(miwt.B.IE){var fcklist=miwt.$$('textarea.fckeditor',this.form);if(!focusChanged&&fcklist.length>0){var el,nodes=miwt.$$('input[type="text"]',this.form);while((el=nodes.shift())){if(el.type!='hidden'&&el.focus){var f=function(){for(var i=0;i<fcklist.length;i++){var fck=fcklist[i];var iframes=miwt.$$('iframe',fck.parentNode);if(iframes.length==0){window.setTimeout(f,100);return;}
var iframe;while(iframe=iframes.shift()){miwt.observe(iframe,"load",function(){if(!el.disabled)el.focus();});if(!el.disabled)el.focus();}}};window.setTimeout(f,100);break;}}}}
if(updatedNodes.length>0){var docHeight,scroll=miwt.getScrollOffset(),clientHeight,scrollBottom,de=document.documentElement,db=document.body;if(de){clientHeight=de.clientHeight;docHeight=de.scrollHeight;scrollBottom=scroll.y+clientHeight;}else{clientHeight=db.clientHeight;docHeight=db.scrollHeight;scrollBottom=scroll.y+clientHeight;}
if(docHeight>clientHeight){var scrollNode,miny= -1,node,y;for(var i=0;node=updatedNodes[i];i++){if(!node.id.match(/c_.*/)||!miwt.isInActiveWindow(node))
continue;y=miwt.cumulativeOffset(node)[1];if(miny== -1||y<miny){miny=y;scrollNode=node;}}
if(miny!= -1&&(miny<scroll.y||miny>scrollBottom)){if(miny>scrollBottom){var targetHeight=scrollNode.offsetHeight;if(targetHeight<clientHeight){miny=miny -(clientHeight -targetHeight);}}
window.scrollTo(0,miny);}}}}catch(exception){miwt.error("Exception processing updates",exception);failsafe=true;break processXML;}
this.form.CleanOnSubmitHandlers();}else if(action=="error"){miwt.error("Error occurred during rendering");var errormessage="",errormessageNodes=this.req.responseXML.getElementsByTagName("errormessage");for(var i=0;i<errormessageNodes.length;i++){if(i>0)errormessage=errormessage +"\n";errormessage=errormessage +errormessageNodes.item(i).firstChild.nodeValue;}
var errordetail="",errordetailNodes=this.req.responseXML.getElementsByTagName("errordetail");for(var i=0;i<errordetailNodes.length;i++){if(i>0)errordetail=errordetail +"\n";errordetail=errordetail +errordetailNodes.item(i).firstChild.nodeValue;}
var node=document.createElement("div");node.innerHTML='<div style="border: solid red 10px; background-color: white; position: fixed; z-index: 9000; top: 10px; left: 10px; padding: 10px; max-width: 800px; max-height: 600px; overflow: scroll;"><div>'+errormessage+'</div><textarea cols="60" rows="10" wrap="off">'+errordetail+'</textarea></div>';document.getElementsByTagName("body").item(0).appendChild(node);}else{miwt.error("Unknown action: "+action);failsafe=true;}}else{miwt.error("Received no content / invalid content from server. Status = " +this.req.status
+", ResponseText: " +this.req.responseText);failsafe=true;}
try{miwt.ajaxprogress.stop();window.miwtReady=1;var postUpdateData={status:this.req.status,action:action,nodesUpdated:updatedNodes,success:true,source:this.form};if(failsafe){this.doFailsafe(failsafeSkipParam);}else{this.form.ResetTransient();if(this.opts.postUpdate)
this.opts.postUpdate.call(this.form,postUpdateData);}
this.doRequestCompleteCallback(postUpdateData);}finally{this.req=null;}}},doRequestCompleteCallback:function(data){var i=0,f;for(;f=miwtajax.ajax_request_complete_callback[i++];)
f.call(this.form,data);},doFailsafe:function(skipParam){var i=0,f,data={status:this.req.status,action:'failsafe',nodesUpdated:[],success:false,source:this.form};for(;f=miwtajax.ajax_failed_update_callback[i++];){if(!f.call(this.form,data))return;}
if(this.opts.postUpdate)this.opts.postUpdate.call(this.form,data);this.failsafe=true;if(!!skipParam)
window.location.href=this.form.action;else
window.location.href=this.form.action +(miwt.parseUri(this.form.action).query?'&':'?') +"failsafe=true";},isRequestSubmitted:function(){return this.req!=null;}};miwtajax.addMIWTAJAXUpdateFailureCallback=function(f){miwtajax.ajax_failed_update_callback.push(f);};miwtajax.removeMIWTAJAXUpdateFailureCallback=function(f){miwtajax.ajax_failed_update_callback=miwtajax.ajax_failed_update_callback.without(f);};miwtajax.addMIWTAJAXRequestCompleteCallback=function(f){miwtajax.ajax_request_complete_callback.push(f);};miwtajax.removeMIWTAJAXRequestCompleteCallback=function(f){miwtajax.ajax_request_complete_callback=miwtajax.ajax_request_complete_callback.without(f);};}
if(typeof miwtcardcontainer=='undefined'){miwtcardcontainer={};miwt.CardContainerSelect=function(containerId,cardId){var container=miwt.$(containerId);var i;for(i=0;i<container.childNodes.length;i++)
{var node=container.childNodes.item(i);if(node.nodeType==1&&node.nodeName.toLowerCase()=="div")
{if(node.id==cardId)
node.style.display="block";else
node.style.display="none";}}};miwt.CardContainerSelectEvent=function(event){var element=miwt.element(event);miwt.CardContainerSelect(element.cardid,element.cardname);};miwt.CardContainerSelectSetup=function(el,containerId,cardId){el.cardid=containerId;el.cardname=cardId;if(el.type){switch(el.type.toLowerCase())
{case'checkbox':case'radio':miwt.observe(el,'click',miwt.CardContainerSelectEvent);break;case'password':case'text':case'textarea':case'select-one':case'select-multiple':miwt.observe(el,'change',miwt.CardContainerSelectEvent);break;}}
else
{miwt.observe(element,'click',miwt.CardContainerSelectEvent);}};miwt.AddSetupHandler(null,function(tag,node){var match=/miwt_card_(\S+)___(\S+)/.exec(node.className);if(match)
miwt.CardContainerSelectSetup(node,match[1],match[2]);});}
if(typeof miwt.windowTopZIndex=='undefined'){miwt.windowMoveTarget=null;miwt.windowTopZIndex=1;miwt.windowlist=[];miwt.getWindowWidth=function()
{if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientWidth>0)
{return document.documentElement.clientWidth;}
else if(document.body&&document.body.clientWidth&&document.body.clientWidth>0)
{return document.body.clientWidth;}
else if(window.innerWidth)
{return window.innerWidth;}
else
{return null;}};miwt.getWindowHeight=function(){if(window.innerHeight&&window.innerHeight>0)
{return window.innerHeight;}
else if(document.documentElement&&document.documentElement.clientHeight&&document.documentElement.clientHeight>0)
{return document.documentElement.clientHeight;}
else if(document.body&&document.body.clientHeight&&document.body.clientHeight>0)
{return document.body.clientHeight;}
else
{return null;}};miwt.getScrollOffset=function(){var x,y,b=document.body,de=document.documentElement;if(self.pageYOffset){x=self.pageXOffset;y=self.pageYOffset;}else{if(de&&de.scrollTop){x=de.scrollLeft;y=de.scrollTop;}else if(b){x=b.scrollLeft;y=b.scrollTop;}}
return{x:x,y:y};};miwt.fixWindowList=function(){var newlist=[];for(var i=0;i<miwt.windowlist.length;i++)
{var w=miwt.$(miwt.windowlist[i]);if(w!=null)
newlist.push(w.id);}
miwt.windowlist=newlist;};miwt.saveWindowPosition=function(winName,topFormName,leftFormName,widthFormName,heightFormName,zorderFormName){var win=miwt.$(winName);if(win==null)
return;var zorder=miwt.$(zorderFormName);if(zorder!=null)
zorder.value=win.style.zIndex;var top=miwt.$(topFormName);if(top!=null)
top.value=win.style.top;var left=miwt.$(leftFormName);if(left!=null)
left.value=win.style.left;var width=miwt.$(widthFormName);if(width!=null)
width.value=win.style.width;var height=miwt.$(heightFormName);if(height!=null)
height.value=win.style.height;};miwt.getWindowForElement=function(el){var oel=el,tn;while(el!=null){tn=(el.tagName||"").toLowerCase();if(tn=="div")
{if(miwt.hasClassName(el,'window')||miwt.hasClassName(el,'inlinewindow'))
return el;}
if(el.parentNode)
el=el.parentNode;else
el=el.parentElement;}
miwt.error("miwt.getWindowForElement(" +oel +"): Unable to find element parent that is a window.");alert("An unexpected error occurred. Try reloading the page.");return null;};miwt.repairWindowsAfterUpdate=function(){var activewindow=null;var newlist=[];for(i=0;i<miwt.windowlist.length;i++)
{var w=miwt.$(miwt.windowlist[i]);if(w!=null)
{newlist.push(miwt.windowlist[i]);w.miwt_hide_permiating=false;if(miwt.isWindowActive(w))
activewindow=w;}}
miwt.windowlist=newlist;if(activewindow!=null)
miwt.checkForPermiatingElements(activewindow);};miwt.activateWindow=function(object){if(miwt.$(object.id+"_title_div")==null)
return;if(object.style.zIndex!=miwt.windowTopZIndex){miwt.windowTopZIndex++;object.style.zIndex=miwt.windowTopZIndex;}
var title_td=miwt.$(object.id+"_title_td");miwt.removeClassName(title_td,"inactivewindowtitle");miwt.addClassName(title_td,"activewindowtitle");var title_div=miwt.$(object.id+"_title_div");miwt.removeClassName(title_div,"inactivewindowtitle");miwt.addClassName(title_div,"activewindowtitle");if(miwt.$(object.id+"_menu_btn")!=null)
miwt.button.imageButtonActivate(object.id+"_menu_btn");if(miwt.$(object.id+"_minimize_btn")!=null)
miwt.button.imageButtonActivate(object.id+"_minimize_btn");if(miwt.$(object.id+"_maximize_btn")!=null)
miwt.button.imageButtonActivate(object.id+"_maximize_btn");if(miwt.$(object.id+"_close_btn")!=null)
miwt.button.imageButtonActivate(object.id+"_close_btn");if(object.focusable)
miwt.stopObserving(miwt.getWindowContent(object),"mousedown",miwt.activateWindowPassive,false);var dialog=!!/\bdialog\b/.exec(object.className);for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=object.id)
{var w=miwt.$(miwt.windowlist[i]);if(w!=null&&w!=object){miwt.deactivateWindow(w);if(dialog)
miwt.disableChildren(w);}}}
miwt.enableChildren(object);object.miwt_hide_permiating=true;miwt.showPermiatingElements(object);};miwt.deactivateWindow=function(object){if(miwt.$(object.id+"_title_div")==null)
return;var title_td=miwt.$(object.id+"_title_td");miwt.removeClassName(title_td,"activewindowtitle");miwt.addClassName(title_td,"inactivewindowtitle");var title_div=miwt.$(object.id+"_title_div");miwt.removeClassName(title_div,"activewindowtitle");miwt.addClassName(title_div,"inactivewindowtitle");if(miwt.$(object.id+"_menu_btn")!=null)
miwt.button.imageButtonDeactivate(object.id+"_menu_btn");if(miwt.$(object.id+"_minimize_btn")!=null)
miwt.button.imageButtonDeactivate(object.id+"_minimize_btn");if(miwt.$(object.id+"_maximize_btn")!=null)
miwt.button.imageButtonDeactivate(object.id+"_maximize_btn");if(miwt.$(object.id+"_close_btn")!=null)
miwt.button.imageButtonDeactivate(object.id+"_close_btn");if(object.focusable)
miwt.observe(miwt.getWindowContent(object),"mousedown",miwt.activateWindowPassive,false);}
miwt.closeWindow=function(object){var dialog=!!/\bdialog\b/.exec(object.className);miwt.closeCKEditors(object);object.parentNode.removeChild(object);miwt.repairWindowsAfterUpdate();if(miwt.windowlist.length>0){var top=miwt.$(miwt.windowlist[0]);if(!top){miwt.error("miwt.closeWindow: Expecting top window at miwt.windowlist[0], got null");return;}
if(dialog)
miwt.enableChildren(top);for(i=1;i<miwt.windowlist.length;i++)
{var w=miwt.$(miwt.windowlist[i]);if(dialog)
miwt.enableChildren(w);if(w&&w.style.zIndex>top.style.zIndex)
top=w;}
miwt.activateWindow(top);}};miwt.isWindowActive=function(object){if(object.className.match(/inlinewindow/)&&miwt.windowlist.length==1)
{for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=object.id)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(!otherwindow.className.match(/inlinewindow/))
{var titletd=miwt.$(otherwindow.id+"_title_td");if(titletd!=null&&titletd.className.match(/activewindowtitle/))
return false;}}}
return true;}
var titletd=miwt.$(object.id+"_title_td");if(titletd==null)
{return false;}
return!!titletd.className.match(/activewindowtitle/);};miwt.getWindowContent=function(object){return miwt.$(object.id+"_content_div");};miwt.isWindowOverlapped=function(activewindow,otherwindow){if(otherwindow.className.match(/inlinewindow/))
return true;var activeTop=parseInt(activewindow.style.top);var activeLeft=parseInt(activewindow.style.left);var activeBottom=activeTop+parseInt(activewindow.offsetHeight);var activeRight=activeLeft+parseInt(activewindow.offsetWidth);var otherTop=parseInt(otherwindow.style.top);var otherLeft=parseInt(otherwindow.style.left);var otherBottom=otherTop+parseInt(otherwindow.offsetHeight);var otherRight=otherLeft+parseInt(otherwindow.offsetWidth);if(activeTop>otherBottom)return false;if(activeBottom<otherTop)return false;if(activeLeft>otherRight)return false;if(activeRight<otherLeft)return false;return true;};miwt.checkForPermiatingElements=function(activewindow){for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=activewindow.id)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(otherwindow!=null)
{if(miwt.isWindowOverlapped(activewindow,otherwindow))
miwt.hidePermiatingElements(otherwindow);else
miwt.showPermiatingElements(otherwindow);}}}
miwt.showPermiatingElements(activewindow);};miwt.beginWindowMove=function(evt){miwt.windowMoveTarget=miwt.getWindowForElement(miwt.element(evt));if(miwt.windowMoveTarget==null)
return;miwt.stop(evt);var p=miwt.pointer(evt);miwt.lastWindowX=p.x;miwt.lastWindowY=p.y;miwt.observe(document,"mousemove",miwt.doWindowMove,true);miwt.observe(document,"mouseup",miwt.endWindowMove,true);var td=miwt.$(miwt.windowMoveTarget.id+"_title_td");miwt.lastWindowCursor=td.style.cursor;td.style.cursor='move';miwt.lastDocumentCursor=document.body.style.cursor;document.body.style.cursor='move';var activate=true,i,mzi=miwt.windowMoveTarget.style.zIndex,w;if(mzi!=miwt.windowTopZIndex)
{for(i=0;i<miwt.windowlist.length&&activate;i++)
{w=miwt.$(miwt.windowlist[i]);if(w!=null&&w.className.match(/\bdialog\b/)&&w.style.zIndex>mzi){activate=false;}}}
if(activate)miwt.activateWindow(miwt.windowMoveTarget);miwt.$(miwt.windowMoveTarget.id+"_content_div").style.visibility="hidden";};miwt.getWindowPositionDelta=function(w,p){var dx=p.x-miwt.lastWindowX,dy=p.y-miwt.lastWindowY;return{dx:dx,dy:dy,distance:(Math.sqrt(Math.pow(dx,2) +Math.pow(dy,2)))};};miwt.updateLastWindowPosition=function(p){miwt.lastWindowX=p.x;miwt.lastWindowY=p.y;miwt.lastWindowTime=new Date().getMilliseconds();};miwt.doWindowMove=function(evt,force){miwt.stop(evt);var w=miwt.windowMoveTarget,p=miwt.pointer(evt),td=new Date().getMilliseconds()-miwt.lastWindowTime,delta=miwt.getWindowPositionDelta(w,p);force=force||Math.abs(delta.distance)>10||td>75;var f=function windowMove(){miwt.moveWindowRelative(w,delta);miwt.updateLastWindowPosition(p);};if(force)
f();};miwt.moveWindowRelative=function(w,delta){var x=parseInt(w.style.left)+delta.dx,y=parseInt(w.style.top)+delta.dy;w.style.left=x+"px";w.style.top=y+"px";};miwt.endWindowMove=function(evt){miwt.stopObserving(document,"mousemove",miwt.doWindowMove,true);miwt.stopObserving(document,"mouseup",miwt.endWindowMove,true);miwt.doWindowMove(evt,true);miwt.$(miwt.windowMoveTarget.id+"_title_td").style.cursor=miwt.lastWindowCursor;document.body.style.cursor=miwt.lastDocumentCursor;miwt.$(miwt.windowMoveTarget.id+"_content_div").style.visibility="visible";miwt.stop(evt);miwt.checkForPermiatingElements(miwt.windowMoveTarget);miwt.windowMoveTarget=null;};miwt.beginWindowResize=function(evt){var target=miwt.element(evt);miwt.windowResizeTarget=miwt.getWindowForElement(target);if(miwt.windowResizeTarget==null)
return;miwt.stop(evt);miwt.updateLastWindowPosition(miwt.pointer(evt));miwt.windowResizeDir=target.resizeDir;miwt.observe(document,"mousemove",miwt.doWindowResize,true);miwt.observe(document,"mouseup",miwt.endWindowResize,true);miwt.activateWindow(miwt.windowResizeTarget);};miwt.doWindowResize=function(evt){miwt.$(miwt.windowResizeTarget.id+"_content_div").style.visibility="hidden";var p=miwt.pointer(evt);var difX=p.x-miwt.lastWindowX;var difY=p.y-miwt.lastWindowY;var object=miwt.windowResizeTarget;var top=parseInt(object.style.top);var left=parseInt(object.style.left);var width=parseInt(object.style.width);var height=parseInt(object.style.height);var table=miwt.$(miwt.windowResizeTarget.id+"_table");var tableWidth=parseInt(table.style.width);var tableHeight=parseInt(table.style.height);var content=miwt.$(miwt.windowResizeTarget.id+"_content_div");var contentWidth=parseInt(content.style.width);var contentHeight=parseInt(content.style.height);if(miwt.windowResizeDir=="ne"){width=width+difX;height=height-difY;tableWidth=tableWidth+difX;tableHeight=tableHeight-difY;contentWidth=contentWidth+difX;contentHeight=contentHeight-difY;top=top+difY;}else if(miwt.windowResizeDir=="nw"){width=width-difX;height=height-difY;tableWidth=tableWidth-difX;tableHeight=tableHeight-difY;contentWidth=contentWidth-difX;contentHeight=contentHeight-difY;left=left+difX;top=top+difY;}else if(miwt.windowResizeDir=="se"){width=width+difX;height=height+difY;tableWidth=tableWidth+difX;tableHeight=tableHeight+difY;contentWidth=contentWidth+difX;contentHeight=contentHeight+difY;}else if(miwt.windowResizeDir=="sw"){width=width-difX;height=height+difY;tableWidth=tableWidth-difX;tableHeight=tableHeight+difY;contentWidth=contentWidth-difX;contentHeight=contentHeight+difY;left=left+difX;}else{alert("Internal error in window resize, I don't know which direction you are resizing.");miwt.endWindowResize(evt);}
object.style.top=top+"px";object.style.left=left+"px";object.style.width=width+"px";object.style.height=height+"px";table.style.width=tableWidth+"px";table.style.height=tableHeight+"px";content.style.width=contentWidth+"px";content.style.height=contentHeight+"px";};miwt.endWindowResize=function(evt){miwt.stopObserving(document,"mousemove",miwt.doWindowResize,true);miwt.stopObserving(document,"mouseup",miwt.endWindowResize,true);miwt.$(miwt.windowResizeTarget.id+"_content_div").style.visibility="visible";miwt.stop(evt);miwt.checkForPermiatingElements(miwt.windowMoveTarget);miwt.windowResizeTarget=null;};miwt.disableWindowActivation=function(evt){miwt.stop(evt);};miwt.enableChildren=function(root){miwt.disableChildren(root,false);};miwt.disableChildren=function(root,disable){if(root==null||!root.hasChildNodes()||miwt.IsIterationStopNode(root))
return;if(typeof disable=='undefined')
disable=true;var i;for(i=0;i<root.childNodes.length;i++)
{var node=root.childNodes.item(i);if(node.nodeType==Node.ELEMENT_NODE)
{if(node.hasAttributes)
{if(node.hasAttributes())
{if(disable){if(!node.hasAttribute("disabled")){node.wedisabled=true;node.setAttribute("disabled","true");}}else{if(node.wedisabled){node.wedisabled=false;node.removeAttribute("disabled");}}}}
else
{if(disable){if(node.disabled){node.wedisabled=true;node.disabled=disable;}}else{if(node.wedisabled){node.wedisabled=false;node.disabled=false;}}}
miwt.disableChildren(node,disable);}}};miwt.activateWindowPassive=function(evt){var win=miwt.getWindowForElement(miwt.element(evt));if(win==null)
return;if(!miwt.isWindowActive(win))
{miwt.activateWindow(win);miwt.checkForPermiatingElements(win);}};miwt.setAbsoluteWidth=function(object){var width=parseInt(object.offsetWidth,10);var height=parseInt(object.offsetHeight,10);object.style.width=width+"px";object.style.height=height+"px";};miwt.setInitialPosition=function(windowObject){if(windowObject.className.match(/inlinewindow/))
return;if(!windowObject.style.top||windowObject.style.top=="")
{var scroll=miwt.getScrollOffset();var initialTop=scroll.y +10;if(windowObject.className.match(/dialog/)){var height=miwt.getComputedStyle(windowObject,"height");if(height.match(/px/)){height=parseInt(height);if(height<miwt.getWindowHeight())
initialTop=scroll.y +(miwt.getWindowHeight() -height)/2;}
else if(height.match(/%/)){height=parseInt(height);if(height>0)
initialTop=scroll.y +(miwt.getWindowHeight()*(1 -height/100))/2;}else{height=windowObject.offsetHeight;if(height<miwt.getWindowHeight())
initialTop=scroll.y +(miwt.getWindowHeight() -height)/2;}}
for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=windowObject.id)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(otherwindow.style.top&&otherwindow.style.top!=''&&Math.abs(parseInt(otherwindow.style.top) -initialTop)<30)
{initialTop +=30;}}}
windowObject.style.top=initialTop +"px";}
if(!windowObject.style.left||windowObject.style.left=="")
{var scroll=miwt.getScrollOffset();var initialLeft=scroll.x +10;if(windowObject.className.match(/dialog/)){var width=miwt.getComputedStyle(windowObject,"width");if(width.match(/px/)){width=parseInt(width);if(width<miwt.getWindowWidth())
initialLeft=scroll.x +(miwt.getWindowWidth() -width)/2;}
else if(width.match(/%/)){width=parseInt(width);if(width>0)
initialLeft=scroll.x +(miwt.getWindowWidth()*(1 -width/100))/2;}else{width=windowObject.offsetWidth;if(width<miwt.getWindowWidth())
initialLeft=scroll.x +(miwt.getWindowWidth() -width)/2;}}
for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=windowObject.id)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(otherwindow.style.left&&otherwindow.style.left!=''&&Math.abs(parseInt(otherwindow.style.left) -initialLeft)<30)
{initialLeft +=30;}}}
windowObject.style.left=initialLeft +"px";}};miwt.ensurePassiveWindowActivation=function(windowObject){var windowContent=miwt.$(windowObject.id+"_content_div");miwt.stopObserving(windowContent,"mousedown",miwt.activateWindowPassive,false);miwt.observe(windowContent,"mousedown",miwt.activateWindowPassive,false);}
miwt.setupWindow=function(name,resizable,zindex,focusable,moveable){miwt.fixWindowList();var alreadyInList=false;for(var i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]==name)
{alreadyInList=true;break;}}
if(!alreadyInList)
miwt.windowlist.push(name);var windowObject=miwt.$(name);var windowTitle=miwt.$(name+"_table");var windowTable=miwt.$(name+"_table");var windowContent=miwt.$(name+"_content_div");var title=miwt.$(name+"_title_td");var active=miwt.isWindowActive(windowObject);if(zindex>miwt.windowTopZIndex)
{miwt.windowTopZIndex=zindex;}
windowObject.focusable=focusable;if(focusable)
{if(!active)
{miwt.ensurePassiveWindowActivation(windowObject);}
else if(!windowObject.className.match(/inlinewindow/))
{for(i=0;i<miwt.windowlist.length;i++)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(otherwindow.className.match(/inlinewindow/))
{miwt.ensurePassiveWindowActivation(otherwindow);}}}
if(moveable)
{miwt.observe(title,"mousedown",miwt.beginWindowMove,true);}
if(resizable)
{setAbsoluteWidth(windowContent);setAbsoluteWidth(windowTable);setAbsoluteWidth(windowObject);var resize;resize=miwt.$(name+"_windowresize_nw_div");miwt.observe(resize,"mousedown",miwt.beginWindowResize,false);resize.resizeDir="nw";resize=miwt.$(name+"_windowresize_ne_div");miwt.observe(resize,"mousedown",miwt.beginWindowResize,false);resize.resizeDir="ne";resize=miwt.$(name+"_windowresize_sw_div");miwt.observe(resize,"mousedown",miwt.beginWindowResize,false);resize.resizeDir="sw";resize=miwt.$(name+"_windowresize_se_div");miwt.observe(resize,"mousedown",miwt.beginWindowResize,false);resize.resizeDir="se";}}
else
{miwt.observe(windowObject,"mousedown",miwt.disableWindowActivation,true);miwt.disableChildren(windowObject);}
for(i=0;i<miwt.windowlist.length;i++)
{if(miwt.windowlist[i]!=windowObject.id)
{var otherwindow=miwt.$(miwt.windowlist[i]);if(otherwindow!=null&&miwt.isWindowOverlapped(windowObject,otherwindow))
{if(active)
{miwt.hidePermiatingElements(otherwindow);}
else
{miwt.hidePermiatingElements(windowObject);}}}}
if(active)
{miwt.showPermiatingElements(windowObject);}
if(!miwt.hasClassName(windowObject,"inlinewindow"))
{var form=miwt.up(windowObject,'form');var funcArg=name;form.RegisterOnSubmitHandler(windowObject,function(){return miwt.prv_saveWindowPosition(funcArg)});miwt.autoSizeWindow(windowObject,windowContent,windowTitle);}
miwt.setInitialPosition(windowObject);if(active||!miwt.hasClassName(windowObject,"dialog"))
miwt.activateWindow(windowObject);};miwt.autoSizeWindow=function(windowObject,windowContent,windowTitle){if(miwt.isResizable(windowObject)||!windowObject)
return;var wos=windowObject.style,hasHeight=miwt.hasCSSRule(windowObject,'height','auto');if(!hasHeight||!!windowObject.autosized)
{wos.top='0px';wos.left='0px';windowContent=windowContent||miwt.$(windowObject.id+"_content_div");var hb=windowContent.offsetTop,contentNode=windowContent.firstChild;if(navigator.userAgent.match(/MSIE 7/))contentNode.style.minHeight="2em";windowTitle=windowTitle||miwt.$(windowObject.id+"_table");var childH=0,hh=false,h=miwt.getWindowHeight() -40,i,el,list=miwt.children(contentNode),cnh=0;for(i=0;el=list[i++];)childH +=miwt.height(el);for(i=0,list=[windowContent,contentNode];el=list[i++];){cnh=Math.max(cnh,miwt.height(el));if(miwt.hasCSSRule(el,'height','100%')){hh=true;break;}}
if(!hh)cnh=Math.max(cnh,childH);if(cnh>0){var ih=cnh +hb;if(ih>h)ih=h;if(ih>windowObject.offsetHeight)
windowObject.style.height=ih +"px";else if(windowObject.autosized&&(cnh +40)<windowObject.offsetHeight)
windowObject.style.height=(cnh +hb) +"px";windowObject.autosized=true;}
wos.top='';wos.left='';miwt.setInitialPosition(windowObject);}};miwt.prv_saveWindowPosition=function(){miwt.saveWindowPosition(this+'',this+'_windowTop',this+'_windowLeft',this+'_windowWidth',this+'_windowHeight',this+'_windowZOrder');return true;};miwt.isWindow=function(node){if(!node||!node.className)
return false;return!!/\bwindow\b/.exec(node.className);};miwt.isInlineWindow=function(node){if(!node||!node.className)
return false;return!!/\binlinewindow\b/.exec(node.className);};miwt.isInActiveWindow=function(node){var win=miwt.getWindowForElement(node);if(!win)
return false;return miwt.isWindowActive(win);};miwt.AddSetupHandler(['div'],function(tag,node)
{var isWindow=miwt.isWindow(node);var isInlineWindow=miwt.isInlineWindow(node);if(isWindow||isInlineWindow)
{miwt.setupWindow(node.id,miwt.isResizable(node),miwt.getComputedStyle(node,'z-index')||0,true,!isInlineWindow);}});miwt.isResizable=function(node){return node&&miwt.$(node.id+"_windowresize_nw_div")!=null};}
if(typeof miwtpermiating=='undefined'){var miwtpermiating={};miwt.elementPermiatingNone=[];miwt.elementPermiatingIE6=['select'];miwt.elementPermiating=miwt.elementPermiatingNone;if(navigator.userAgent.match(/MSIE [456]/))
miwt.elementPermiating=miwt.elementPermiatingIE6;miwt.isElementPermiating=function(node){if(!node.tagName)return false;var tag=node.tagName.toLowerCase(),t,i=0;for(;t=miwt.elementPermiating[i++];)
if(tag==t)return true;return false;};miwt.hidePermiatingElements=function(object){if(object.miwt_hide_permiating==true)
return;object.miwt_hide_permiating=true;var el,node,i=0,nodes,j;for(;el=miwt.elementPermiating[i++];){nodes=object.getElementsByTagName(el);for(j=0;node=nodes[j++];)node.style.visibility="hidden";}};miwt.showPermiatingElements=function(object){if(object.miwt_hide_permiating==false)
return;object.miwt_hide_permiating=false;var el,node,i=0,j,nodes,p;for(;el=miwt.elementPermiating[i++];){nodes=object.getElementsByTagName(el);nodeLoop:for(j=0;node=nodes[j++];){p=node.parentNode;while(p){if(miwt.isVisibilitySet(p)){try{node.style.visibility=null;break nodeLoop;}catch(e){}}
p=p.parentNode;}
node.style.visibility="visible";}}};miwt.isVisibilitySet=function(node){var s=node.style;return(s&&(s.visibility||'')!='');};miwt.IsIterationStopNode=function(object){return object.nodeName=="SELECT"||object.nodeName=="select";};}
if(typeof miwtcollapsible=='undefined'){var miwtcollapsible={};miwt.collapsableContainerToggle=function(collapseFormKey,containerDivId,triggerId,anchor,inline){var formElement=miwt.$(collapseFormKey);if(formElement==null)
return;if(formElement.value=="true"){miwt.prv_collapsableContainerShow(containerDivId,triggerId,anchor,inline);formElement.value="false";}
else if(formElement.value=="false"){miwt.prv_collapsableContainerHide(containerDivId,triggerId,inline);formElement.value="true";}};miwt.prv_collapsableContainerShow=function(containerDivId,triggerId,anchor,inline){var divObject=miwt.$(containerDivId);if(divObject==null)
return;var triggerObject=miwt.$(triggerId);if(triggerObject!=null){var pos=miwt.cumulativeOffset(triggerObject);if(anchor.indexOf("south")>=0){if(anchor=="south"){divObject.style.left=pos[0]+"px";divObject.style.top=(pos[1]+triggerObject.offsetHeight)+"px";}
else{divObject.style.top=pos[1]+"px";}}
if(anchor.indexOf("east")>=0){divObject.style.left=(pos[0]+triggerObject.offsetWidth)+"px";if(anchor=="east")
divObject.style.top=pos[1]+"px";}
if(anchor.indexOf("north")>=0){if(anchor=="north"){divObject.style.left=pos[0]+"px";divObject.style.top=(pos[1]-divObject.offsetHeight)+"px";}
else{divObject.style.top=((pos[1]+triggerObject.offsetHeight)-divObject.offsetHeight)+"px";}}
if(anchor.indexOf("west")>=0){divObject.style.left=(pos[0]-divObject.offsetWidth)+"px";if(anchor=="west")
divObject.style.top=pos[1]+"px";}
miwt.removeClassName(triggerObject,"miwt_collapsable_hidden");miwt.removeClassName(triggerObject.parentNode,"miwt_collapsable_hidden");miwt.addClassName(triggerObject,"miwt_collapsable_shown");miwt.addClassName(triggerObject.parentNode,"miwt_collapsable_shown");}
miwt.removeClassName(divObject,"miwt_collapsable_hidden");miwt.addClassName(divObject,"miwt_collapsable_shown");if(inline)
divObject.style.display="inline";else
divObject.style.visibility="visible";if(miwt.hasClassName(triggerObject,"miwt_collapsable_exclusive"))
{var el,list;list=miwt.$$('.miwt_collapsable_exclusive');while(el=list.pop()){if(el.div&&el.div!=divObject){miwt.prv_collapsableContainerHide(el.div.id,el.id,el.disposition.toLowerCase()=='inline');el.state.value="true";}}}};miwt.prv_collapsableContainerHide=function(containerDivId,triggerId,inline){var divObject=miwt.$(containerDivId);if(divObject==null)
return;if(inline)
divObject.style.display="none";else
divObject.style.visibility="hidden";miwt.removeClassName(divObject,"miwt_collapsable_shown");miwt.addClassName(divObject,"miwt_collapsable_hidden");var triggerObject=miwt.$(triggerId);if(triggerObject!=null){miwt.removeClassName(triggerObject,"miwt_collapsable_shown");miwt.removeClassName(triggerObject.parentNode,"miwt_collapsable_shown");miwt.addClassName(triggerObject,"miwt_collapsable_hidden");miwt.addClassName(triggerObject.parentNode,"miwt_collapsable_hidden");}};miwt.collapseContainerToggle=function(event){miwt.stop(event);var element=miwt.element(event)||event;miwt.collapsableContainerToggle(element.state.name,element.div.id,element.id,element.anchor,element.disposition.toLowerCase()=='inline');};miwt.AddSetupHandler(['button','a','img'],function(tag,node){var match=/miwt_collapsable_(\w+)_(\w+)/.exec(node.className);if(match){node.anchor=match[1];node.disposition=match[2];node.div=miwt.$(node.id.replace("_collapsable_trigger","_collapsable"));node.state=miwt.$(node.id.replace("_collapsable_trigger",""));miwt.observe(node,"click",miwt.collapseContainerToggle);if(node.disposition.toLowerCase()!='inline'&&node.state.value=='false'){miwt.prv_collapsableContainerShow(node.div.id,node.id,node.anchor,false);}}});}
if(typeof miwttimer=='undefined'){var miwttimer={};miwttimer.graceperiod=3000;miwttimer.fireTimer=function(formname){var form=miwt.$(formname);if(!form)
return;miwttimer.oldTimer=null;if(miwttimer.rescheduleTimerNeeded&&(new Date() -miwttimer.rescheduleTimerNeeded)<miwttimer.graceperiod)
{miwttimer.oldTimer=setTimeout('miwttimer.fireTimer("'+formname+'")',miwttimer.graceperiod,'JavaScript');}
else
{form.MIWTSubmit();}};miwttimer.rescheduleTimer=function(){if(miwttimer.oldTimer){miwttimer.rescheduleTimerNeeded=new Date();}};miwttimer.scheduleUpdate=function(formname,time){var form=miwt.$(formname);if(miwttimer.oldTimer){clearTimeout(miwttimer.oldTimer);miwttimer.oldTimer=null;}
miwttimer.oldTimer=setTimeout('miwttimer.fireTimer("'+formname+'")',time||1000,'JavaScript');};miwt.AddSetupHandler(['dfn'],function(tag,node){if(tag=='dfn'&&/\bmiwt_timer\b/.exec(node.className))
{var form=node;while(form.parentNode&&(!form.tagName||(form.tagName.toLowerCase()!="form")))
form=form.parentNode;miwttimer.scheduleUpdate(form.id||form.name,parseInt(node.firstChild.data));}});}
if(typeof validation=='undefined'){var validation={};validation.integerpattern=new RegExp("[ ]*([-]?[ ]*[0-9]+)[ ]*$");validation.realpattern=new RegExp("([ ]*[-]?[ ]*[0-9]*[\.][0-9]+[ ]*$)|([ ]*[-]?[ ]*[0-9]+[\.][0-9]*[ ]*$)");validation.emailpattern=new RegExp("^.+@.+\..{2,3}$");validation.date_mmddyyyy_slash=/([0-9][0-9])\x2F([0-9][0-9])\x2F([0-9][0-9][0-9][0-9])/;validation.date_mmddyyyy_dash=new RegExp("([0-9][0-9])-([0-9][0-9])-([0-9][0-9][0-9][0-9])");validation.date_mmddyy_slash=/([0-9][0-9])\x2F([0-9][0-9])\x2F([0-9][0-9])/;validation.date_mmddyy_dash=new RegExp("([0-9][0-9])-([0-9][0-9])-([0-9][0-9])");validation.config_regex_formatpattern=new RegExp("([-]?[\\w]*)[ ]*,[ ]*([-]?[\\w]*)");validation.config_typepattern=new RegExp("([\\w]+)([\\(](.*)[\\)])?");validation.config_formatpattern=new RegExp("([-]?[^\\s,]*)[ ]*,[ ]*([-]?[^\\s,]*)");validation.isWhiteSpace=function(s){if(s==' '||s=='\t'||s=='\n'||s=='\r'||s=='\b'||s=='\f')
return true;else
return false;};validation.ltrim=function(s){if(s=='')
return s;var n=s.length;for(var i=0;i<n;i++)
{if(validation.isWhiteSpace(s.charAt(i))==false)
return s.substr(i);}
return'';};validation.rtrim=function(s){if(s=='')
return s;var n=s.length;for(var i=n;i>0;i--)
{if(validation.isWhiteSpace(s.charAt(i-1))==false)
return s.substr(0,i);}
return'';};validation.trim=function(s){return validation.ltrim(validation.rtrim(s));};validation.isInteger=function(s){var re=validation.integerpattern;var parse=re.exec(s);if(parse==null)
return false;else if(parse[0]==s)
return true;else
return false;};validation.checkNumber=function(n,lbound,ubound){var nn=new Number(n);if(lbound!=""&&ubound!="")
{lbound=new Number(lbound);ubound=new Number(ubound);if(nn<lbound||nn>ubound)
return false;}
else if(lbound==""&&ubound!="")
{ubound=new Number(ubound);if(nn>ubound)
return false;}
if(lbound!=""&&ubound=="")
{lbound=new Number(lbound);if(nn<lbound)
return false;}
return true;};validation.checkString=function(s,lbound,ubound){var nn=s.length;if(lbound!=""&&ubound!="")
{lbound=new Number(lbound);ubound=new Number(ubound);if(nn<lbound||nn>ubound)
return false;}
else if(lbound==""&&ubound!="")
{ubound=new Number(ubound);if(nn>ubound)
return false;}
if(lbound!=""&&ubound=="")
{lbound=new Number(lbound);if(nn<lbound)
return false;}
return true;};validation.isDate=function(s,dateFormat){var re;if(dateFormat=="mm/dd/yyyy")
{re=validation.date_mmddyyyy_slash;}
else if(dateFormat=="mm-dd-yyyy")
{re=validation.date_mmddyyyy_dash;}
else if(dateFormat=="mm/dd/yy")
{re=validation.date_mmddyy_slash;}
else if(dateFormat=="mm-dd-yy")
{re=validation.date_mmddyy_dash;}
var s=validation.trim(s);var parse=re.exec(s);if(parse==null||parse[0]!=s)
{return false;}
else
return true;};validation.isReal=function(s){var re=validation.realpattern;var parse=re.exec(s);if(parse==null)
return false;else if(parse[0]==s)
return true;else
return false;};validation.isNumeric=function(s){return validation.isInteger(s)||validation.isReal(s);};validation.isEmail=function(s){var re=validation.emailpattern;var parse=re.exec(s);if(parse==null)
return false;else
return true;};validation.isIgnored=function(htmlform){return htmlform.elements['btnhit'].value&&miwt.$(htmlform.elements['btnhit'].value+'_ignore_validation');};validation.validateForm=function(htmlform){if(validation.isIgnored(htmlform))
return true;for(var i=0;i<validation.fields.length;i++)
{if(validation.fields[i]==null||htmlform.elements[validation.fields[i].element.name]==null)
{var new_fv_fields=[];for(var j=0;j<validation.fields.length;j++)
{if(validation.fields[j]!=null&&htmlform.elements[validation.fields[j].element.name]!=null)
{new_fv_fields.push(validation.fields[j]);}}
validation.fields=new_fv_fields;return validation.validateForm(htmlform);}
if(validation.fields[i].required=="1")
{var e=validation.fields[i].element;if(e.type=="text"||e.type=="textarea")
{if(validation.trim(e.value).length==0)
{validation.inValidation=true;alert(validation.fields[i].message);e.focus();e.select();validation.inValidation=false;return false;}}
else if(e.type=="select-one"||e.type=="select-multiple")
{if(e.selectedIndex== -1||e.options[e.selectedIndex].value=="")
{validation.inValidation=true;alert(validation.fields[i].message);e.focus();validation.inValidation=false;return false;}}
else if(e.type=="radio"||e.type=="checkbox")
{var radios=htmlform.elements[e.name];var n=0;for(var k=0;k<radios.length;k++)
{if(radios[k].checked)
{n++;break;}}
if(n==0)
{validation.inValidation=true;alert(validation.fields[i].message);validation.inValidation=false;return false;}}}
else
{if(!validation.isFieldValid(validation.fields[i]))
{var e=validation.fields[i].element;if(!e.validation_called)
{e.focus();e.blur();}
return false;}}
if(validation.fields[i].type=="doubleentry")
{var value=validation.fields[i].element.value;var compareField=miwt.$(validation.fields[i].format);if(compareField!=null)
{var value2=compareField.value;if(value!=value2)
{validation.inValidation=true;alert(validation.fields[i].message);validation.inValidation=false;return false;}}}}
return true;};validation.badValidation=function(){if(validation.failedValidationInfo!=null){alert(validation.failedValidationInfo.message);validation.failedValidationInfo.element.focus();validation.failedValidationInfo.element.select();validation.failedValidationInfo=null;}};validation.isFieldValid=function(fieldinfo){var valid=true;var value=fieldinfo.element.value;if(validation.trim(value).length>0)
{if(fieldinfo.type=="int")
{valid=(validation.isInteger(value)&&validation.checkNumber(value,fieldinfo.lbound,fieldinfo.ubound));}
else if(fieldinfo.type=="num")
{valid=(validation.isNumeric(value)&&validation.checkNumber(value,fieldinfo.lbound,fieldinfo.ubound));}
else if(fieldinfo.type=="float")
{valid=(validation.isReal(value)&&validation.checkNumber(value,fieldinfo.lbound,fieldinfo.ubound));}
else if(fieldinfo.type=="text")
{valid=validation.checkString(value,fieldinfo.lbound,fieldinfo.ubound);}
else if(fieldinfo.type=="email")
{valid=validation.isEmail(value);}
else if(fieldinfo.type=="date")
{var dateFormat=(fieldinfo.format=="")?"mm/dd/yyyy":fieldinfo.format;valid=validation.isDate(value,dateFormat);}
else if(fieldinfo.type=="regexp")
{var re=new RegExp(fieldinfo.format);var s=validation.trim(value);var parse=re.exec(s);valid=(parse!=null&&parse[0]==s);}}
return valid;};validation.onBlurHandler=function(evt){if(validation.inValidation)
return true;var target=miwt.element(evt);if(validation.isIgnored(target.form))
return true;validation.inValidation=true;var fieldinfo=validation.getFieldInfo(target);var valid=true;if(fieldinfo!=null)
{valid=validation.isFieldValid(fieldinfo);}
target.validation_called=true;if(valid)
{validation.inValidation=false;return true;}
else
{validation.failedValidationInfo=fieldinfo;setTimeout(validation.badValidation,100,"JavaScript");validation.inValidation=false;Event.stop(evt);return false;}};validation.getFieldInfo=function(field){for(var i=0;i<validation.fields.length;i++)
{if(validation.fields[i].element.name==field.name)
return validation.fields[i];}
return null;};validation.setHandler=function(fieldinfo){validation.setEventHandler(fieldinfo.element,fieldinfo);};validation.setEventHandler=function(field,fieldinfo){if(field.type=="text"||field.type=="textarea")
{miwt.observe(field,"blur",validation.onBlurHandler,false);}};validation.fieldInfo=function(element,message,type,required){this.element=element;this.message=message;this.required=required;this.type=type.toLowerCase();this.format="";this.lbound="";this.ubound="";var parse=validation.config_typepattern.exec(type);if(parse!=null)
{this.type=parse[1];if(parse.length==4)
this.format=parse[3];parse=validation.config_formatpattern.exec(this.format);if(parse!=null)
{this.lbound=parse[1];this.ubound=parse[2];}}};validation.FormValidation_Register=function(element,message,type,required){var f=new validation.fieldInfo(element,message,type,required);validation.setHandler(f);for(var i=0;i<validation.fields.length;i++)
{if(validation.fields[i].element.name==element.name)
{validation.fields[i]=f;return;}}
validation.fields.push(f);};validation.fields=[];validation.inValidation=false;miwt.AddSetupHandler(['form'],function(tag,node){if(miwt.hasClassName(node,'miwt_form'))node.RegisterOnSubmitHandler(node,validation.validateForm);});miwt.AddSetupHandler(['dfn'],function(tag,node){if(tag!='dfn'||!/\bmiwt_validation\b/.exec(node.className))
return;var match=/(\S+)_val/.exec(node.id);if(!match)
return;var type=node.firstChild.data;var msgnode=miwt.$(node.id+"_message");var reqnode=miwt.$(node.id+"_required");if(msgnode&&msgnode.firstChild&&reqnode&&reqnode.firstChild){var msg=msgnode.firstChild.data;var req=reqnode.firstChild.data;var el=miwt.$(match[1]);if(el)
validation.FormValidation_Register(el,msg,type,req);else
miwt.error("Could not find element "+match[1]+" for validation");}});}
if(typeof miwttable=='undefined'){var miwttable={};miwt.AddSetupHandler(['table'],function(tag,node){if(tag!='table')
return;var headers=miwt.$$("thead th",node),i=0,n;if(miwt.$("columnmoving_"+node.id)){for(;n=headers[i++];){if(miwt.hasClassName(n,'control'))continue;n.id="columnmove_"+node.id+"_th_"+i;miwt.addClassName(n,"dnd_source");miwtdnd.setupDragSource(n);miwt.addClassName(n,"dnd_target");miwtdnd.setupDropTarget(n);}}});}
if(typeof miwtdnd=='undefined'){var miwtdnd={};miwtdnd.active=false;miwtdnd.dragSource=null;miwtdnd.dropTarget=null;miwtdnd.feedbackElement=null;miwtdnd.dropactiveset=false;miwtdnd.window_mousemove=function(evt){if(!miwtdnd.dragSource)
return;var p=miwt.pointer(evt);if(!miwtdnd.active){if(Math.abs(p.x -miwtdnd.startX)>2||Math.abs(p.y -miwtdnd.startY)>2){miwt.stop(evt);miwtdnd.active=true;if(miwtdnd.menu){miwt.remove(miwtdnd.menu);miwtdnd.menu=null;}
miwt.addClassName(document.body,'dnd_active');var ua=navigator.userAgent,ie6=(miwt.B.IE&&ua.indexOf('MSIE 6')> -1),ie7=(miwt.B.IE&&ua.indexOf('MSIE 7')> -1);miwtdnd.feedbackElement=miwtdnd.dragSource.cloneNode(true);if(ie6||ie7){if(miwtdnd.feedbackElement.tagName.toLowerCase()=='td'){miwtdnd.feedbackElement=miwt.wrap(miwtdnd.feedbackElement,'tr');miwtdnd.feedbackElement.style.className=miwtdnd.dragSource.style.className;miwtdnd.feedbackElement=miwt.wrap(miwtdnd.feedbackElement,'table');miwtdnd.feedbackElement.style.className=miwtdnd.dragSource.parentNode.style.className;}
else if(miwtdnd.feedbackElement.tagName.toLowerCase()=='tr'){miwtdnd.feedbackElement=miwt.wrap(miwtdnd.feedbackElement,'table');miwtdnd.feedbackElement.style.className=miwtdnd.dragSource.style.className;}
miwtdnd.feedbackElement.style.position='absolute';}else{miwtdnd.feedbackElement.style.position='fixed';}
miwtdnd.feedbackElement.style.display='block';miwtdnd.feedbackElement.style.margin='0px';miwtdnd.feedbackElement.style.padding='0px';miwtdnd.feedbackElement.style.zIndex='999999';miwtdnd.feedbackElement.style.right='';miwtdnd.feedbackElement.style.bottom='';{miwtdnd.feedbackElement.removeAttribute("id");var node,nodes=miwtdnd.feedbackElement.getElementsByTagName('*');for(var i=0;node=nodes.item(i); ++i){node.removeAttribute("id");}}
miwt.removeClassName(miwtdnd.feedbackElement,"dnd_target");miwt.removeClassName(miwtdnd.feedbackElement,"dnd_source");miwt.addClassName(miwtdnd.feedbackElement,"dnd_feedback");miwtdnd.feedbackOffsetLeft=5;miwtdnd.feedbackOffsetTop=5;miwtdnd.feedbackElement.style.width=miwtdnd.dragSource.offsetWidth+"px";miwtdnd.feedbackElement.style.height=miwtdnd.dragSource.offsetHeight+"px";if(ie6||ie7)
document.body.appendChild(miwtdnd.feedbackElement);else
miwtdnd.dragSource.parentNode.appendChild(miwtdnd.feedbackElement);miwt.observe(document,"keydown",miwtdnd.window_escape,true);}}
else{miwt.stop(evt);}
if(miwtdnd.feedbackElement){var scrollOffsets;if(miwtdnd.feedbackElement.style.position=='absolute'){scrollOffsets={left:0,top:0};}
else{scrollOffsets=miwt.cumulativeOffset(document.body,true);}
miwtdnd.feedbackElement.style.left=(p.x-scrollOffsets.left+miwtdnd.feedbackOffsetLeft)+"px";miwtdnd.feedbackElement.style.top=(p.y-scrollOffsets.top+miwtdnd.feedbackOffsetTop)+"px";}
var i,e,dropEl=miwt.element(evt);if(dropEl==miwtdnd.feedbackElement)
return;while(dropEl&&!miwt.hasClassName(dropEl,"dnd_target"))
dropEl=dropEl.parentNode;if(dropEl&&!miwtdnd.isCompatible(miwtdnd.dragSource,dropEl)){miwt.info("Drop "+dropEl +" not compatible");dropEl=null;}
var addStyles=['dnd_target_active'];var removeStyles=[];if(dropEl&&dropEl.locations&&dropEl.locationRows&&dropEl.locationColumns){var targetOffset=miwt.cumulativeOffset(dropEl);var targetDim=miwt.getDimensions(dropEl);var row=Math.floor((p.y -targetOffset.top)/Math.max(1,targetDim.height/dropEl.locationRows));var col=Math.floor((p.x -targetOffset.left)/Math.max(1,targetDim.width/dropEl.locationColumns));if(row<0)
row=0;else if(row>=dropEl.locationRows)
row=dropEl.locationRows-1;if(col<0)
col=0;else if(col>=dropEl.locationColumns)
col=dropEl.locationColumns-1;var dropClass=dropEl.locations[row+","+col];if(dropClass){addStyles.push(dropClass);for(i=0;e=dropEl.allClassNames[i];i++)
if(dropClass!=e)removeStyles.push(e);}else
removeStyles=dropEl.allClassNames;}
if(miwtdnd.dropactiveset){var el,list=miwt.$$(".dnd_target_active");while(el=list.pop()){if(el!=dropEl)
el.className=el.className.replace(/\bdnd_target_active\S*\b/g,' ').trim();}}
miwtdnd.dropactiveset=false;if(dropEl&&dropEl.className){for(i=0;e=addStyles[i];i++)
miwt.addClassName(dropEl,e);for(i=0;e=removeStyles[i];i++)
miwt.removeClassName(dropEl,e);miwtdnd.dropactiveset=true;}};miwtdnd.window_mouseup=function(evt){miwt.stopObserving(document,"mousemove",miwtdnd.window_mousemove,true);miwt.stopObserving(document,"mouseup",miwtdnd.window_mouseup,true);miwt.removeClassName(document.body,'dnd_active');window.setTimeout(miwtdnd.stopOperation,10);};miwtdnd.window_escape=function(evt){var keycode=evt.keyCode||evt.which;if(keycode!=27)
return;miwt.stop(evt);miwtdnd.stopOperation();if(miwtdnd.menu){miwtdnd.menu.form.ResetTransient();miwtdnd.menu.parentNode.removeChild(miwtdnd.menu);miwtdnd.menu=null;}
miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);};miwtdnd.stopOperation=function(){if(miwtdnd.dropOpPending)
return;miwtdnd.active=false;miwtdnd.dragSource=null;miwtdnd.dropTarget=null;miwtdnd.startX=null;miwtdnd.startY=null;if(miwtdnd.feedbackElement){miwt.remove(miwtdnd.feedbackElement);miwtdnd.feedbackElement=null;}
if(miwtdnd.dropactiveset){var el,list=miwt.$$(".dnd_target_active");while(el=list.pop())
el.className=el.className.replace(/\bdnd_target_active\S*\b/g,' ').trim();miwtdnd.dropactiveset=false;}};miwtdnd.dragSource_mousedown=function(evt,drag){var src=miwt.element(evt);if(src&&(tag_name=src.tagName.toUpperCase())&&(tag_name=='INPUT'||tag_name=='SELECT'||tag_name=='OPTION'||tag_name=='BUTTON'||tag_name=='TEXTAREA'))return;miwtdnd.dragSource=drag||src;var p=miwt.pointer(evt);miwtdnd.startX=p.x;miwtdnd.startY=p.y;miwt.stop(evt);miwt.observe(document,"mousemove",miwtdnd.window_mousemove,true);miwt.observe(document,"mouseup",miwtdnd.window_mouseup,true);};miwtdnd.setupDragSource=function(node,contentTypes){var drag=node;drag.provides=contentTypes||[];miwt.addClassName(drag,"dnd_source");miwt.observe(node,"mousedown",function(evt){miwtdnd.dragSource_mousedown(evt||window.event,drag)},true);};miwtdnd.dropTarget_mouseup=function(evt,drop){if(!miwtdnd.active)
return;var eventel=miwt.element(evt);while(eventel&&!miwt.hasClassName(eventel,"dnd_target"))
eventel=eventel.parentNode;drop=eventel||drop;if(!miwtdnd.isCompatible(miwtdnd.dragSource,drop))
return;if(miwtdnd.dropTarget){var el=miwtdnd.dropTarget;while(el){if(drop==el){return;}
el=el.parentNode;}}
miwtdnd.dropTarget=drop;if(miwtdnd.dropTimer){clearTimeout(miwtdnd.dropTimer);miwtdnd.dropTimer=null;}
miwtdnd.dropOpPending=true;var form=miwt.findElement(evt,'form');var p=miwt.pointer(evt);miwtdnd.dropTimer=setTimeout(function(){miwtdnd.handleDropTargetActivate(drop,form,p.x,p.y);},10);};miwtdnd.handleDropTargetActivate=function(drop,form,x,y){miwtdnd.active=false;if(miwtdnd.dropTimer){clearTimeout(miwtdnd.dropTimer);miwtdnd.dropTimer=null;}
if(form){form.elements['dnd_source'].value=miwtdnd.dragSource.id;form.elements['dnd_target'].value=miwtdnd.dropTarget.id;var left,top,dropDim,dropOffset,scrollOffset,docOffset;docOffset=miwt.cumulativeOffset(document.body,true);scrollOffset=miwt.cumulativeOffset(miwtdnd.dropTarget,true);dropOffset=miwt.cumulativeOffset(miwtdnd.dropTarget);dropDim=miwt.getDimensions(miwtdnd.dropTarget);left=dropOffset.left -(scrollOffset.left -docOffset.left);top=dropOffset.top -(scrollOffset.top -docOffset.top);form.elements['dnd_location'].value="("+left+","+top+","+dropDim.width+","+dropDim.height+"),("+x+","+y+")";miwtdnd.dropOpPending=false;miwtdnd.stopOperation();if(drop.hasOptions){miwtdnd.menu=document.createElement("div");miwtdnd.menu.form=form;miwtdnd.menu.className="dropoptions";miwtdnd.menu.style.position='absolute';miwtdnd.menu.style.top=y+"px";miwtdnd.menu.style.left=x+"px";document.getElementsByTagName("body")[0].appendChild(miwtdnd.menu);miwtdnd.menu.innerHTML='<div class="loading">Loading...</div>';new Ajax.Request(miwt.$$("dfn.ajax_uri",form).pop().firstChild.data,{method:'get',parameters:{ajax:'true',alt:'dropoptions',dnd_source:form.elements['dnd_source'].value,dnd_target:form.elements['dnd_target'].value},onSuccess:function(transport){try{var tmpnode=document.createElement("div");tmpnode.innerHTML=transport.responseText;miwtdnd.menu.removeChild(miwtdnd.menu.firstChild);miwtdnd.menu.appendChild(tmpnode.firstChild);var el,list,count=0;list=miwt.$$("a",miwtdnd.menu);while(el=list.pop()){count++;el.dndoption=el.href.substring(el.href.indexOf("#")+1);el.href='#';el.onclick=function(evt){miwt.stop(evt);miwtdnd.menu.parentNode.removeChild(miwtdnd.menu);miwtdnd.menu=null;form.elements['dnd_option'].value=this.dndoption;miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);try{this.onclick=null;}catch(e){}
form.MIWTSubmit();};}
if(count==0)
{miwtdnd.menu.parentNode.removeChild(miwtdnd.menu);miwtdnd.menu=null;miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);form.MIWTSubmit();}}
catch(e){miwt.info("drop options",e);}},onFailure:function(){miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);form.MIWTSubmit();},onException:function(){miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);form.MIWTSubmit();}});}
else{miwt.stopObserving(document,"keydown",miwtdnd.window_escape,true);form.MIWTSubmit();}}else{miwtdnd.dropOpPending=false;miwtdnd.stopOperation();}};miwtdnd.setupDropTarget=function(node,hasOptions,contentTypes,locations){var drop=node;drop.accepts=contentTypes||[];drop.hasOptions=!!hasOptions;miwt.addClassName(drop,"dnd_target");drop.locations=[];drop.allClassNames=[];drop.locationRows=1;drop.locationColumns=1;if(locations&&locations.length>0){var dim=/(\d+)X(\d+)/.exec(locations[0]);drop.locationRows=dim[1];drop.locationColumns=dim[2];for(var i=1,cells,className;(cells=locations[i++])&&(className=locations[i++]);){className="dnd_target_active_" +className;drop.allClassNames.push(className);var values=cells.match(/\d+/g);for(var r,c;(r=values.shift())&&(c=values.shift());){drop.locations[r+","+c]=className;}}}
miwt.observe(node,"mouseup",function(evt){miwtdnd.dropTarget_mouseup(evt,drop)},true);};miwtdnd.isCompatible=function(dragSource,dropTarget){if(dragSource==null)
return false;if(dropTarget==null)
return false;if(dragSource.provides.length==0)
return true;if(dropTarget.accepts.length==0)
return true;for(var i=0,a;a=dropTarget.accepts[i];i++){for(var j=0,b;b=dragSource.provides[j];j++)
if(a==b)return true;}
return false;};miwt.AddSetupHandler(['dfn'],function(tag,node)
{if(/\bdnd_source_def\b/.exec(node.className)){var a=miwt.words(node.firstChild.data);miwtdnd.setupDragSource(miwt.$(a.shift()),a);}
if(/\bdnd_target_def\b/.exec(node.className)){var a=miwt.words(node.firstChild.data);var drop=miwt.$(a.shift());var hasOptions=!/nodropoptions/.test(a.shift());var contentTypes=[];var locations=[];for(var el;el=a.shift();){if(locations.length>0||/\d+X\d+/.test(el))
locations.push(el);else
contentTypes.push(el);}
miwtdnd.setupDropTarget(drop,hasOptions,contentTypes,locations);}});}
if(typeof miwtcalendar=='undefined'){miwtcalendar={};miwt.calendarClearHandler=function(evt){var node=miwt.element(evt).node;node.value='';if(/\bmiwt_submit\b/.exec(node.className))
miwt.calendarUpdateSubmit(node);else
miwt.calendarUpdateNoSubmit(node);};miwt.calendarUpdateSubmit=function(node){if(this&&this.target){node=miwt.$(this.target);}
if(!node)return;var form=node.form;form.elements['btnhit'].value=node.name||node.id;node.hinttexton=false;node.style.color=null;form.MIWTSubmit();};miwt.calendarUpdateNoSubmit=function(node){if(this&&this.target){node=miwt.$(this.target);}
if(!node)return;node.hinttexton=false;node.style.color=null;};miwt.AddSetupHandler(['input'],function(tag,node){if(!/\bmiwt_calendar\b/.exec(node.className))
return;var submit=/\bmiwt_submit\b/.exec(node.className);var form=node.form;var yearstart=miwt.$(node.id+'_yearstart');var yearend=miwt.$(node.id+'_yearend');var yearrange=null;if(yearstart&&yearend)
yearrange=[parseInt(yearstart.firstChild.data),parseInt(yearend.firstChild.data)];else
yearrange=[1900,2999];var funcArg={target:node.id},updateFunction=(submit)?function(){miwt.calendarUpdateSubmit.call(funcArg);}:function(){miwt.calendarUpdateNoSubmit.call(funcArg);};var clearbutton=miwt.$(node.id+"_clear");if(clearbutton){clearbutton.node=node;miwt.observe(clearbutton,"click",miwt.calendarClearHandler);}
try
{var openbutton=miwt.$(node.id+"_open");if(openbutton){Calendar.setup({inputField:node.id,button:openbutton,ifFormat:miwt.$(node.id+'_format').firstChild.data,range:yearrange,showOthers:true,showsTime:(miwt.$(node.id+'_time')!=null),onUpdate:updateFunction,timeFormat:"12",cache:true});}}
catch(e){miwt.error("Cannot init calendar, check your classpath",e);}});}
if(typeof miwt.list=='undefined'){miwt.list={};miwt.list.inputclick=function(evt){var input=miwt.element(evt),p=input.parentNode,el,list;if(input.checked){if(input.type=='radio'){list=miwt.$$(".checked",p.parentNode);while(el=list.pop())
miwt.removeClassName(el,"checked");}
miwt.addClassName(p,"checked");}else{miwt.removeClassName(p,"checked");}};miwt.list.elementclick=function(evt){var el=miwt.element(evt),input=miwt.$$("input.selector",el).pop();if(!input)return;input.click();};miwt.AddSetupHandler(['input'],function ListSetupFn(tag,node){var el=node.parentNode,richlist=el.parentNode;if(!/\belement\b/.exec(el.className))
return;if(!/\brichlist\b/.exec(richlist.className))
return;miwt.observe(node,'click',miwt.list.inputclick);miwt.observe(el,'click',miwt.list.elementclick);});}
if(document.addEventListener)
document.addEventListener("DOMContentLoaded",miwt.onLoad,false);miwt.observe(window,'load',miwt.onLoad);if(document.readyState=='complete'||(window.i2rd&&window.i2rd.rdy))
miwt.onLoad();
/*  JS Resource: lib/jscalendar/calendar_stripped.js  */

Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getCumulativeOffset=function(el){var valueT=0,valueL=0;do{valueT+=el.offsetTop||0;valueL+=el.offsetLeft||0;el=el.offsetParent;}while(el);return{left:valueL,top:valueT};};Calendar.getAbsolutePos=function(el){if(document.defaultView&&document.defaultView.getComputedStyle){var r={x:parseInt(document.defaultView.getComputedStyle(el,"").getPropertyValue("left")),y:parseInt(document.defaultView.getComputedStyle(el,"").getPropertyValue("top"))};if(!isNaN(r.x)&&!isNaN(r.y))return r;}else if(el.currentStyle){var r={x:parseInt(el.currentStyle["left"]),y:parseInt(el.currentStyle["top"])};if(!isNaN(r.x)&&!isNaN(r.y))return r;}var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var co=Calendar.getCumulativeOffset(el);var r={x:co.left-SL,y:co.top-ST};return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||"&#160;";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML="&#160;";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML="&#160;";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var br;if(window.innerWidth&&window.innerWidth>0){br={x:window.innerWidth,y:window.innerHeight};}else if(document.documentElement&&document.documentElement.clientWidth>0){br={x:document.documentElement.clientWidth,y:document.documentElement.clientHeight};}else if(document.body.clientWidth&&document.body.clientWidth>0){br={x:document.body.clientWidth,y:document.body.clientHeight};}else{var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);}if(Calendar.is_ie){var docEl=document.documentElement?document.documentElement:document.body;br.y+=docEl.scrollTop;br.x+=docEl.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case"T":p.y-=h;break;case"B":p.y+=el.offsetHeight;break;case"C":p.y+=(el.offsetHeight-h)/2;break;case"t":p.y+=el.offsetHeight-h;break;case"b":break;}switch(halign){case"L":p.x-=w;break;case"R":p.x+=el.offsetWidth;break;case"C":p.x+=(el.offsetWidth-w)/2;break;case"l":p.x+=el.offsetWidth-w;break;case"r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();if(this.isPopup){var tmp=el;var zindex=0;try{while(tmp!=null){if(tmp.style&&tmp.style.zIndex){var zval=parseInt(tmp.style.zIndex);if(zval>zindex)zindex=zval;}tmp=tmp.parentNode;}if(zindex>0){self.element.style.zIndex=zindex;}}catch(e){if(typeof log4js!='undefined'){log4js.logger.error("Unable to get zIndex.",e);}}}};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case"%d":case"%e":d=parseInt(a[i],10);break;case"%m":m=parseInt(a[i],10)-1;break;case"%Y":case"%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case"%b":case"%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case"%H":case"%I":case"%k":case"%l":hr=parseInt(a[i],10);break;case"%P":case"%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case"%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
/*  JS Resource: lib/jscalendar/calendar-setup_stripped.js  */

Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;};
/*  JS Resource: lib/jscalendar/lang/calendar-en.js  */

Calendar._DN=new Array
("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");Calendar._SDN=new Array
("Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun");Calendar._FD=0;Calendar._MN=new Array
("January","February","March","April","May","June","July","August","September","October","November","December");Calendar._SMN=new Array
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");Calendar._TT={};Calendar._TT["INFO"]="About the calendar";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n" +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +"\n\n" +"Date selection:\n" +"- Use the \xab, \xbb buttons to select year\n" +"- Use the " +String.fromCharCode(0x2039) +", " +String.fromCharCode(0x203a) +" buttons to select month\n" +"- Hold mouse button on any of the above buttons for faster selection.";Calendar._TT["ABOUT_TIME"]="\n\n" +"Time selection:\n" +"- Click on any of the time parts to increase it\n" +"- or Shift-click to decrease it\n" +"- or click and drag for faster selection.";Calendar._TT["PREV_YEAR"]="Prev. year (hold for menu)";Calendar._TT["PREV_MONTH"]="Prev. month (hold for menu)";Calendar._TT["GO_TODAY"]="Go Today";Calendar._TT["NEXT_MONTH"]="Next month (hold for menu)";Calendar._TT["NEXT_YEAR"]="Next year (hold for menu)";Calendar._TT["SEL_DATE"]="Select date";Calendar._TT["DRAG_TO_MOVE"]="Drag to move";Calendar._TT["PART_TODAY"]=" (today)";Calendar._TT["DAY_FIRST"]="Display %s first";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Close";Calendar._TT["TODAY"]="Today";Calendar._TT["TIME_PART"]="(Shift-)Click or drag to change value";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e";Calendar._TT["WK"]="wk";Calendar._TT["TIME"]="Time:";
/*  JS Resource: cms/js/cms-sessionto.js  */

if(typeof cms_sessionto=='undefined'){cms_sessionto=true;if(typeof cms=='undefined'){cms={};}
cms.sessionExpire=function(){if(!cms.sessionLoginURL){return;}
var w=window;if(window.top){w=window.top;}
i2rd.deleteCookie("JSESSIONID");i2rd.deleteCookie("jsessionid");w.location.replace(cms.sessionLoginURL);};cms.reactivateSession=function(){i2rd.removeEvent(document.body,"mousemove",cms.reactivateSession,true);log4js.logger.info("Session reactivated");};cms.sessionResetExpireTimeout=function(){if(cms.sessionExpireTimeout){window.clearTimeout(cms.sessionExpireTimeout);}
cms.sessionExpireTimeout=window.setTimeout(cms.sessionExpire,(cms.sessionTO));if(cms.sessionReactivateTimeout){window.clearTimeout(cms.sessionReactivateTimeout);}
var delay=(cms.sessionTO -300000);if(delay>0){cms.sessionReactivateTimeout=window.setTimeout(cms.sessionAboutToExpire,delay);}};cms.sessionAboutToExpire=function(){var w=window;if(window.top){w=window.top;}
i2rd.addEvent(document.body,"mousemove",cms.reactivateSession,true);};cms.setupSessionTO=function(){if(window.top&&window.top!=window){return;}
var csc=document.getElementById("cms-session-config");if(csc){cms.sessionTO=document.getElementById("cms-session-config-interval-to");if(cms.sessionTO){cms.sessionTO=parseInt(i2rd.getInnerText(cms.sessionTO))*1000;cms.sessionLoginURL=document.getElementById("cms-session-config-login-url");if(cms.sessionLoginURL){cms.sessionLoginURL=i2rd.getInnerText(cms.sessionLoginURL);}else{cms.sessionLoginURL=null;}
cms.sessionResetExpireTimeout();var originalLogMethod=log4js.logger.log;log4js.logger.log=function(logLevel,mesg,exception){if(log4js.logger.canLog(logLevel)){cms.sessionResetExpireTimeout();}
originalLogMethod.apply(log4js.logger,[logLevel,mesg,exception]);};}
csc.parentNode.removeChild(csc);}
i2rd.removeEvent(window,"load",cms.setupSessionTO);};i2rd.addEvent(window,"load",cms.setupSessionTO,true);}
/*  JS Resource: cms/js/bean/MenuBean.js  */

if(typeof MB=='undefined'){var MB={};}
MB.array=function(nl){var i,l=[];for(i=0;i<nl.length;i++)l.push(nl.item(i));return l;};MB.lastEventTime=new Date();MB.addClassName=function(el,cn){if(!MB.hasClassName(el,cn))
el.className=((el.className||'') +' ' +cn);};MB.err=function(m,e){if(typeof log4js!='undefined')log4js.logger.error(m,e);else if(typeof console!='undefined')console.log(m);};MB.data=window.localStorage;MB.getData=function(key){if(!!MB.data)return MB.data[key];else{var i=0,c,cn=key+"=",ca=document.cookie.split(';');for(;c=ca[i];i++){while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(cn)==0)return c.substring(cn.length,c.length);}
return null;}};MB.setData=function(key,val){if(!!MB.data)MB.data[key]=val;else{var d=new Date();d.setDate(d.getDate()+5);document.cookie=key +"=" +val +"; expires=" +d.toUTCString() +"; path=/";}};MB.removeClassName=function(el,cn){if(!MB.hasClassName(el,cn))return;el.className=(el.className||'').replace(RegExp("(^|\\s+)" +cn +"(\\s+|$)",'g'),' ');};MB.hasClassName=function(el,cn){var cur=(el.className||'');return cur==cn||(RegExp('\\b'+cn+'\\b').test(cur));};MB.getTarget=function(evt){evt=evt||window.event;var el=(evt.srcElement||evt.target);while(el&&el.nodeName.toLowerCase()!="li")
el=el.parentNode;return el;};MB.getTop=function(li){var parent=li;while(parent&&parent.className!='menubean'&&parent.nodeName.toLowerCase()!='div'){parent=parent.parentNode;}
if(parent==null)
throw new Error("Unable to find top of menu");return parent;};MB.GetChildUL=function(li){if(!MB.hasClassName(li,'mi_parent'))return null;var h,ul,hb,t;var children=li.getElementsByTagName("ul");if(!children||children.length==0){children=li.getElementsByTagName("UL");}
for(h=0,hb=children.length;(t=children[h]);h++){if(t.parentNode===li){if(ul){MB.err("Invalid DOM structure for menu. li.id = "+li.id+", children.length = " +(children==null?"null":children.length));break;}else{ul=t;}}}
return ul;};MB.SetInactiveClass=function(el){var elements=el.getElementsByTagName("li");if(!elements||elements.length==0){try{elements=el.getElementsByTagName("LI");}catch(e){}}
var liElements=MB.array(elements);var node=null;while((node=liElements.pop())){MB.removeClassName(node,'mi_active');MB.addClassName(node,'mi_inactive');}};MB.SetActive=function(li,activate){if(!MB.hasClassName(li,'over')){MB.addClassName(li,'over');var ul=MB.GetChildUL(li);if(ul&&ul.className.match("_persistent")){var nodelist=MB.GetOpenState(li);var entry=new RegExp("\\b" +li.id +"\\b");if(!entry.test(nodelist)){nodelist=(nodelist +"," +li.id);}
MB.SetOpenState(li,nodelist)}}
if(activate){var top=MB.getTop(li);MB.SetInactiveClass(top);if(!MB.hasClassName(li,'mi_active')){MB.removeClassName(li,'mi_inactive');MB.addClassName(li,'mi_active');}}
var ps=li.previousSibling,ns=li.nextSibling;if(ps&&!MB.hasClassName(ps,'prev_sibling')){MB.addClassName(ps,'prev_sibling');}
if(ns&&!MB.hasClassName(ns,'next_sibling')){MB.addClassName(ns,'next_sibling');}};MB.SetInActive=function(li){if(!MB.hasClassName(li,'over'))
return;MB.removeClassName(li,'over');var ul=MB.GetChildUL(li);if(ul&&ul.className.match("_persistent")){var nodelist=MB.GetOpenState(li);nodelist=nodelist.replace(new RegExp("," +li.id +"\\b"),"");MB.SetOpenState(li,nodelist);}
var ps=li.previousSibling,ns=li.nextSibling;if(ps){MB.removeClassName(ps,'prev_sibling');}
if(ns){MB.removeClassName(ns,'next_sibling');}};MB.GetOpenState=function(li){return MB.getData(MB.getTop(li).id +"-CMO")||"";};MB.SetOpenState=function(li,nodelist){MB.setData(MB.getTop(li).id +"-CMO",nodelist);};MB.MenuBeanInit=function(div){if(typeof div=='string')div=document.getElementById(div);if(!!div.mbinited)return;div.mbinited=true;var nodelist=MB.getData(div.id +"-CMO")||"";var item=null;var elements=div.getElementsByTagName("li");var liElements=MB.array(elements);while((item=liElements.pop())){var pn=item.parentNode;if(pn&&pn.nodeName.toLowerCase()=="ul"){pn=pn.parentNode;if(pn&&pn.nodeName.toLowerCase()=="li"&&!MB.hasClassName(pn,'mi_parent')){MB.addClassName(pn,'mi_parent');}}
item.onclick=function(evt){var now=new Date();if((now -MB.lastEventTime)<200)return;MB.lastEventTime=new Date();var target=MB.getTarget(evt);if(MB.hasClassName(target,'over')){MB.SetInActive(target,true);}
else{MB.SetActive(target);}};if(!item.parentNode.className.match(/_persistent/)){item.onmouseover=function(evt){try{MB.SetActive(this);}catch(e){}};item.onmouseout=function(evt){try{MB.SetInActive(this);}catch(e){}};}else{var tmpId="," +item.id;if(nodelist.indexOf(tmpId)== -1){MB.SetInActive(item);}}}
if(document.getElementById){var liList=nodelist.split(",");for(var h=0;h<liList.length;h++){var id=liList[h];if(id){var li=document.getElementById(id);if(li){MB.SetActive(li);}}}}};MB.scan=function(start){if(typeof start=='string')start=document.getElementById(start);var m,div,s=(start||document),i,ib;if(document.evalute){var result=document.evaluate("//div[contains(@class,'menubean')]",s,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(i=0,ib=result.snapshotLength;i<ib;i++){m[m.length]=result.snapshotItem(i);}}else{m=s.getElementsByTagName("div");}
for(i=0,ib=m.length;i<ib;i++){div=m[i];if((div.className||'').match(/menubean/))
MB.MenuBeanInit(div);}};
if(typeof cms_js_includes != 'undefined') {
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-include.js/_fn/cms-include.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/i2rd-util.js/_fn/i2rd-util.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-iefix.js/_fn/cms-iefix.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-dim.js/_fn/cms-dim.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-pageeffect.js/_fn/cms-pageeffect.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/bean/emailpage.js/_fn/emailpage.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/prototype.js/_fn/prototype.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/logger.js/_fn/logger.js');
 cms.addJSInclude('/resources/dyn/docroot/Javascript_%02_%01Path/_fn/cp-resource-path.js');
 cms.addJSInclude('/resources/dyn/docroot/FCKeditor/ckeditor.js/_fn/ckeditor.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/miwt/miwt-lib.js/_fn/miwt-lib.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/jscalendar/calendar_stripped.js/_fn/calendar_stripped.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/jscalendar/calendar-setup_stripped.js/_fn/calendar-setup_stripped.js');
 cms.addJSInclude('/resources/dyn/docroot/lib/jscalendar/lang/calendar-en.js/_fn/calendar-en.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/cms-sessionto.js/_fn/cms-sessionto.js');
 cms.addJSInclude('/resources/dyn/docroot/cms/js/bean/MenuBean.js/_fn/MenuBean.js');
}

