var wmd_options={autostart:false};
var Attacklab=Attacklab||{};
Attacklab.wmd_env={};
Attacklab.account_options={};
Attacklab.wmd_defaults={version:1,output:"HTML",lineLength:40,delayLoad:false};
if(!Attacklab.wmd){
Attacklab.wmd=function(){
Attacklab.loadEnv=function(){
var _1=function(_2){
if(!_2){
return;
}
for(var _3 in _2){
Attacklab.wmd_env[_3]=_2[_3];
}
};
_1(Attacklab.wmd_defaults);
_1(Attacklab.account_options);
_1(top["wmd_options"]);
Attacklab.full=true;
var _4="bold italic | link blockquote code image | ol ul heading hr";
Attacklab.wmd_env.buttons=Attacklab.wmd_env.buttons||_4;
};
Attacklab.loadEnv();
var _5=["showdown.js","wmd-base.js","wmd-plus.js"];
var _6=function(_7){
};
Attacklab.fileLoaded=function(_8){
arguments.callee.count=arguments.callee.count||0;
if(++arguments.callee.count>=_5.length){
var go=function(){
Attacklab.wmdBase();
Attacklab.Util.startEditor();
};
if(Attacklab.wmd_env.delayLoad){
window.setTimeout(go,0);
}else{
go();
}
}
};
Attacklab.editorInit=function(){
Attacklab.wmdPlus();
};
var _f=function(_10){
var _11=RegExp("(.*)"+_10+"(\\?(.+))?$","g");
var _12=document.getElementsByTagName("script");
for(var i=0;i<_12.length;i++){
if(_11.test(_12[i].src)){
var _14=RegExp.$1;
if(/wmd-editor.com/.test(_12[i].src)){
return null;
}
return _14;
}
}
};
Attacklab.basePath=_f("wmd.js")||"/js/wmd/";
};
Attacklab.wmd();
}
var Attacklab=Attacklab||{};
Attacklab.showdown=Attacklab.showdown||{};
Attacklab.showdown.converter=function(){
this.obfuscation;
var _1;
var _2;
var _3;
var _4=0;
this.makeHtml=function(_5){
_1=new Array();
_2=new Array();
_3=new Array();
_5=_5.replace(/~/g,"~T");
_5=_5.replace(/\$/g,"~D");
_5=_5.replace(/\r\n/g,"\n");
_5=_5.replace(/\r/g,"\n");
_5="\n\n"+_5+"\n\n";
_5=_6(_5);
_5=_5.replace(/^[ \t]+$/mg,"");
_5=_5.replace(/(<[a-z\/!$?]("[^"]*"|'[^']*'|[^'">])*>?|<!(--.*?--\s*)+>?)/gi, _duh);
//_5=_7(_5);
_5=_8(_5);
_5=_9(_5);
_5=_a(_5);
_5=_5.replace(/~D/g,"$$");
_5=_5.replace(/~T/g,"~");
return _5;
};
var _8=function(_b){
var _b=_b.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(_c,m1,m2,m3,m4){
m1=m1.toLowerCase();
_1[m1]=_11(m2);
if(m3){
return m3+m4;
}else{
if(m4){
_2[m1]=m4.replace(/"/g,"&quot;");
}
}
return "";
});
return _b;
};
var _duh=function(_whm, _uh) {
	var _bT = _uh;	
	_bT = _bT.sub('<', '&lt;');
	_bT = _bT.sub('<', '&gt;');
	_bT = '<span class="userhtml">' + _bT + '</span>';
	_bT = "~H" + (_3.push(_bT)-1) + "H";
	return _bT;
};
var _7=function(_12){
_12=_12.replace(/\n/g,"\n\n");
var _13="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del";
var _14="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";
_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,_15);
_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,_15);
_12=_12.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,_15);
_12=_12.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,_15);
_12=_12.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,_15);
_12=_12.replace(/\n\n/g,"\n");
return _12;
};
var _15=function(_16,m1){
var _18=m1;
_18=_18.replace(/\n\n/g,"\n");
_18=_18.replace(/^\n/,"");
_18=_18.replace(/\n+$/g,"");
_18="\n\n~K"+(_3.push(_18)-1)+"K\n\n";
return _18;
};
var _9=function(_19){
_19=_1a(_19);
var key=_1c("<hr />");
_19=_19.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
_19=_19.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key);
_19=_19.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key);
_19=_1d(_19);
_19=_1e(_19);
_19=_1f(_19);
_19=_7(_19);
_19=_20(_19);
return _19;
};
var _21=function(_22){
_22=_23(_22);
_22=_24(_22);
_22=_25(_22);
_22=_26(_22);
_22=_27(_22);
_22=_28(_22);
_22=_11(_22);
_22=_29(_22);
_22=_22.replace(/  +\n/g," <br />\n");
return _22;
};
var _24=function(_2a){
var _2b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
_2a=_2a.replace(_2b,function(_2c){
var tag=_2c.replace(/(.)<\/?code>(?=.)/g,"$1`");
tag=_2e(tag,"\\`*_");
return tag;
});
return _2a;
};
var _27=function(_2f){
_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_30);
_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_30);
_2f=_2f.replace(/(\[([^\[\]]+)\])()()()()()/g,_30);
return _2f;
};
var _30=function(_31,m1,m2,m3,m4,m5,m6,m7){
if(m7==undefined){
m7="";
}
var _39=m1;
var _3a=m2;
var _3b=m3.toLowerCase();
var url=m4;
var _3d=m7;
if(url==""){
if(_3b==""){
_3b=_3a.toLowerCase().replace(/ ?\n/g," ");
}
url="#"+_3b;
if(_1[_3b]!=undefined){
url=_1[_3b];
if(_2[_3b]!=undefined){
_3d=_2[_3b];
}
}else{
if(_39.search(/\(\s*\)$/m)>-1){
url="";
}else{
return _39;
}
}
}
url=_2e(url,"*_");
if(url.indexOf(':')>=0) {
var urlprot = url.slice(0,3);
if(urlprot != 'htt' && urlprot != 'mai' && urlprot != 'ftp' && urlprot != 'fee' && urlprot != 'rss'){
url = '';
}
}
var _3e="<a href=\""+url+"\"";
if(_3d!=""){
_3d=_3d.replace(/"/g,"&quot;");
_3d=_2e(_3d,"*_");
_3e+=" title=\""+_3d+"\"";
}
_3e+=">"+_3a+"</a>";
return _3e;
};
var _26=function(_3f){
_3f=_3f.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_40);
_3f=_3f.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_40);
return _3f;
};
var _40=function(_41,m1,m2,m3,m4,m5,m6,m7){
var _49=m1;
var _4a=m2;
var _4b=m3.toLowerCase();
var url=m4;
var _4d=m7;
if(!_4d){
_4d="";
}
if(url==""){
if(_4b==""){
_4b=_4a.toLowerCase().replace(/ ?\n/g," ");
}
url="#"+_4b;
if(_1[_4b]!=undefined){
url=_1[_4b];
if(_2[_4b]!=undefined){
_4d=_2[_4b];
}
}else{
return _49;
}
}
_4a=_4a.replace(/"/g,"&quot;");
url=_2e(url,"*_");
var _4e="<img src=\""+url+"\" alt=\""+_4a+"\"";
_4d=_4d.replace(/"/g,"&quot;");
_4d=_2e(_4d,"*_");
_4e+=" title=\""+_4d+"\"";
_4e+=" />";
return _4e;
};
var _1a=function(_4f){
_4f=_4f.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(_50,m1){
return _1c("<h1>"+_21(m1)+"</h1>");
});
_4f=_4f.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(_52,m1){
return _1c("<h2>"+_21(m1)+"</h2>");
});
_4f=_4f.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(_54,m1,m2){
var _57=m1.length;
return _1c("<h"+_57+">"+_21(m2)+"</h"+_57+">");
});
return _4f;
};
var _58;
var _1d=function(_59){
_59+="~0";
var _5a=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
if(_4){
_59=_59.replace(_5a,function(_5b,m1,m2){
var _5e=m1;
var _5f=(m2.search(/[*+-]/g)>-1)?"ul":"ol";
_5e=_5e.replace(/\n{2,}/g,"\n\n\n");
var _60=_58(_5e);
_60=_60.replace(/\s+$/,"");
_60="<"+_5f+">"+_60+"</"+_5f+">\n";
return _60;
});
}else{
_5a=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
_59=_59.replace(_5a,function(_61,m1,m2,m3){
var _65=m1;
var _66=m2;
var _67=(m3.search(/[*+-]/g)>-1)?"ul":"ol";
var _66=_66.replace(/\n{2,}/g,"\n\n\n");
var _68=_58(_66);
_68=_65+"<"+_67+">\n"+_68+"</"+_67+">\n";
return _68;
});
}
_59=_59.replace(/~0/,"");
return _59;
};
_58=function(_69){
_4++;
_69=_69.replace(/\n{2,}$/,"\n");
_69+="~0";
_69=_69.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(_6a,m1,m2,m3,m4){
var _6f=m4;
var _70=m1;
var _71=m2;
if(_70||(_6f.search(/\n{2,}/)>-1)){
_6f=_9(_72(_6f));
}else{
_6f=_1d(_72(_6f));
_6f=_6f.replace(/\n$/,"");
_6f=_21(_6f);
}
return "<li>"+_6f+"</li>\n";
});
_69=_69.replace(/~0/g,"");
_4--;
return _69;
};
var _1e=function(_73){
_73+="~0";
_73=_73.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(_74,m1,m2){
var _77=m1;
var _78=m2;
_77=_79(_72(_77));
_77=_6(_77);
_77=_77.replace(/^\n+/g,"");
_77=_77.replace(/\n+$/g,"");
//_77="<pre><code>"+_77+"\n</code></pre>";
return _1c(_77)+_78;
});
_73=_73.replace(/~0/,"");
return _73;
};
var _1c=function(_7a){
_7a=_7a.replace(/(^\n+|\n+$)/g,"");
return "\n\n~K"+(_3.push(_7a)-1)+"K\n\n";
};
var _23=function(_7b){
_7b=_7b.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(_7c,m1,m2,m3,m4){
var c=m3;
c=c.replace(/^([ \t]*)/g,"");
c=c.replace(/[ \t]*$/g,"");
c=_79(c);
return m1+"<code>"+c+"</code>";
});
return _7b;
};
var _79=function(_82){
_82=_82.replace(/&/g,"&amp;");
_82=_82.replace(/</g,"&lt;");
_82=_82.replace(/>/g,"&gt;");
_82=_2e(_82,"*_{}[]\\",false);
return _82;
};
var _29=function(_83){
_83=_83.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>");
_83=_83.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>");
return _83;
};
this.hidetable;
var _1f=function(_84){
_84=_84.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(_85,m1){
var bq=m1;
bq=bq.replace(/^[ \t]*>[ \t]?/gm,"~0");
bq=bq.replace(/~0/g,"");
bq=bq.replace(/^[ \t]+$/gm,"");
bq=_9(bq);
bq=bq.replace(/(^|\n)/g,"$1  ");
bq=bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(_88,m1){
var pre=m1;
pre=pre.replace(/^  /mg,"~0");
pre=pre.replace(/~0/g,"");
return pre;
});
return _1c("<blockquote>\n"+bq+"\n</blockquote>");
});
return _84;
};
var _20=function(_8b){
_8b=_8b.replace(/^\n+/g,"");
_8b=_8b.replace(/\n+$/g,"");
var _8c=_8b.split(/\n{2,}/g);
var _8d=new Array();
var end=_8c.length;
for(var i=0;i<end;i++){
var str=_8c[i];
if(str.search(/~K(\d+)K/g)>=0){
_8d.push(str);
}else{
if(str.search(/\S/)>=0){
str=_21(str);
str=str.replace(/^([ \t]*)/g,"<p>");
str+="</p>";
_8d.push(str);
}
}
}
end=_8d.length;
for(var i=0;i<end;i++){
while(_8d[i].search(/~K(\d+)K/)>=0){
var _91=_3[RegExp.$1];
_91=_91.replace(/\$/g,"$$$$");
_8d[i]=_8d[i].replace(/~K\d+K/,_91);
}
while(_8d[i].search(/~H(\d+)H/)>=0){
var _91=_3[RegExp.$1];
_91=_91.replace(/\$/g,"$$$$");
_8d[i]=_8d[i].replace(/~H\d+H/,_91);
}
}
return _8d.join("\n\n");
};
var _11=function(_92){
_92=_92.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;");
_92=_92.replace(/<(?![a-z\/?\$!])/gi,"&lt;");
return _92;
};
var _25=function(_93){
_93=_93.replace(/\\(\\)/g,_94);
_93=_93.replace(/\\([`*_{}\[\]()>#+-.!])/g,_94);
return _93;
};
var _28=function(_95){
_95=_95.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
_95=_95.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(_96,m1){
return _98(_a(m1));
});
return _95;
};
var _98=function(_99){
function char2hex(ch){
var _9b="0123456789ABCDEF";
var dec=ch.charCodeAt(0);
return (_9b.charAt(dec>>4)+_9b.charAt(dec&15));
}
var _9d=[function(ch){
return "&#"+ch.charCodeAt(0)+";";
},function(ch){
return "&#x"+char2hex(ch)+";";
},function(ch){
return ch;
}];
_99="mailto:"+_99;
_99=_99.replace(/./g,function(ch){
if(ch=="@"){
ch=_9d[Math.floor(Math.random()*2)](ch);
}else{
if(ch!=":"){
var r=Math.random();
ch=(r>0.9?_9d[2](ch):r>0.45?_9d[1](ch):_9d[0](ch));
}
}
return ch;
});
_99="<a href=\""+_99+"\">"+_99+"</a>";
_99=_99.replace(/">.+:/g,"\">");
return _99;
};
var _a=function(_a3){
_a3=_a3.replace(/~E(\d+)E/g,function(_a4,m1){
var _a6=parseInt(m1);
return String.fromCharCode(_a6);
});
return _a3;
};
var _72=function(_a7){
_a7=_a7.replace(/^(\t|[ ]{1,4})/gm,"~0");
_a7=_a7.replace(/~0/g,"");
return _a7;
};
var _6=function(_a8){
_a8=_a8.replace(/\t(?=\t)/g,"    ");
_a8=_a8.replace(/\t/g,"~A~B");
_a8=_a8.replace(/~B(.+?)~A/g,function(_a9,m1,m2){
var _ac=m1;
var _ad=4-_ac.length%4;
for(var i=0;i<_ad;i++){
_ac+=" ";
}
return _ac;
});
_a8=_a8.replace(/~A/g,"    ");
_a8=_a8.replace(/~B/g,"");
return _a8;
};
var _2e=function(_af,_b0,_b1){
var _b2="(["+_b0.replace(/([\[\]\\])/g,"\\$1")+"])";
if(_b1){
_b2="\\\\"+_b2;
}
var _b3=new RegExp(_b2,"g");
_af=_af.replace(_b3,_94);
return _af;
};
var _94=function(_b4,m1){
var _b6=m1.charCodeAt(0);
return "~E"+_b6+"E";
};
this.obfuscation;
};
var Showdown=Attacklab.showdown;
if(Attacklab.fileLoaded){
Attacklab.fileLoaded("showdown.js");
}
var Attacklab=Attacklab||{};
Attacklab.wmdBase=function(){
var _1=top;
var _2=_1["Attacklab"];
var _3=_1["document"];
var _4=_1["RegExp"];
var _5=_1["navigator"];
_2.Util={};
_2.Position={};
_2.Command={};
var _6=_2.Util;
var _7=_2.Position;
var _8=_2.Command;
_2.Util.IE=(_5.userAgent.indexOf("MSIE")!=-1);
_2.Util.oldIE=(_5.userAgent.indexOf("MSIE 6.")!=-1||_5.userAgent.indexOf("MSIE 5.")!=-1);
_2.Util.newIE=!_2.Util.oldIE&&(_5.userAgent.indexOf("MSIE")!=-1);
_6.makeElement=function(_9,_a){
var _b=_3.createElement(_9);
if(!_a){
var _c=_b.style;
_c.margin="0";
_c.padding="0";
_c.clear="none";
_c.cssFloat="none";
_c.textAlign="left";
_c.position="relative";
_c.lineHeight="1em";
_c.border="none";
_c.color="black";
_c.backgroundRepeat="no-repeat";
_c.backgroundImage="none";
_c.minWidth=_c.minHeight="0";
_c.maxWidth=_c.maxHeight="90000px";
}
return _b;
};
_6.getStyle=function(_d,_e){
var _f=function(_10){
return _10.replace(/-(\S)/g,function(_11,_12){
return _12.toUpperCase();
});
};
if(_d.currentStyle){
_e=_f(_e);
return _d.currentStyle[_e];
}else{
if(_1.getComputedStyle){
return _3.defaultView.getComputedStyle(_d,null).getPropertyValue(_e);
}
}
return "";
};
_6.getElementsByClass=function(_13,_14,_15){
var _16=[];
if(_14==null){
_14=_3;
}
if(_15==null){
_15="*";
}
var _17=_14.getElementsByTagName(_15);
var _18=_17.length;
var _19=new _4("(^|\\s)"+_13+"(\\s|$)");
for(var i=0,j=0;i<_18;i++){
if(_19.test(_17[i].className.toLowerCase())){
_16[j]=_17[i];
j++;
}
}
return _16;
};
_6.addEvent=function(_1c,_1d,_1e){
if(_1c.attachEvent){
_1c.attachEvent("on"+_1d,_1e);
}else{
_1c.addEventListener(_1d,_1e,false);
}
};
_6.removeEvent=function(_1f,_20,_21){
if(_1f.detachEvent){
_1f.detachEvent("on"+_20,_21);
}else{
_1f.removeEventListener(_20,_21,false);
}
};
_6.regexToString=function(_22){
var _23={};
var _24=_22.toString();
_23.expression=_24.replace(/\/([gim]*)$/,"");
_23.flags=_4.$1;
_23.expression=_23.expression.replace(/(^\/|\/$)/g,"");
return _23;
};
_6.stringToRegex=function(_25){
return new _4(_25.expression,_25.flags);
};
_6.elementOk=function(_26){
if(!_26||!_26.parentNode){
return false;
}
if(_6.getStyle(_26,"display")=="none"){
return false;
}
return true;
};
_6.skin=function(_27,_28,_29,_2a){
var _2b;
var _2c=(_5.userAgent.indexOf("MSIE")!=-1);
if(_2c){
_6.fillers=[];
}
var _2d=_29/2;
for(var _2e=0;_2e<4;_2e++){
var _2f=_6.makeElement("div");
_2b=_2f.style;
_2b.overflow="hidden";
_2b.padding="0";
_2b.margin="0";
_2b.lineHeight="0px";
_2b.height=_2d+"px";
_2b.width="50%";
_2b.maxHeight=_2d+"px";
_2b.position="absolute";
if(_2e&1){
_2b.top="0";
}else{
_2b.bottom=-_29+"px";
}
_2b.zIndex="-1000";
if(_2e&2){
_2b.left="0";
}else{
_2b.marginLeft="50%";
}
if(_2c){
var _30=_6.makeElement("span");
_2b=_30.style;
_2b.height="100%";
_2b.width=_2a;
_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg.png')";
_2b.position="absolute";
if(_2e&1){
_2b.top="0";
}else{
_2b.bottom="0";
}
if(_2e&2){
_2b.left="0";
}else{
_2b.right="0";
}
_2f.appendChild(_30);
}else{
_2b.backgroundImage="url("+_28+")";
_2b.backgroundPosition=(_2e&2?"left":"right")+" "+(_2e&1?"top":"bottom");
}
_27.appendChild(_2f);
}
var _31=function(_32){
var _33=_6.makeElement("div");
if(_6.fillers){
_6.fillers.push(_33);
}
_2b=_33.style;
_2b.overflow="hidden";
_2b.padding="0";
_2b.margin="0";
_2b.marginTop=_2d+"px";
_2b.lineHeight="0px";
_2b.height="100%";
_2b.width="50%";
_2b.position="absolute";
_2b.zIndex="-1000";
if(_2c){
var _34=_6.makeElement("span");
_2b=_34.style;
_2b.height="100%";
_2b.width=_2a;
_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg-fill.png',sizingMethod='scale')";
_2b.position="absolute";
_33.appendChild(_34);
if(_32){
_2b.left="0";
}
if(!_32){
_2b.right="0";
}
}
if(!_2c){
_2b.backgroundImage="url("+_2.basePath+"images/bg-fill.png)";
_2b.backgroundRepeat="repeat-y";
if(_32){
_2b.backgroundPosition="left top";
}
if(!_32){
_2b.backgroundPosition="right top";
}
}
if(!_32){
_33.style.marginLeft="50%";
}
return _33;
};
_27.appendChild(_31(true));
_27.appendChild(_31(false));
};
_6.setImage=function(_35,_36,_37,_38){
_36=_2.basePath+_36;
if(_5.userAgent.indexOf("MSIE")!=-1){
var _39=_35.firstChild;
var _3a=_39.style;
_3a.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_36+"')";
}else{
_35.src=_36;
}
return _35;
};
_6.createImage=function(_3b,_3c,_3d){
_3b=_2.basePath+_3b;
if(_5.userAgent.indexOf("MSIE")!=-1){
var _3e=_6.makeElement("span");
var _3f=_3e.style;
_3f.display="inline-block";
_3f.height="1px";
_3f.width="1px";
_3e.unselectable="on";
var _40=_6.makeElement("span");
_3f=_40.style;
_3f.display="inline-block";
_3f.height="1px";
_3f.width="1px";
_3f.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_3b+"')";
_40.unselectable="on";
_3e.appendChild(_40);
}else{
var _3e=_6.makeElement("img");
_3e.style.display="inline";
_3e.src=_3b;
}
_3e.style.border="none";
_3e.border="0";
if(_3c&&_3d){
_3e.style.width=_3c+"px";
_3e.style.height=_3d+"px";
}
return _3e;
};
_6.prompt=function(_41,_42,_43){
var _44;
var _45,_46,_47;
var _48=function(_49){
var _4a=(_49.charCode||_49.keyCode);
if(_4a==27){
_4b(true);
}
};
var _4b=function(_4c){
_6.removeEvent(_3.body,"keydown",_48);
var _4d=_47.value;
if(_4c){
_4d=null;
}
_45.parentNode.removeChild(_45);
_46.parentNode.removeChild(_46);
_43(_4d);
return false;
};
if(_42==undefined){
_42="";
}
var _4e=function(){
_46=_6.makeElement("div");
_44=_46.style;
_3.body.appendChild(_46);
_44.position="absolute";
_44.top="0";
_44.left="0";
_44.backgroundColor="#000";
_44.zIndex="1000";
var _4f=/konqueror/.test(_5.userAgent.toLowerCase());
if(_4f){
_44.backgroundColor="transparent";
}else{
_44.opacity="0.5";
_44.filter="alpha(opacity=50)";
}
var _50=_7.getPageSize();
_44.width="100%";
_44.height=_50[1]+"px";
};
var _51=function(){
_45=_3.createElement("div");
_45.style.border="3px solid #333";
_45.style.backgroundColor="#ccc";
_45.style.padding="10px;";
_45.style.borderTop="3px solid white";
_45.style.borderLeft="3px solid white";
_45.style.position="fixed";
_45.style.width="400px";
_45.style.zIndex="1001";
var _52=_6.makeElement("div");
_44=_52.style;
_44.fontSize="14px";
_44.fontFamily="Helvetica, Arial, Verdana, sans-serif";
_44.padding="5px";
_52.innerHTML=_41;
_45.appendChild(_52);
var _53=_6.makeElement("form");
_53.onsubmit=function(){
return _4b();
};
_44=_53.style;
_44.padding="0";
_44.margin="0";
_44.cssFloat="left";
_44.width="100%";
_44.textAlign="center";
_44.position="relative";
_45.appendChild(_53);
_47=_3.createElement("input");
_47.value=_42;
_44=_47.style;
_44.display="block";
_44.width="80%";
_44.marginLeft=_44.marginRight="auto";
_44.backgroundColor="white";
_44.color="black";
_53.appendChild(_47);
var _54=_3.createElement("input");
_54.type="button";
_54.onclick=function(){
return _4b();
};
_54.value="OK";
_44=_54.style;
_44.margin="10px";
_44.display="inline";
_44.width="7em";
var _55=_3.createElement("input");
_55.type="button";
_55.onclick=function(){
return _4b(true);
};
_55.value="Cancel";
_44=_55.style;
_44.margin="10px";
_44.display="inline";
_44.width="7em";
if(/mac/.test(_5.platform.toLowerCase())){
_53.appendChild(_55);
_53.appendChild(_54);
}else{
_53.appendChild(_54);
_53.appendChild(_55);
}
_6.addEvent(_3.body,"keydown",_48);
_45.style.top="50%";
_45.style.left="50%";
_45.style.display="block";
if(_2.Util.oldIE){
var _56=_7.getPageSize();
_45.style.position="absolute";
_45.style.top=_3.documentElement.scrollTop+200+"px";
_45.style.left="50%";
}
_3.body.appendChild(_45);
_45.style.marginTop=-(_7.getHeight(_45)/2)+"px";
_45.style.marginLeft=-(_7.getWidth(_45)/2)+"px";
};
_4e();
_1.setTimeout(function(){
_51();
var _57=_42.length;
if(_47.selectionStart!=undefined){
_47.selectionStart=0;
_47.selectionEnd=_57;
}else{
if(_47.createTextRange){
var _58=_47.createTextRange();
_58.collapse(false);
_58.moveStart("character",-_57);
_58.moveEnd("character",_57);
_58.select();
}
}
_47.focus();
},0);
};
_6.objectsEqual=function(_59,_5a){
for(var _5b in _59){
if(_59[_5b]!=_5a[_5b]){
return false;
}
}
for(_5b in _5a){
if(_59[_5b]!=_5a[_5b]){
return false;
}
}
return true;
};
_6.cloneObject=function(_5c){
var _5d={};
for(var _5e in _5c){
_5d[_5e]=_5c[_5e];
}
return _5d;
};
_6.escapeUnderscores=function(_5f){
_5f=_5f.replace(/(\S)(_+)(\S)/g,function(_60,_61,_62,_63){
_62=_62.replace(/_/g,"&#95;");
return _61+_62+_63;
});
return _5f;
};
_7.getPageSize=function(){
var _64,_65;
var _66,_67;
if(_1.innerHeight&&_1.scrollMaxY){
_64=_3.body.scrollWidth;
_65=_1.innerHeight+_1.scrollMaxY;
}else{
if(_3.body.scrollHeight>_3.body.offsetHeight){
_64=_3.body.scrollWidth;
_65=_3.body.scrollHeight;
}else{
_64=_3.body.offsetWidth;
_65=_3.body.offsetHeight;
}
}
var _68,_69;
if(self.innerHeight){
_68=self.innerWidth;
_69=self.innerHeight;
}else{
if(_3.documentElement&&_3.documentElement.clientHeight){
_68=_3.documentElement.clientWidth;
_69=_3.documentElement.clientHeight;
}else{
if(_3.body){
_68=_3.body.clientWidth;
_69=_3.body.clientHeight;
}
}
}
if(_65<_69){
_67=_69;
}else{
_67=_65;
}
if(_64<_68){
_66=_68;
}else{
_66=_64;
}
var _6a=[_66,_67,_68,_69];
return _6a;
};
_7.getPixelVal=function(_6b){
if(_6b&&/^(-?\d+(\.\d*)?)px$/.test(_6b)){
return _4.$1;
}
return undefined;
};
_7.getTop=function(_6c,_6d){
var _6e=_6c.offsetTop;
if(!_6d){
while(_6c=_6c.offsetParent){
_6e+=_6c.offsetTop;
}
}
return _6e;
};
_7.setTop=function(_6f,_70,_71){
var _72=_7.getPixelVal(_6f.style.top);
if(_72==undefined){
_6f.style.top=_70+"px";
_72=_70;
}
var _73=_7.getTop(_6f,_71)-_72;
_6f.style.top=(_70-_73)+"px";
};
_7.getLeft=function(_74,_75){
var _76=_74.offsetLeft;
if(!_75){
while(_74=_74.offsetParent){
_76+=_74.offsetLeft;
}
}
return _76;
};
_7.setLeft=function(_77,_78,_79){
var _7a=_7.getPixelVal(_77.style.left);
if(_7a==undefined){
_77.style.left=_78+"px";
_7a=_78;
}
var _7b=_7.getLeft(_77,_79)-_7a;
_77.style.left=(_78-_7b)+"px";
};
_7.getHeight=function(_7c){
var _7d=_7c.offsetHeight;
if(!_7d){
_7d=_7c.scrollHeight;
}
return _7d;
};
_7.setHeight=function(_7e,_7f){
var _80=_7.getPixelVal(_7e.style.height);
if(_80==undefined){
_7e.style.height=_7f+"px";
_80=_7f;
}
var _81=_7.getHeight(_7e)-_80;
if(_81>_7f){
_81=_7f;
}
_7e.style.height=(_7f-_81)+"px";
};
_7.getWidth=function(_82){
var _83=_82.offsetWidth;
if(!_83){
_83=_82.scrollWidth;
}
return _83;
};
_7.setWidth=function(_84,_85){
var _86=_7.getPixelVal(_84.style.width);
if(_86==undefined){
_84.style.width=_85+"px";
_86=_85;
}
var _87=_7.getWidth(_84)-_86;
if(_87>_85){
_87=_85;
}
_84.style.width=(_85-_87)+"px";
};
_7.getWindowHeight=function(){
if(_1.innerHeight){
return _1.innerHeight;
}else{
if(_3.documentElement&&_3.documentElement.clientHeight){
return _3.documentElement.clientHeight;
}else{
if(_3.body){
return _3.body.clientHeight;
}
}
}
};
_2.inputPoller=function(_88,_89,_8a){
var _8b=this;
var _8c;
var _8d;
var _8e,_8f;
this.tick=function(){
if(!_6.elementOk(_88)){
return;
}
if(_88.selectionStart||_88.selectionStart==0){
var _90=_88.selectionStart;
var _91=_88.selectionEnd;
if(_90!=_8c||_91!=_8d){
_8c=_90;
_8d=_91;
if(_8e!=_88.value){
_8e=_88.value;
return true;
}
}
}
return false;
};
var _92=function(){
if(_6.getStyle(_88,"display")=="none"){
return;
}
if(_8b.tick()){
_89();
}
};
var _93=function(){
if(_8a==undefined){
_8a=500;
}
_8f=_1.setInterval(_92,_8a);
};
this.destroy=function(){
_1.clearInterval(_8f);
};
_93();
};
_2.undoManager=function(_94,_95){
var _96=this;
var _97=[];
var _98=0;
var _99="none";
var _9a;
var _9b;
var _9c;
var _9d;
var _9e=function(_9f,_a0){
if(_99!=_9f){
_99=_9f;
if(!_a0){
_a1();
}
}
if(!_2.Util.IE||_99!="moving"){
_9c=_1.setTimeout(_a2,1);
}else{
_9d=null;
}
};
var _a2=function(){
_9d=new _2.textareaState(_94);
_9b.tick();
_9c=undefined;
};
this.setCommandMode=function(){
_99="command";
_a1();
_9c=_1.setTimeout(_a2,0);
};
this.canUndo=function(){
return _98>1;
};
this.canRedo=function(){
if(_97[_98+1]){
return true;
}
return false;
};
this.undo=function(){
if(_96.canUndo()){
if(_9a){
_9a.restore();
_9a=null;
}else{
_97[_98]=new _2.textareaState(_94);
_97[--_98].restore();
if(_95){
_95();
}
}
}
_99="none";
_94.focus();
_a2();
};
this.redo=function(){
if(_96.canRedo()){
_97[++_98].restore();
if(_95){
_95();
}
}
_99="none";
_94.focus();
_a2();
};
var _a1=function(){
var _a3=_9d||new _2.textareaState(_94);
if(!_a3){
return false;
}
if(_99=="moving"){
if(!_9a){
_9a=_a3;
}
return;
}
if(_9a){
if(_97[_98-1].text!=_9a.text){
_97[_98++]=_9a;
}
_9a=null;
}
_97[_98++]=_a3;
_97[_98+1]=null;
if(_95){
_95();
}
};
var _a4=function(_a5){
var _a6=false;
if(_a5.ctrlKey||_a5.metaKey){
var _a7=(_a5.charCode||_a5.keyCode)|96;
var _a8=String.fromCharCode(_a7);
switch(_a8){
case "y":
_96.redo();
_a6=true;
break;
case "z":
if(!_a5.shiftKey){
_96.undo();
}else{
_96.redo();
}
_a6=true;
break;
}
}
if(_a6){
if(_a5.preventDefault){
_a5.preventDefault();
}
if(_1.event){
_1.event.returnValue=false;
}
return;
}
};
var _a9=function(_aa){
if(!_aa.ctrlKey&&!_aa.metaKey){
var _ab=_aa.keyCode;
if((_ab>=33&&_ab<=40)||(_ab>=63232&&_ab<=63235)){
_9e("moving");
}else{
if(_ab==8||_ab==46||_ab==127){
_9e("deleting");
}else{
if(_ab==13){
_9e("newlines");
}else{
if(_ab==27){
_9e("escape");
}else{
if((_ab<16||_ab>20)&&_ab!=91){
_9e("typing");
}
}
}
}
}
}
};
var _ac=function(){
_6.addEvent(_94,"keypress",function(_ad){
if((_ad.ctrlKey||_ad.metaKey)&&(_ad.keyCode==89||_ad.keyCode==90)){
_ad.preventDefault();
}
});
var _ae=function(){
if(_2.Util.IE||(_9d&&_9d.text!=_94.value)){
if(_9c==undefined){
_99="paste";
_a1();
_a2();
}
}
};
_9b=new _2.inputPoller(_94,_ae,100);
_6.addEvent(_94,"keydown",_a4);
_6.addEvent(_94,"keydown",_a9);
_6.addEvent(_94,"mousedown",function(){
_9e("moving");
});
_94.onpaste=_ae;
_94.ondrop=_ae;
};
var _af=function(){
_ac();
_a2();
_a1();
};
this.destroy=function(){
if(_9b){
_9b.destroy();
}
};
_af();
};
_2.editor=function(_b0,_b1){
if(!_b1){
_b1=function(){
};
}
var _b2=28;
var _b3=4076;
var _b4=0;
var _b5,_b6;
var _b7=this;
var _b8,_b9;
var _ba,_bb,_bc;
var _bd,_be,_bf;
var _c0=[];
var _c1=function(_c2){
if(_bd){
_bd.setCommandMode();
}
var _c3=new _2.textareaState(_b0);
if(!_c3){
return;
}
var _c4=_c3.getChunks();
var _c5=function(){
_b0.focus();
if(_c4){
_c3.setChunks(_c4);
}
_c3.restore();
_b1();
};
var _c6=_c2(_c4,_c5);
if(!_c6){
_c5();
}
};
var _c7=function(_c8){
_b0.focus();
if(_c8.textOp){
_c1(_c8.textOp);
}
if(_c8.execute){
_c8.execute(_b7);
}
};
var _c9=function(_ca,_cb){
var _cc=_ca.style;
if(_cb){
_cc.opacity="1.0";
_cc.KHTMLOpacity="1.0";
if(_2.Util.newIE){
_cc.filter="";
}
if(_2.Util.oldIE){
_cc.filter="chroma(color=fuchsia)";
}
_cc.cursor="pointer";
_ca.onmouseover=function(){
_cc.backgroundColor="lightblue";
_cc.border="1px solid blue";
};
_ca.onmouseout=function(){
_cc.backgroundColor="";
_cc.border="1px solid transparent";
if(_2.Util.oldIE){
_cc.borderColor="fuchsia";
_cc.filter="chroma(color=fuchsia)"+_cc.filter;
}
};
}else{
_cc.opacity="0.4";
_cc.KHTMLOpacity="0.4";
if(_2.Util.oldIE){
_cc.filter="chroma(color=fuchsia) alpha(opacity=40)";
}
if(_2.Util.newIE){
_cc.filter="alpha(opacity=40)";
}
_cc.cursor="";
_cc.backgroundColor="";
if(_ca.onmouseout){
_ca.onmouseout();
}
_ca.onmouseover=_ca.onmouseout=null;
}
};
var _cd=function(_ce){
_ce&&_c0.push(_ce);
};
var _cf=function(){
_c0.push("|");
};
var _d0=function(){
var _d1=_6.createImage("images/separator.png",20,20);
_d1.style.padding="4px";
_d1.style.paddingTop="0px";
_b9.appendChild(_d1);
};
var _d2=function(_d3){
if(_d3.image){
var _d4=_6.createImage(_d3.image,16,16);
_d4.border=0;
if(_d3.description){
var _d5=_d3.description;
if(_d3.key){
var _d6=" Ctrl+";
_d5+=_d6+_d3.key.toUpperCase();
}
_d4.title=_d5;
}
_c9(_d4,true);
var _d7=_d4.style;
_d7.margin="0px";
_d7.padding="1px";
_d7.marginTop="7px";
_d7.marginBottom="5px";
_d4.onmouseout();
var _d8=_d4;
_d8.onclick=function(){
if(_d8.onmouseout){
_d8.onmouseout();
}
_c7(_d3);
return false;
};
_b9.appendChild(_d8);
return _d8;
}
return;
};
var _d9=function(){
for(var _da in _c0){
if(_c0[_da]=="|"){
_d0();
}else{
_d2(_c0[_da]);
}
}
};
var _db=function(){
if(_bd){
_c9(_be,_bd.canUndo());
_c9(_bf,_bd.canRedo());
}
};
var _dc=function(){
if(_b0.offsetParent){
_ba=_6.makeElement("div");
var _dd=_ba.style;
_dd.visibility="hidden";
_dd.top=_dd.left=_dd.width="0px";
_dd.display="inline";
_dd.cssFloat="left";
_dd.overflow="visible";
_dd.opacity="0.999";
_b8.style.position="absolute";
_ba.appendChild(_b8);
_b0.style.marginTop="";
var _de=_7.getTop(_b0);
_b0.style.marginTop="0";
var _df=_7.getTop(_b0);
_b4=_de-_df;
_e0();
_b0.parentNode.insertBefore(_ba,_b0);
_e1();
_6.skin(_b8,_2.basePath+"images/bg.png",_b2,_b3);
_dd.visibility="visible";
return true;
}
return false;
};
var _e2=function(){
var _e3=_2.wmd_env.buttons.split(/\s+/);
for(var _e4 in _e3){
switch(_e3[_e4]){
case "|":
_cf();
break;
case "bold":
_cd(_8.bold);
break;
case "italic":
_cd(_8.italic);
break;
case "link":
_cd(_8.link);
break;
}
if(_2.full){
switch(_e3[_e4]){
case "blockquote":
_cd(_8.blockquote);
break;
case "code":
_cd(_8.code);
break;
case "image":
_cd(_8.img);
break;
case "ol":
_cd(_8.ol);
break;
case "ul":
_cd(_8.ul);
break;
case "heading":
_cd(_8.h1);
break;
case "hr":
_cd(_8.hr);
break;
}
}
}
return;
};
var _e5=function(){
if(/\?noundo/.test(_3.location.href)){
_2.nativeUndo=true;
}
if(!_2.nativeUndo){
_bd=new _2.undoManager(_b0,function(){
_b1();
_db();
});
}
var _e6=_b0.parentNode;
_b8=_6.makeElement("div");
_b8.style.display="block";
_b8.style.zIndex=100;
if(!_2.full){
_b8.title+="\n(Free Version)";
}
_b8.unselectable="on";
_b8.onclick=function(){
_b0.focus();
};
_b9=_6.makeElement("span");
var _e7=_b9.style;
_e7.height="auto";
_e7.paddingBottom="2px";
_e7.lineHeight="0";
_e7.paddingLeft="15px";
_e7.paddingRight="15px";
_e7.display="block";
_e7.position="absolute";
_b9.unselectable="on";
_b8.appendChild(_b9);
_cd(_8.autoindent);
var _e8=_6.createImage("images/bg.png");
var _e9=_6.createImage("images/bg-fill.png");
_e2();
_d9();
if(_bd){
_d0();
_be=_d2(_8.undo);
_bf=_d2(_8.redo);
var _ea=_5.platform.toLowerCase();
if(/win/.test(_ea)){
_be.title+=" - Ctrl+Z";
_bf.title+=" - Ctrl+Y";
}else{
if(/mac/.test(_ea)){
_be.title+=" - Ctrl+Z";
_bf.title+=" - Ctrl+Shift+Z";
}else{
_be.title+=" - Ctrl+Z";
_bf.title+=" - Ctrl+Shift+Z";
}
}
}
var _eb="keydown";
if(_5.userAgent.indexOf("Opera")!=-1){
_eb="keypress";
}
_6.addEvent(_b0,_eb,function(_ec){
var _ed=false;
if(_ec.ctrlKey||_ec.metaKey){
var _ee=(_ec.charCode||_ec.keyCode);
var _ef=String.fromCharCode(_ee).toLowerCase();
for(var _f0 in _c0){
var _f1=_c0[_f0];
if(_f1.key&&_ef==_f1.key||_f1.keyCode&&_ec.keyCode==_f1.keyCode){
_c7(_f1);
_ed=true;
}
}
}
if(_ed){
if(_ec.preventDefault){
_ec.preventDefault();
}
if(_1.event){
_1.event.returnValue=false;
}
}
});
_6.addEvent(_b0,"keyup",function(_f2){
if(_f2.shiftKey&&!_f2.ctrlKey&&!_f2.metaKey){
var _f3=(_f2.charCode||_f2.keyCode);
switch(_f3){
case 13:
_c7(_8.autoindent);
break;
}
}
});
if(!_dc()){
_bc=_1.setInterval(function(){
if(_dc()){
_1.clearInterval(_bc);
}
},100);
}
_6.addEvent(_1,"resize",_e1);
_bb=_1.setInterval(_e1,100);
if(_b0.form){
var _f4=_b0.form.onsubmit;
_b0.form.onsubmit=function(){
_f5();
if(_f4){
return _f4.apply(this,arguments);
}
};
}
_db();
};
var _f5=function(){
if(_2.showdown){
var _f6=new _2.showdown.converter();
}
var _f7=_b0.value;
var _f8=function(){
_b0.value=_f7;
};
_f7=_6.escapeUnderscores(_f7);
if(!/markdown/.test(_2.wmd_env.output.toLowerCase())){
if(_f6){
_b0.value=_f6.makeHtml(_f7);
_1.setTimeout(_f8,0);
}
}
return true;
};
var _e0=function(){
//var _f9=_6.makeElement("div");
//var _fa=_f9.style;
//_fa.paddingRight="15px";
//_fa.height="100%";
//_fa.display="block";
//_fa.position="absolute";
//_fa.right="0";
//_f9.unselectable="on";
//var _fb=_6.makeElement("a");
//_fa=_fb.style;
//_fa.position="absolute";
//_fa.right="10px";
//_fa.top="5px";
//_fa.display="inline";
//_fa.width="50px";
//fa.height="25px";
//_fb.href="http://www.wmd-editor.com/";
//_fb.target="_blank";
//_fb.title="WMD: The Wysiwym Markdown Editor";
//var _fc=_6.createImage("images/wmd.png");
//var _fd=_6.createImage("images/wmd-on.png");
//_fb.appendChild(_fc);
//_fb.onmouseover=function(){
//_6.setImage(_fc,"images/wmd-on.png");
//_fb.style.cursor="pointer";
//};
//_fb.onmouseout=function(){
//_6.setImage(_fc,"images/wmd.png");
//};
//_b8.appendChild(_fb);
};
var _e1=function(){
if(!_6.elementOk(_b0)){
_b8.style.display="none";
return;
}
if(_b8.style.display=="none"){
_b8.style.display="block";
}
var _fe=_7.getWidth(_b0);
var _ff=_7.getHeight(_b0);
var _100=_7.getLeft(_b0);
if(_b8.style.width==_fe+"px"&&_b5==_ff&&_b6==_100){
if(_7.getTop(_b8)<_7.getTop(_b0)){
return;
}
}
_b5=_ff;
_b6=_100;
var _101=100;
_b8.style.width=Math.max(_fe,_101)+"px";
var root=_b8.offsetParent;
var _103=_7.getHeight(_b9);
var _104=_103-_b2+"px";
_b8.style.height=_104;
if(_6.fillers){
_6.fillers[0].style.height=_6.fillers[1].style.height=_104;
}
var _105=3;
_b0.style.marginTop=_103+_105+_b4+"px";
var _106=_7.getTop(_b0);
var _100=_7.getLeft(_b0);
_7.setTop(root,_106-_103-_105);
_7.setLeft(root,_100);
_b8.style.opacity=_b8.style.opacity||0.999;
return;
};
this.undo=function(){
if(_bd){
_bd.undo();
}
};
this.redo=function(){
if(_bd){
_bd.redo();
}
};
var init=function(){
_e5();
};
this.destroy=function(){
if(_bd){
_bd.destroy();
}
if(_ba.parentNode){
_ba.parentNode.removeChild(_ba);
}
if(_b0){
_b0.style.marginTop="";
}
_1.clearInterval(_bb);
_1.clearInterval(_bc);
};
init();
};
_2.textareaState=function(_108){
var _109=this;
var _10a=function(_10b){
if(_6.getStyle(_108,"display")=="none"){
return;
}
var _10c=_5.userAgent.indexOf("Opera")!=-1;
if(_10b.selectionStart!=undefined&&!_10c){
_10b.focus();
_10b.selectionStart=_109.start;
_10b.selectionEnd=_109.end;
_10b.scrollTop=_109.scrollTop;
}else{
if(_3.selection){
if(_3.activeElement&&_3.activeElement!=_108){
return;
}
_10b.focus();
var _10d=_10b.createTextRange();
_10d.moveStart("character",-_10b.value.length);
_10d.moveEnd("character",-_10b.value.length);
_10d.moveEnd("character",_109.end);
_10d.moveStart("character",_109.start);
_10d.select();
}
}
};
this.init=function(_10e){
if(_10e){
_108=_10e;
}
if(_6.getStyle(_108,"display")=="none"){
return;
}
_10f(_108);
_109.scrollTop=_108.scrollTop;
if(!_109.text&&_108.selectionStart||_108.selectionStart=="0"){
_109.text=_108.value;
}
};
var _110=function(_111){
_111=_111.replace(/\r\n/g,"\n");
_111=_111.replace(/\r/g,"\n");
return _111;
};
var _10f=function(){
if(_108.selectionStart||_108.selectionStart=="0"){
_109.start=_108.selectionStart;
_109.end=_108.selectionEnd;
}else{
if(_3.selection){
_109.text=_110(_108.value);
var _112=_3.selection.createRange();
var _113=_110(_112.text);
var _114="\x07";
var _115=_114+_113+_114;
_112.text=_115;
var _116=_110(_108.value);
_112.moveStart("character",-_115.length);
_112.text=_113;
_109.start=_116.indexOf(_114);
_109.end=_116.lastIndexOf(_114)-_114.length;
var _117=_109.text.length-_110(_108.value).length;
if(_117){
_112.moveStart("character",-_113.length);
while(_117--){
_113+="\n";
_109.end+=1;
}
_112.text=_113;
}
_10a(_108);
}
}
return _109;
};
this.restore=function(_118){
if(!_118){
_118=_108;
}
if(_109.text!=undefined&&_109.text!=_118.value){
_118.value=_109.text;
}
_10a(_118,_109);
_118.scrollTop=_109.scrollTop;
};
this.getChunks=function(){
var _119=new _2.Chunks();
_119.before=_110(_109.text.substring(0,_109.start));
_119.startTag="";
_119.selection=_110(_109.text.substring(_109.start,_109.end));
_119.endTag="";
_119.after=_110(_109.text.substring(_109.end));
_119.scrollTop=_109.scrollTop;
return _119;
};
this.setChunks=function(_11a){
_11a.before=_11a.before+_11a.startTag;
_11a.after=_11a.endTag+_11a.after;
var _11b=_5.userAgent.indexOf("Opera")!=-1;
if(_11b){
_11a.before=_11a.before.replace(/\n/g,"\r\n");
_11a.selection=_11a.selection.replace(/\n/g,"\r\n");
_11a.after=_11a.after.replace(/\n/g,"\r\n");
}
_109.start=_11a.before.length;
_109.end=_11a.before.length+_11a.selection.length;
_109.text=_11a.before+_11a.selection+_11a.after;
_109.scrollTop=_11a.scrollTop;
};
this.init();
};
_2.Chunks=function(){
};
_2.Chunks.prototype.findTags=function(_11c,_11d){
var _11e,_11f;
var _120=this;
if(_11c){
_11f=_6.regexToString(_11c);
_11e=new _4(_11f.expression+"$",_11f.flags);
this.before=this.before.replace(_11e,function(_121){
_120.startTag=_120.startTag+_121;
return "";
});
_11e=new _4("^"+_11f.expression,_11f.flags);
this.selection=this.selection.replace(_11e,function(_122){
_120.startTag=_120.startTag+_122;
return "";
});
}
if(_11d){
_11f=_6.regexToString(_11d);
_11e=new _4(_11f.expression+"$",_11f.flags);
this.selection=this.selection.replace(_11e,function(_123){
_120.endTag=_123+_120.endTag;
return "";
});
_11e=new _4("^"+_11f.expression,_11f.flags);
this.after=this.after.replace(_11e,function(_124){
_120.endTag=_124+_120.endTag;
return "";
});
}
};
_2.Chunks.prototype.trimWhitespace=function(_125){
this.selection=this.selection.replace(/^(\s*)/,"");
if(!_125){
this.before+=_4.$1;
}
this.selection=this.selection.replace(/(\s*)$/,"");
if(!_125){
this.after=_4.$1+this.after;
}
};
_2.Chunks.prototype.skipLines=function(_126,_127,_128){
if(_126==undefined){
_126=1;
}
if(_127==undefined){
_127=1;
}
_126++;
_127++;
var _129,_12a;
this.selection=this.selection.replace(/(^\n*)/,"");
this.startTag=this.startTag+_4.$1;
this.selection=this.selection.replace(/(\n*$)/,"");
this.endTag=this.endTag+_4.$1;
this.startTag=this.startTag.replace(/(^\n*)/,"");
this.before=this.before+_4.$1;
this.endTag=this.endTag.replace(/(\n*$)/,"");
this.after=this.after+_4.$1;
if(this.before){
_129=_12a="";
while(_126--){
_129+="\\n?";
_12a+="\n";
}
if(_128){
_129="\\n*";
}
this.before=this.before.replace(new _4(_129+"$",""),_12a);
}
if(this.after){
_129=_12a="";
while(_127--){
_129+="\\n?";
_12a+="\n";
}
if(_128){
_129="\\n*";
}
this.after=this.after.replace(new _4(_129,""),_12a);
}
};
_8.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)";
_8.unwrap=function(_12b){
var _12c=new _4("([^\\n])\\n(?!(\\n|"+_8.prefixes+"))","g");
_12b.selection=_12b.selection.replace(_12c,"$1 $2");
};
_8.wrap=function(_12d,len){
_8.unwrap(_12d);
var _12f=new _4("(.{1,"+len+"})( +|$\\n?)","gm");
_12d.selection=_12d.selection.replace(_12f,function(_130,line){
if(new _4("^"+_8.prefixes,"").test(_130)){
return _130;
}
return line+"\n";
});
_12d.selection=_12d.selection.replace(/\s+$/,"");
};
_8.doBold=function(_132){
return _8.doBorI(_132,2,"strong text");
};
_8.doItalic=function(_133){
return _8.doBorI(_133,1,"emphasized text");
};
_8.doBorI=function(_134,_135,_136){
_134.trimWhitespace();
_134.selection=_134.selection.replace(/\n{2,}/g,"\n");
_134.before.search(/(\**$)/);
var _137=_4.$1;
_134.after.search(/(^\**)/);
var _138=_4.$1;
var _139=Math.min(_137.length,_138.length);
if((_139>=_135)&&(_139!=2||_135!=1)){
_134.before=_134.before.replace(_4("[*]{"+_135+"}$",""),"");
_134.after=_134.after.replace(_4("^[*]{"+_135+"}",""),"");
return;
}
if(!_134.selection&&_138){
_134.after=_134.after.replace(/^([*_]*)/,"");
_134.before=_134.before.replace(/(\s?)$/,"");
var _13a=_4.$1;
_134.before=_134.before+_138+_13a;
return;
}
if(!_134.selection&&!_138){
_134.selection=_136;
}
var _13b=_135<=1?"*":"**";
_134.before=_134.before+_13b;
_134.after=_13b+_134.after;
};
_8.stripLinkDefs=function(_13c,_13d){
_13c=_13c.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(_13e,id,_140,_141,_142){
_13d[id]=_13e.replace(/\s*$/,"");
if(_141){
_13d[id]=_13e.replace(/["(](.+?)[")]$/,"");
return _141+_142;
}
return "";
});
return _13c;
};
_8.addLinkDef=function(_143,_144){
var _145=0;
var _146={};
_143.before=_8.stripLinkDefs(_143.before,_146);
_143.selection=_8.stripLinkDefs(_143.selection,_146);
_143.after=_8.stripLinkDefs(_143.after,_146);
var _147="";
var _148=/(\[(?:\[[^\]]*\]|[^\[\]])*\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g;
var _149=function(def){
_145++;
def=def.replace(/^[ ]{0,3}\[(\d+)\]:/,"  ["+_145+"]:");
_147+="\n"+def;
};
var _14b=function(_14c,_14d,id,end){
if(_146[id]){
_149(_146[id]);
return _14d+_145+end;
}
return _14c;
};
_143.before=_143.before.replace(_148,_14b);
if(_144){
_149(_144);
}else{
_143.selection=_143.selection.replace(_148,_14b);
}
var _150=_145;
_143.after=_143.after.replace(_148,_14b);
if(_143.after){
_143.after=_143.after.replace(/\n*$/,"");
}
if(!_143.after){
_143.selection=_143.selection.replace(/\n*$/,"");
}
_143.after+="\n\n"+_147;
return _150;
};
_8.doLinkOrImage=function(_151,_152,_153){
_151.trimWhitespace();
_151.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\[.*?\])?/);
if(_151.endTag.length>1){
_151.startTag=_151.startTag.replace(/!?\[/,"");
_151.endTag="";
_8.addLinkDef(_151,null);
}else{
if(/\n\n/.test(_151.selection)){
_8.addLinkDef(_151,null);
return;
}
var _154;
var _155=function(_156){
if(_156!=null){
_151.startTag=_151.endTag="";
var _157=" [999]: "+_156;
var num=_8.addLinkDef(_151,_157);
_151.startTag=_152?"![":"[";
_151.endTag="]["+num+"]";
if(!_151.selection){
if(_152){
_151.selection="alt text";
}else{
_151.selection="link text";
}
}
}
_153();
};
if(_152){
_154=_6.prompt("<p style='margin-top: 0px'><b>Enter the image URL.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/images/cloud1.jpg   \"Optional title\"</p>","http://",_155);
}else{
_154=_6.prompt("<p style='margin-top: 0px'><b>Enter the web address.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/   \"Optional title\"</p>","http://",_155);
}
return true;
}
};
_8.bold={};
_8.bold.description="Strong <strong>";
_8.bold.image="images/bold.png";
_8.bold.key="b";
_8.bold.textOp=_8.doBold;
_8.italic={};
_8.italic.description="Emphasis <em>";
_8.italic.image="images/italic.png";
_8.italic.key="i";
_8.italic.textOp=_8.doItalic;
_8.link={};
_8.link.description="Hyperlink <a>";
_8.link.image="images/link.png";
_8.link.key="l";
_8.link.textOp=function(_159,_15a){
return _8.doLinkOrImage(_159,false,_15a);
};
_8.undo={};
_8.undo.description="Undo";
_8.undo.image="images/undo.png";
_8.undo.execute=function(_15b){
_15b.undo();
};
_8.redo={};
_8.redo.description="Redo";
_8.redo.image="images/redo.png";
_8.redo.execute=function(_15c){
_15c.redo();
};
_6.findPanes=function(_15d){
_15d.preview=_15d.preview||_6.getElementsByClass("wmd-preview",null,"div")[0];
_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"textarea")[0];
_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"div")[0];
if(!_15d.input){
var _15e=-1;
var _15f=_3.getElementsByTagName("textarea");
for(var _160=0;_160<_15f.length;_160++){
var _161=_15f[_160];
if(_161!=_15d.output&&!/wmd-ignore/.test(_161.className.toLowerCase())){
_15d.input=_161;
break;
}
}
}
return _15d;
};
_6.makeAPI=function(){
_2.wmd={};
_2.wmd.editor=_2.editor;
_2.wmd.previewManager=_2.previewManager;
};
_6.startEditor=function(){
if(_2.wmd_env.autostart==false){
_2.editorInit();
_6.makeAPI();
return;
}
var _162={};
var _163,_164;
var _165=function(){
try{
var _166=_6.cloneObject(_162);
_6.findPanes(_162);
if(!_6.objectsEqual(_166,_162)&&_162.input){
if(!_163){
_2.editorInit();
var _167;
if(_2.previewManager!=undefined){
_164=new _2.previewManager(_162);
_167=_164.refresh;
}
_163=new _2.editor(_162.input,_167);
}else{
if(_164){
_164.refresh(true);
}
}
}
}
catch(e){
}
};
_6.addEvent(_1,"load",_165);
var _168=_1.setInterval(_165,100);
};
_2.previewManager=function(_169){
var _16a=this;
var _16b,_16c;
var _16d,_16e;
var _16f,_170;
var _171=3000;
var _172="delayed";
var _173=function(_174,_175){
_6.addEvent(_174,"input",_175);
_174.onpaste=_175;
_174.ondrop=_175;
_6.addEvent(_1,"keypress",_175);
_6.addEvent(_174,"keypress",_175);
_6.addEvent(_174,"keydown",_175);
_16c=new _2.inputPoller(_174,_175);
};
var _176=function(){
var _177=0;
if(_1.innerHeight){
_177=_1.pageYOffset;
}else{
if(_3.documentElement&&_3.documentElement.scrollTop){
_177=_3.documentElement.scrollTop;
}else{
if(_3.body){
_177=_3.body.scrollTop;
}
}
}
return _177;
};
var _178=function(){
if(!_169.preview&&!_169.output){
return;
}
var text=_169.input.value;
if(text&&text==_16f){
return;
}else{
_16f=text;
}
var _17a=new Date().getTime();
if(!_16b&&_2.showdown){
_16b=new _2.showdown.converter();
}
text=_6.escapeUnderscores(text);
if(_16b){
text=_16b.makeHtml(text);
}
var _17b=new Date().getTime();
_16e=_17b-_17a;
_17c(text);
_170=text;
};
var _17d=function(){
if(_16d){
_1.clearTimeout(_16d);
_16d=undefined;
}
if(_172!="manual"){
var _17e=0;
if(_172=="delayed"){
_17e=_16e;
}
if(_17e>_171){
_17e=_171;
}
_16d=_1.setTimeout(_178,_17e);
}
};
var _17f;
var _180;
var _181=function(_182){
if(_182.scrollHeight<=_182.clientHeight){
return 1;
}
return _182.scrollTop/(_182.scrollHeight-_182.clientHeight);
};
var _183=function(_184,_185){
_184.scrollTop=(_184.scrollHeight-_184.clientHeight)*_185;
};
var _186=function(){
if(_169.preview){
_17f=_181(_169.preview);
}
if(_169.output){
_180=_181(_169.output);
}
};
var _187=function(){
if(_169.preview){
_169.preview.scrollTop=_169.preview.scrollTop;
_183(_169.preview,_17f);
}
if(_169.output){
_183(_169.output,_180);
}
};
this.refresh=function(_188){
if(_188){
_16f="";
_178();
}else{
_17d();
}
};
this.processingTime=function(){
return _16e;
};
this.output=function(){
return _170;
};
this.setUpdateMode=function(_189){
_172=_189;
_16a.refresh();
};
var _18a=true;
var _17c=function(text){
_186();
var _18c=_7.getTop(_169.input)-_176();
if(_169.output){
if(_169.output.value!=undefined){
_169.output.value=text;
_169.output.readOnly=true;
}else{
var _18d=text.replace(/&/g,"&amp;");
_18d=_18d.replace(/</g,"&lt;");
_169.output.innerHTML="<pre><code>"+_18d+"</code></pre>";
}
}
if(_169.preview){
_169.preview.innerHTML=text;
}
_187();
if(_18a){
_18a=false;
return;
}
var _18e=_7.getTop(_169.input)-_176();
if(_5.userAgent.indexOf("MSIE")!=-1){
_1.setTimeout(function(){
_1.scrollBy(0,_18e-_18c);
},0);
}else{
_1.scrollBy(0,_18e-_18c);
}
};
var init=function(){
_173(_169.input,_17d);
_178();
if(_169.preview){
_169.preview.scrollTop=0;
}
if(_169.output){
_169.output.scrollTop=0;
}
};
this.destroy=function(){
if(_16c){
_16c.destroy();
}
};
init();
};
};
if(Attacklab.fileLoaded){
Attacklab.fileLoaded("wmd-base.js");
}
var Attacklab=Attacklab||{};
Attacklab.wmdPlus=function(){
this.symboltable;
var _1=top;
var _2=_1["Attacklab"];
var _3=_1["document"];
var _4=_1["RegExp"];
var _5=_1["navigator"];
var _6=_2.Util;
var _7=_2.Position;
var _8=_2.Command;
_8.doAutoindent=function(_9){
_9.before=_9.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n");
_9.before=_9.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n");
_9.before=_9.before.replace(/(\n|^)[ \t]+\n$/,"\n\n");
if(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(_9.before)){
if(_8.doList){
_8.doList(_9);
}
}
if(/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(_9.before)){
if(_8.doBlockquote){
_8.doBlockquote(_9);
}
}
if(/(\n|^)(\t|[ ]{4,}).*\n$/.test(_9.before)){
if(_8.doCode){
_8.doCode(_9);
}
}
};
_8.doBlockquote=function(_a){
_a.selection=_a.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(_b,_c,_d,_e){
_a.before+=_c;
_a.after=_e+_a.after;
return _d;
});
_a.before=_a.before.replace(/(>[ \t]*)$/,function(_f,_10){
_a.selection=_10+_a.selection;
return "";
});
_a.selection=_a.selection.replace(/^(\s|>)+$/,"");
_a.selection=_a.selection||"Blockquote";
if(_a.before){
_a.before=_a.before.replace(/\n?$/,"\n");
}
if(_a.after){
_a.after=_a.after.replace(/^\n?/,"\n");
}
_a.before=_a.before.replace(/(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*$)/,function(_11){
_a.startTag=_11;
return "";
});
_a.after=_a.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(_12){
_a.endTag=_12;
return "";
});
var _13=function(_14){
var _15=_14?"> ":"";
if(_a.startTag){
_a.startTag=_a.startTag.replace(/\n((>|\s)*)\n$/,function(_16,_17){
return "\n"+_17.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n";
});
}
if(_a.endTag){
_a.endTag=_a.endTag.replace(/^\n((>|\s)*)\n/,function(_18,_19){
return "\n"+_19.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n";
});
}
};
if(/^(?![ ]{0,3}>)/m.test(_a.selection)){
_8.wrap(_a,_2.wmd_env.lineLength-2);
_a.selection=_a.selection.replace(/^/gm,"> ");
_13(true);
_a.skipLines();
}else{
_a.selection=_a.selection.replace(/^[ ]{0,3}> ?/gm,"");
_8.unwrap(_a);
_13(false);
if(!/^(\n|^)[ ]{0,3}>/.test(_a.selection)){
if(_a.startTag){
_a.startTag=_a.startTag.replace(/\n{0,2}$/,"\n\n");
}
}
if(!/(\n|^)[ ]{0,3}>.*$/.test(_a.selection)){
if(_a.endTag){
_a.endTag=_a.endTag.replace(/^\n{0,2}/,"\n\n");
}
}
}
if(!/\n/.test(_a.selection)){
_a.selection=_a.selection.replace(/^(> *)/,function(_1a,_1b){
_a.startTag+=_1b;
return "";
});
}
};
_8.doCode=function(_1c){
var _1d=/\S[ ]*$/.test(_1c.before);
var _1e=/^[ ]*\S/.test(_1c.after);
if((!_1e&&!_1d)||/\n/.test(_1c.selection)){
_1c.before=_1c.before.replace(/[ ]{4}$/,function(_1f){
_1c.selection=_1f+_1c.selection;
return "";
});
var _20=1;
var _21=1;
if(/\n(\t|[ ]{4,}).*\n$/.test(_1c.before)){
_20=0;
}
if(/^\n(\t|[ ]{4,})/.test(_1c.after)){
_21=0;
}
_1c.skipLines(_20,_21);
if(!_1c.selection){
_1c.startTag="    ";
_1c.selection="print(\"code sample\");";
return;
}
if(/^[ ]{0,3}\S/m.test(_1c.selection)){
_1c.selection=_1c.selection.replace(/^/gm,"    ");
}else{
_1c.selection=_1c.selection.replace(/^[ ]{4}/gm,"");
}
}else{
_1c.trimWhitespace();
_1c.findTags(/`/,/`/);
if(!_1c.startTag&&!_1c.endTag){
_1c.startTag=_1c.endTag="`";
if(!_1c.selection){
_1c.selection="print(\"code sample\");";
}
}else{
if(_1c.endTag&&!_1c.startTag){
_1c.before+=_1c.endTag;
_1c.endTag="";
}else{
_1c.startTag=_1c.endTag="";
}
}
}
};
_8.autoindent={};
_8.autoindent.textOp=_8.doAutoindent;
_8.blockquote={};
_8.blockquote.description="Blockquote <blockquote>";
_8.blockquote.image="images/blockquote.png";
_8.blockquote.key=".";
_8.blockquote.keyCode=190;
_8.blockquote.textOp=function(_22){
return _8.doBlockquote(_22);
};
_8.code={};
_8.code.description="Code Sample <pre><code>";
_8.code.image="images/code.png";
_8.code.key="k";
_8.code.textOp=_8.doCode;
_8.img={};
_8.img.description="Image <img>";
_8.img.image="images/img.png";
_8.img.key="g";
_8.img.textOp=function(_23,_24){
return _8.doLinkOrImage(_23,true,_24);
};
_8.doList=function(_25,_26){
var _27=/(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/;
var _28="";
var _29=1;
var _2a=function(){
if(_26){
var _2b=" "+_29+". ";
_29++;
return _2b;
}
var _2c=_28||"-";
return "  "+_2c+" ";
};
var _2d=function(_2e){
if(_26==undefined){
_26=/^\s*\d/.test(_2e);
}
_2e=_2e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(_2f){
return _2a();
});
return _2e;
};
var _30=function(){
_31=_6.regexToString(_27);
_31.expression="^\n*"+_31.expression;
var _32=_6.stringToRegex(_31);
_25.after=_25.after.replace(_32,_2d);
};
_25.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null);
var _33=/^\n/;
if(_25.before&&!/\n$/.test(_25.before)&&!_33.test(_25.startTag)){
_25.before+=_25.startTag;
_25.startTag="";
}
if(_25.startTag){
var _34=/\d+[.]/.test(_25.startTag);
_25.startTag="";
_25.selection=_25.selection.replace(/\n[ ]{4}/g,"\n");
_8.unwrap(_25);
_25.skipLines();
if(_34){
_30();
}
if(_26==_34){
return;
}
}
var _35=1;
var _31=_6.regexToString(_27);
_31.expression="(\\n|^)"+_31.expression+"$";
var _36=_6.stringToRegex(_31);
_25.before=_25.before.replace(_36,function(_37){
if(/^\s*([*+-])/.test(_37)){
_28=_4.$1;
}
_35=/[^\n]\n\n[^\n]/.test(_37)?1:0;
return _2d(_37);
});
if(!_25.selection){
_25.selection="List item";
}
var _38=_2a();
var _39=1;
_31=_6.regexToString(_27);
_31.expression="^\n*"+_31.expression;
_36=_6.stringToRegex(_31);
_25.after=_25.after.replace(_36,function(_3a){
_39=/[^\n]\n\n[^\n]/.test(_3a)?1:0;
return _2d(_3a);
});
_25.trimWhitespace(true);
_25.skipLines(_35,_39,true);
_25.startTag=_38;
var _3b=_38.replace(/./g," ");
_8.wrap(_25,_2.wmd_env.lineLength-_3b.length);
_25.selection=_25.selection.replace(/\n/g,"\n"+_3b);
};
_8.doHeading=function(_3c){
_3c.selection=_3c.selection.replace(/\s+/g," ");
_3c.selection=_3c.selection.replace(/(^\s+|\s+$)/g,"");
var _3d=0;
_3c.findTags(/#+[ ]*/,/[ ]*#+/);
if(/#+/.test(_3c.startTag)){
_3d=_4.lastMatch.length;
}
_3c.startTag=_3c.endTag="";
_3c.findTags(null,/\s?(-+|=+)/);
if(/=+/.test(_3c.endTag)){
_3d=1;
}
if(/-+/.test(_3c.endTag)){
_3d=2;
}
_3c.startTag=_3c.endTag="";
_3c.skipLines(1,1);
if(!_3c.selection){
_3c.startTag="## ";
_3c.selection="Heading";
_3c.endTag=" ##";
return;
}
var _3e=_3d==0?2:_3d-1;
if(_3e){
var _3f=_3e>=2?"-":"=";
var _40=_3c.selection.length;
if(_40>_2.wmd_env.lineLength){
_40=_2.wmd_env.lineLength;
}
_3c.endTag="\n";
while(_40--){
_3c.endTag+=_3f;
}
}
};
_8.ol={};
_8.ol.description="Numbered List <ol>";
_8.ol.image="images/ol.png";
_8.ol.key="m";
_8.ol.textOp=function(_41){
_8.doList(_41,true);
};
_8.ul={};
_8.ul.description="Bulleted List <ul>";
_8.ul.image="images/ul.png";
_8.ul.key="d";
_8.ul.textOp=function(_42){
_8.doList(_42,false);
};
_8.h1={};
_8.h1.description="Heading <h1>/<h2>";
_8.h1.image="images/h1.png";
_8.h1.key="h";
_8.h1.textOp=_8.doHeading;
_8.hr={};
_8.hr.description="Horizontal Rule <hr>";
_8.hr.image="images/hr.png";
_8.hr.key="r";
_8.hr.textOp=function(_43){
_43.startTag="----------\n";
_43.selection="";
_43.skipLines(2,1,true);
};
};
if(Attacklab.fileLoaded){
Attacklab.fileLoaded("wmd-plus.js");
}
Event.observe(window,"load",init);anchorScroll= function(e){if(e.element().match('a') && e.element().getAttribute('href').match(/#.+/)){var aID=e.element().getAttribute('href').replace(/.*#/, "");if($(aID)){new Effect.ScrollTo($(aID),{offset:-1*(parseInt($("dropshadow").getHeight())+20),duration:0.1,queue:"end"});e.stop();}}};var instances=[];var checkRate=5;function init(e){if(!Element.hasClassName(document.body, 'editing')){return true;};document.draftyURI=String(window.location).replace(/[?#].*/,"");Event.observe(window, "click",anchorScroll);if($("create")){Event.observe("create","click",prependBlock);}if($("banner")){Event.observe("banner","mouseover",function(e){e.stop();});}Event.observe(document,"keydown",fireAccess);$$(".edit").each(initBlock);if($$(".edit").size()){$$(".edit").first().addClassName("accessFocus");}$("createTop").addClassName("accessFocus");var _2=jar.get("lastScroll");if(_2){if($(_2)){new Effect.ScrollTo($(_2),{offset:-1*(parseInt($("dropshadow").getHeight()*2)+20),duration:0.1,queue:"end"});}}jar.remove("lastScroll");document.blockUpdater=new PeriodicalExecuter(periodicalCheckBlocks,checkRate);checkBlocks();Ajax.checkBlockCount=0;Ajax.Responders.register({onComplete:function(_3,_4,_5){if(_5){if(_5.error){bannerError(_5.error);}else{if(_5.message){bannerMessage(_5.message);}}}}});$('bannerlog').days = $('days').getValue();Event.observe("biglog","click",togglelog);Event.observe("smalllog","click",togglelog);Event.observe("entry","keyup",checkEntry);checkEntry(e);Event.observe("dayForm","submit",updateDays);Event.observe("sayForm","submit",newLogEntry);if(String(window.location).match(/#.+/)) {var aID = String(window.location).replace(/.*#/, "");if($(aID)) { new Effect.ScrollTo($(aID),{offset:-1*(parseInt($("dropshadow").getHeight()*2)+20),duration:0.1,queue:"end"});}};}function togglelog(e){e.stop();$('bannerlog').toggle();$('lastlog').toggle();if($('bannerlog').visible()) {$("entry").focus();bigLog();}}function bigLog(){if($('bannerlog').visible()){new Ajax.Updater({success:"entries"},document.draftyURI+"/log?just=1&days="+$('bannerlog').days,{method:"get",on404:function(_l1f){bannerError("Document not found.");},onFailure:function(_l20){bannerError("Network connection lost.");},onSuccess:function(_l21){if($("alsoon")&&_l21.headerJSON){$("alsoon").update(_l21.headerJSON);}}});}}function updateDays(e){e.stop();$('bannerlog').days = $('days').getValue();bigLog();new Effect.Pulsate($('entries'),{duration:1,pulses:1,from:0.5,queue:"end"});}function newLogEntry(e) {e.stop();new Ajax.Request(document.draftyURI+"/log?just=1&days="+$('bannerlog').days,{method:"post",parameters:$("sayForm").serialize(true)});
$("entry").value = '';checkEntry();bigLog();}function checkEntry(e){$("entryChars").update($F("entry").length+"/150 characters");}
fireAccess=function(e){if(e.ctrlKey){var _7;switch(e.keyCode){case 89:_7="duplicate";break;case 69:_7="edit";break;case 78:_7="append";break;case 83:_7="save";break;case 87:saveScroll(e);return true;default:return true;}e.cancelBubble=true;e.returnValue=false;if(e.preventDefault){e.preventDefault();}block=$$(".edit.accessFocus").first();if(block&&block.id){if($(_7+block.id)&&!$(_7+block.id).disabled){$(_7+block.id).fire("access:click");}}}};saveScroll=function(e){e.stop();var _9=$$(".edit.accessFocus").first();if(_9&&_9.id){jar.put("lastScroll",_9.id);}window.location=String(window.location).replace(/\?.*/,"");};periodicalCheckBlocks=function(){Ajax.checkBlockCount++;if(Ajax.checkBlockCount>1){return false;}checkBlocks();};checkBlocks=function(){Ajax.checkBlockCount++;new Ajax.Request(document.draftyURI+"/json",{method:"get",on404:function(_a){bannerError("Document not found.");Ajax.checkBlockCount=0;},onFailure:function(_b){bannerError("Network connection lost.");},onSuccess:function(_c){var _d=_c.responseJSON;document.lastBlockState=_d.blocks;var _e=$$(".edit");var _f=_e.first();var _10=_e.last();if(document.stickyBlock&&_10&&_10.id){_10.insert({after:"<div id=\"stickyfix\" class=\"edit\" style=\"display: none;\"></div>"});_d.blocks.stickyfix="stickyfix";_d.order.push("stickyfix");_e=$$(".edit");}_e.each(function(_11){if(!_d.blocks[_11.id]){if(document.stickyBlock){var _12=Position.page(document.stickyBlock)[1];}_11.removeClassName("edit");$$(".accessFocus").each(function(_13){_13.removeClassName("accessFocus");});if(_11.editor){_11.previewManager.destroy();_11.editor.destroy();_11.editor=null;}_11.update(_11.innerHTML);new Effect.DropOut(_11,{duration:0.8,queue:"end",afterFinish:function(_14){if(document.stickyBlock&&document.stickyBlock==_11){document.stickyBlock=null;_11.remove();}if(document.stickyBlock){var _15=_12-Position.page(document.stickyBlock)[1];if(_15!=0){window.scrollBy(0,0-parseInt(_15));}}if(!$$(".edit").size()){$("createTop").addClassName("accessFocus");$("create").disabled=null;}}});}});var _16=$("add");if(!_d.size&&!_d.blocks.size){for(var i=0;i<_d.order.length;i++){var _18=String(_d.order[i]);if(!$(_18)){if(document.stickyBlock){var _19=Position.page(document.stickyBlock)[1];}_16.insert({after:"<div id=\""+_18+"\" class=\"edit\" style=\"display: none;\"></div>"});$(_18).timestamp=0;$(_18).editingName=null;if(document.stickyBlock){var _1a=_19-Position.page(document.stickyBlock)[1];if(_1a!=0){window.scrollBy(0,0-parseInt(_1a));}}}else{if(_16.next(".edit")!=$(_18)){if(document.stickyBlock){var _1b=Position.page(document.stickyBlock)[1];}if(!document.stickyBlock||document.stickyBlock.id!=$(_18).id){$(_16.next(".edit")).insert({before:$(_18)});new Effect.Parallel([new Effect.Pulsate($(_18),{sync:true,pulses:1,from:0.5}),new Effect.Pulsate($(_18).next(".edit"),{sync:true,pulses:1,from:0.5})],{duration:0.5,queue:"end"});}if(document.stickyBlock){var _1c=_1b-Position.page(document.stickyBlock)[1];if(_1c!=0){window.scrollBy(0,0-parseInt(_1c));}}}}_16=$(_18);}}if($("stickyfix")){$("stickyfix").remove().removeClassName("edit");}var _1d=$$(".edit");if(_1d.size()){newTop=_1d.first();newBottom=_1d.last();if($("moveUp"+newTop.id)){$("moveUp"+newTop.id).addClassName('noMove');}if($("moveDown"+newBottom.id)){$("moveDown"+newBottom.id).addClassName('noMove');}if(_f&&_f.id&&newTop.id&&$("moveUp"+_f.id)&&newTop.id!=_f.id){$("moveUp"+_f.id).removeClassName('noMove');}if(_10&&_10.id&&newBottom.id&&$("moveDown"+_10.id)&&newBottom.id!=_10.id){$("moveDown"+_10.id).removeClassName('noMove');}_1d.each(checkBlock);}if(!$$(".edit").size()){$("createTop").addClassName("accessFocus");}$$(".blockForm").each(function(_1e){_1e.disabled=null;});Ajax.checkBlockCount=0;window.scrollBy(0,0);new Ajax.Updater({success:"lastlog"},document.draftyURI+"/lastlog",{method:"get",on404:function(_1f){bannerError("Document not found.");},onFailure:function(_20){bannerError("Network connection lost.");},onSuccess:function(_21){if($("alsoon")&&_21.headerJSON){$("alsoon").update(_21.headerJSON);}},onComplete:function(_l10){Event.observe("smalllog","click",togglelog);}});bigLog();}});};checkBlock=function(_22){var _23=document.lastBlockState[_22.id];var _24;if(!_22.timestamp){_24=true;_22.timestamp=document.timestamp;}if(!$("source"+_22.id)&&_22.id&&(_22.timestamp<_23.timestamp||_22.editingName!=_23.editingName)){_22.timestamp=_23.timestamp;_22.editingName=_23.editingName;var _25=document.draftyURI+"?just="+_22.id;if($("version"+_22.id)){_25=_25+"&blockId="+_22.id+"&version="+$("version"+_22.id).getValue();}else{if(_24){_25=_25+"&blockId="+_22.id;}}new Ajax.Request(_25,{method:"get",onSuccess:function(_26){if(document.stickyBlock){var _27=Position.page(document.stickyBlock)[1];}if(_22.editor){_22.previewManager.destroy();_22.editor.destroy();_22.editor=null;}if(!$("source"+_22.id)||_22.editingName!=_23.editingName){_22.update(_26.responseText);if(_26.responseText.length>1){if(!_22.visible()){_22.setOpacity(0);_22.show();new Effect.Opacity(_22,{duration:0.5,from:0,to:1,queue:"end"});swapAccessKeys(_22.id);if($("source"+_22.id)){$("source"+_22.id).focus();if($("source"+_22.id).createTextRange){var _28=$("source"+_22.id).createTextRange();_28.collapse(false);_28.select();}else{if($("source"+_22.id).setSelectionRange){var _29=$F("source"+_22.id).length;$("source"+_22.id).setSelectionRange(_29,_29);}}if($("source"+_22.id).scrollTop>0){window.scrollBy(0,$("source"+_22.id).getHeight());}document.stickyBlock=null;}}else{if(!_22.noHighlight){new Effect.Pulsate(_22,{duration:1,pulses:1,from:0.5,queue:"end"});}else{swapAccessKeys(_22.id);}}_22.noHighlight=null;}if(document.stickyBlock){var _2a=_27-Position.page(document.stickyBlock)[1];if(_2a!=0){window.scrollBy(0,0-parseInt(_2a));}}}observeBlock(_22);}});}else{observeBlock(_22);if($("source"+_22.id)){if(_22.lastsource!=$F("source"+_22.id)){new Ajax.Request(document.draftyURI+"?draft=1&just="+_22.id,{method:"post",parameters:Form.serializeElements($("form"+_22.id).getInputs("hidden").concat([$("source"+_22.id)]),true)});}_22.lastsource=$F("source"+_22.id);}}_22.setOpacity(1);_22.setStyle({top:0});window.scrollBy(0,0);};accessKeyEvent=function(e){var _2c=Event.element(e);if(!_2c.hasClassName("edit")){_2c=_2c.up(".edit");}if(_2c){swapAccessKeys(_2c.id);}};swapAccessKeys=function(_2d){if(!$(_2d).hasClassName("accessFocus")){$$(".accessFocus").each(function(_2e){_2e.removeClassName("accessFocus");});$(_2d).addClassName("accessFocus");var _2f=$(_2d).previous(".edit");if(!_2f){_2f=$("add");}_2f=_2f.down(".createBlock");if(_2f){_2f.addClassName("accessFocus");}}};observeBlock=function(_30){_30.makePositioned();Event.observe(_30.id,"mouseover",accessKeyEvent);Event.observe(_30.id,"keyup",accessKeyEvent);if($("source"+_30.id)){Event.observe("source"+_30.id,"focus",stickyBlock);Event.observe("save"+_30.id,"click",saveBlock);Event.observe("save"+_30.id,"access:click",saveBlock);Event.observe("cancel"+_30.id,"click",cancelBlock);Event.observe("cancel"+_30.id,"access:click",cancelBlock);if(!_30.editor){_30.panes={input:$("source"+_30.id),preview:$("preview"+_30.id),output:null};_30.previewManager=new Attacklab.wmd.previewManager(_30.panes);_30.editor=new Attacklab.wmd.editor($("source"+_30.id),_30.previewManager.refresh);$("preview"+_30.id).setStyle({height:($("editor"+_30.id).getHeight()-4)+"px"});}}else{Event.observe("form"+_30.id,"dblclick",editBlock);}if($("edit"+_30.id)){Event.observe("edit"+_30.id,"click",editBlock);Event.observe("edit"+_30.id,"access:click",editBlock);}if($("moveDown"+_30.id)){Event.observe("moveDown"+_30.id,"click",moveDownBlock);}if($("back"+_30.id)){Event.observe("back"+_30.id,"click",backBlock);}if($("forward"+_30.id)){Event.observe("forward"+_30.id,"click",forwardBlock);}if($("first"+_30.id)){Event.observe("first"+_30.id,"click",firstBlock);}if($("last"+_30.id)){Event.observe("last"+_30.id,"click",lastBlock);}if($("moveUp"+_30.id)){Event.observe("moveUp"+_30.id,"click",moveUpBlock);}if($("delete"+_30.id)){Event.observe("delete"+_30.id,"click",deleteBlock);Event.observe("delete"+_30.id,"access:click",deleteBlock);}if($("duplicate"+_30.id)){Event.observe("duplicate"+_30.id,"click",duplicateBlock);Event.observe("duplicate"+_30.id,"access:click",duplicateBlock);}if($("append"+_30.id)){Event.observe("append"+_30.id,"click",appendBlock);Event.observe("append"+_30.id,"access:click",appendBlock);}};initBlock=function(_31){_31.timestamp=0;_31.editingName=null;observeBlock(_31);};stickyBlock=function(e){blockId=Event.element(e).id.sub("source","");document.stickyBlock=$(blockId);};unstickyBlock=function(e){document.stickyBlock=null;};editBlock=function(e){e.stop();var _35=e.element().up(".edit");if(!$("edit"+_35.id)||$("edit"+_35.id).disabled){return false;}new Ajax.Request(document.draftyURI+"?just="+_35.id,{method:"post",parameters:Form.serializeElements($("form"+_35.id).getInputs("hidden").concat([$("edit"+_35.id)]),true),onCreate:function(_36){$$(".blockForm").each(function(_37){_37.disabled="disabled";});},onSuccess:function(_38){var _39=Position.page(_35)[1];new Effect.Opacity(_35,{duration:0.5,queue:"end",from:1,to:0,afterFinish:function(_3a){if(_35.editor){_35.previewManager.destroy();_35.editor.destroy();_35.editor=null;}_35.update(_38.responseText);observeBlock(_35);var _3b=_39-Position.page(_35)[1];if(_3b!=0){window.scrollBy(0,0-parseInt(_3b));}_35.select(".blockForm").each(function(_3c){_3c.disabled="disabled";});new Effect.Opacity(_35,{duration:0.5,queue:"end",from:0,to:1,afterFinish:function(_3d){swapAccessKeys(_35.id);if($("source"+_35.id)){$("source"+_35.id).focus();_35.lastsource=$F("source"+_35.id);if($("source"+_35.id).createTextRange){var _3e=$("source"+_35.id).createTextRange();_3e.collapse(false);_3e.select();}else{if($("source"+_35.id).setSelectionRange){var _3f=$F("source"+_35.id).length;$("source"+_35.id).setSelectionRange(_3f,_3f);}}if($("source"+_35.id).scrollTop>0){window.scrollBy(0,$("source"+_35.id).getHeight());}}checkBlocks();}});}});}});};saveBlock=function(e){e.stop();var _41=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_41.id,{method:"post",parameters:Form.serializeElements($("form"+_41.id).getInputs("hidden").concat([$("save"+_41.id),$("source"+_41.id)]),true),onCreate:function(_42){$$(".blockForm").each(function(_43){_43.disabled="disabled";});},onSuccess:function(_44){var _45=Position.page(_41)[1];new Effect.Opacity(_41,{duration:0.5,queue:"end",from:1,to:0,afterFinish:function(_46){if(_41.editor){_41.previewManager.destroy();_41.editor.destroy();_41.editor=null;}_41.update(_44.responseText);observeBlock(_41);var _47=_45-Position.page(_41)[1];if(_47!=0){window.scrollBy(0,0-parseInt(_47));}_41.select(".blockForm").each(function(_48){_48.disabled="disabled";});new Effect.Opacity(_41,{duration:0.5,queue:"end",from:0,to:1,afterFinish:function(_49){_41.noHighlight=true;checkBlocks();}});}});}});};cancelBlock=function(e){e.stop();var _4b=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_4b.id,{method:"post",parameters:Form.serializeElements($("form"+_4b.id).getInputs("hidden").concat([$("cancel"+_4b.id)]),true),onCreate:function(_4c){$$(".blockForm").each(function(_4d){_4d.disabled="disabled";});},onSuccess:function(_4e){var _4f=Position.page(_4b)[1];new Effect.Opacity(_4b,{duration:0.5,queue:"end",from:1,to:0,afterFinish:function(_50){if(_4b.editor){_4b.previewManager.destroy();_4b.editor.destroy();_4b.editor=null;}_4b.update(_4e.responseText);observeBlock(_4b);var _51=_4f-Position.page(_4b)[1];if(_51!=0){window.scrollBy(0,0-parseInt(_51));}_4b.select(".blockForm").each(function(_52){_52.disabled="disabled";});new Effect.Opacity(_4b,{duration:0.5,queue:"end",from:0,to:1,afterFinish:function(_53){_4b.noHighlight=true;checkBlocks();}});}});}});};backBlock=function(e){historyBlock(e,"&backBlock=1",true);};forwardBlock=function(e){historyBlock(e,"&forwardBlock=1",true);};firstBlock=function(e){historyBlock(e,"&v=1",false);};lastBlock=function(e){historyBlock(e,"&v=",false);};historyBlock=function(e,_59,_5a){e.stop();var _5b=e.element().up(".edit");if(_5a&&$("version"+_5b.id)){_59=_59+"&v="+$("version"+_5b.id).getValue();}new Ajax.Request(document.draftyURI+"?just="+_5b.id+"&blockId="+_5b.id+_59,{method:"get",onCreate:function(_5c){$$(".blockForm").each(function(_5d){_5d.disabled="disabled";});},onSuccess:function(_5e){var _5f=Position.page(_5b)[1];if(_5b.editor){_5b.previewManager.destroy();_5b.editor.destroy();_5b.editor=null;}_5b.update(_5e.responseText);observeBlock(_5b);var _60=_5f-Position.page(_5b)[1];if(_60!=0){window.scrollBy(0,0-parseInt(_60));}_5b.select(".blockForm").each(function(_61){_61.disabled="disabled";});_5b.noHighlight=true;checkBlocks();}});};moveUpBlock=function(e){document.blockUpdater.stop();e.stop();var _63=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_63.id,{method:"post",parameters:Form.serializeElements($("form"+_63.id).getInputs("hidden").concat([$("moveUp"+_63.id)]),true),onCreate:function(_64){$$(".blockForm").each(function(_65){_65.disabled="disabled";});},onSuccess:function(_66){document.stickyBlock=null;var _67=$(_63.id).previous(".edit");var _68=$(_63.id).viewportOffset()["top"];var _69=(_68-_67.viewportOffset()["top"])-_67.getHeight();new Effect.Parallel([new Effect.Move(_67,{sync:true,mode:"relative",y:_63.getHeight()+_69}),new Effect.Move($(_63.id),{sync:true,mode:"relative",y:-1*(_67.getHeight()+_69)})],{duration:0.5,queue:"front",afterUpdate:function(_6a){window.scrollBy(0,$(_63.id).viewportOffset()["top"]-_68);},afterFinish:function(_6b){periodicalCheckBlocks();document.blockUpdater=new PeriodicalExecuter(periodicalCheckBlocks,checkRate);}});}});};moveDownBlock=function(e){document.blockUpdater.stop();e.stop();var _6d=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_6d.id,{method:"post",parameters:Form.serializeElements($("form"+_6d.id).getInputs("hidden").concat([$("moveDown"+_6d.id)]),true),onCreate:function(_6e){$$(".blockForm").each(function(_6f){_6f.disabled="disabled";});},onSuccess:function(_70){document.stickyBlock=null;var _71=_6d.next(".edit");var _72=_6d.viewportOffset()["top"];var _73=(_71.viewportOffset()["top"]-_72)-_6d.getHeight();new Effect.Parallel([new Effect.Move(_71,{sync:true,mode:"relative",y:-1*(_6d.getHeight()+_73)}),new Effect.Move($(_6d.id),{sync:true,mode:"relative",y:_71.getHeight()+_73})],{duration:0.5,queue:"front",afterUpdate:function(_74){window.scrollBy(0,_6d.viewportOffset()["top"]-_72);},afterFinish:function(_75){periodicalCheckBlocks();document.blockUpdater=new PeriodicalExecuter(periodicalCheckBlocks,checkRate);}});}});};deleteBlock=function(e){e.stop();var _77=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_77.id,{method:"post",parameters:Form.serializeElements($("form"+_77.id).getInputs("hidden").concat([$("delete"+_77.id)]),true),onCreate:function(_78){$$(".blockForm").each(function(_79){_79.disabled="disabled";});},onSuccess:function(_7a){document.stickyBlock=$("add");checkBlocks();}});};duplicateBlock=function(e){e.stop();var _7c=e.element().up(".edit");if($("source"+_7c.id)){new Ajax.Request(document.draftyURI+"?&just="+_7c.id,{method:"post",parameters:Form.serializeElements($("form"+_7c.id).getInputs("hidden").concat([$("duplicate"+_7c.id),$("source"+_7c.id)]),true),onCreate:function(_7d){$$(".blockForm").each(function(_7e){_7e.disabled="disabled";});},onSuccess:function(_7f){document.stickyBlock=$(_7c.id);checkBlocks();}});}else{new Ajax.Request(document.draftyURI+"?just="+_7c.id,{method:"post",parameters:Form.serializeElements($("form"+_7c.id).getInputs("hidden").concat([$("duplicate"+_7c.id)]),true),onCreate:function(_80){$$(".blockForm").each(function(_81){_81.disabled="disabled";});},onSuccess:function(_82){document.stickyBlock=$(_7c.id);checkBlocks();}});}};appendBlock=function(e){e.stop();var _84=e.element().up(".edit");new Ajax.Request(document.draftyURI+"?just="+_84.id,{method:"post",parameters:Form.serializeElements($("form"+_84.id).getInputs("hidden").concat([$("append"+_84.id)]),true),onCreate:function(_85){$$(".blockForm").each(function(_86){_86.disabled="disabled";});},onSuccess:function(_87){document.stickyBlock=$(_84.id);checkBlocks();}});};prependBlock=function(e){e.stop();new Ajax.Request(document.draftyURI+"?just=1",{method:"post",parameters:$("create").serialize(),onCreate:function(_89){$$(".blockForm").each(function(_8a){_8a.disabled="disabled";});},onSuccess:function(_8b){checkBlocks();}});};
