(function(){var a={getSelection:function(){var b=this.jquery?this[0]:this;return(("selectionStart" in b&&function(){var c=b.selectionEnd-b.selectionStart;return{start:b.selectionStart,end:b.selectionEnd,length:c,text:b.value.substr(b.selectionStart,c)}})||(document.selection&&function(){b.focus();var c=document.selection.createRange();if(c==null){return{start:0,end:b.value.length,length:0}}var d=b.createTextRange();var e=d.duplicate();d.moveToBookmark(c.getBookmark());e.setEndPoint("EndToStart",d);return{start:e.text.length,end:e.text.length+c.text.length,length:c.text.length,text:c.text}})||function(){return{start:0,end:b.value.length,length:0}})()},replaceSelection:function(){var c=this.jquery?this[0]:this;var b=arguments[0]||"";return(("selectionStart" in c&&function(){c.value=c.value.substr(0,c.selectionStart)+b+c.value.substr(c.selectionEnd,c.value.length);return this})||(document.selection&&function(){c.focus();document.selection.createRange().text=b;return this})||function(){c.value+=b;return this})()}};jQuery.each(a,function(b){jQuery.fn[b]=this})})();(function(a){var b=a.scrollTo=function(e,f,d){a(window).scrollTo(e,f,d)};b.defaults={axis:"y",duration:1};b.window=function(d){return a(window).scrollable()};a.fn.scrollable=function(){return this.map(function(){var e=this.parentWindow||this.defaultView,f=this.nodeName=="#document"?e.frameElement||e:this,d=f.contentDocument||(f.contentWindow||f).document,h=f.setInterval;return f.nodeName=="IFRAME"||h&&a.browser.safari?d.body:h?d.documentElement:this})};a.fn.scrollTo=function(e,f,d){if(typeof f=="object"){d=f;f=0}if(typeof d=="function"){d={onAfter:d}}d=a.extend({},b.defaults,d);f=f||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){f/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var g=this,i=a(g),n=e,h,r={},j=i.is("html,body");switch(typeof n){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(n)){n=c(n);break}n=a(n,this);case"object":if(n.is||n.style){h=(n=a(n)).offset()}}a.each(d.axis.split(""),function(l,o){var w=o=="x"?"Left":"Top",k=w.toLowerCase(),u="scroll"+w,p=g[u],q=o=="x"?"Width":"Height",x=q.toLowerCase();if(h){r[u]=h[k]+(j?0:p-i.offset()[k]);if(d.margin){r[u]-=parseInt(n.css("margin"+w))||0;r[u]-=parseInt(n.css("border"+w+"Width"))||0}r[u]+=d.offset[k]||0;if(d.over[k]){r[u]+=n[x]()*d.over[k]}}else{r[u]=n[k]}if(/^\d+$/.test(r[u])){r[u]=r[u]<=0?0:Math.min(r[u],s(q))}if(!l&&d.queue){if(p!=r[u]){m(d.onAfterFirst)}delete r[u]}});m(d.onAfter);function m(k){i.animate(r,f,d.easing,k&&function(){k.call(this,e,d)})}function s(l){var o="scroll"+l,k=g.ownerDocument;return j?Math.max(k.documentElement[o],k.body[o]):g[o]}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){c.settings.submitHandler.call(c,c.currentForm);return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=false;var b=a(this[0].form).validate();this.each(function(){c|=b.element(this)});return c}},removeAttrs:function(c){var b={},d=this;a.each(c.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(i,g){var c=this[0];if(i){var b=a.data(c.form,"validator").settings;var d=b.rules;var e=a.validator.staticRules(c);switch(i){case"add":a.extend(e,a.validator.normalizeRule(g));d[c.name]=e;if(g.messages){b.messages[c.name]=a.extend(b.messages[c.name],g.messages)}break;case"remove":if(!g){delete d[c.name];return e}var h={};a.each(g.split(/\s/),function(l,k){h[k]=e[k];delete e[k]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(c),a.validator.classRules(c),a.validator.attributeRules(c),a.validator.staticRules(c)),c);if(f.required){var j=f.required;delete f.required;f=a.extend({required:j},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(b.value)},filled:function(b){return !!a.trim(b.value)},unchecked:function(b){return !b.checked}});a.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(e,d){b=b.replace(new RegExp("\\{"+e+"\\}","g"),d)});return b};a.validator=function(b,c){this.settings=a.extend({},a.validator.defaults,b);this.currentForm=c;this.init()};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"div",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}},highlight:function(b,c){a(b).addClass(c)},unhighlight:function(b,c){a(b).removeClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.format("Please enter no more than {0} characters."),minlength:a.format("Please enter at least {0} characters."),rangelength:a.format("Please enter a value between {0} and {1} characters long."),range:a.format("Please enter a value between {0} and {1}."),max:a.format("Please enter a value less than or equal to {0}."),min:a.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var d=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){d[g]=e})});var b=this.settings.rules;a.each(b,function(e,f){b[e]=a.validator.normalizeRule(f)});function c(e){var f=a.data(this[0].form,"validator");f.settings["on"+e.type]&&f.settings["on"+e.type].call(f,this[0])}a(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",c).delegate("click",":radio, :checkbox",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var c=0,b=(this.currentElements=this.elements());b[c];c++){this.check(b[c])}return this.valid()},element:function(b){b=this.clean(b);this.lastElement=b;this.prepareElement(b);this.currentElements=a(b);var c=this.check(b);if(c){delete this.invalid[b.name]}else{this.invalid[b.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return c},showErrors:function(b){if(b){a.extend(this.errorMap,b);this.errorList=[];for(var c in b){this.errorList.push({message:b[c],element:this.findByName(c)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(c){var b=0;for(var d in c){b++}return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.formSubmitted=false;this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var f=a(c).rules();var b=false;for(method in f){var d={method:method,parameters:f[method]};try{var g=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,d.parameters);if(g=="dependency-mismatch"){b=true;continue}b=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!g){this.formatAndAdd(c,d);return false}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+d.method+"' method");throw h}}if(b){return}if(this.objectLength(f)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(d,b){var c=this.settings.messages[d];return c&&(c.constructor==String?c:c[b])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(d,c){var b=this.defaultMessage(d,c.method);if(typeof b=="function"){b=b.call(this,c.parameters,d)}this.errorList.push({message:b,element:d});this.errorMap[d.name]=b;this.submitted[d.name]=b},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parents(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,d){var c=this.errorsFor(b);if(c.length){c.removeClass().addClass(this.settings.errorClass);c.attr("generated")&&c.html(d)}else{c=a("<"+this.settings.errorElement+"/>").attr({title:this.idOrName(b),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){c=c.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(c).length){this.settings.errorPlacement?this.settings.errorPlacement(c,a(b)):c.insertAfter(b)}}if(!d&&this.settings.success){c.text("");typeof this.settings.success=="string"?c.addClass(this.settings.success):this.settings.success(c)}this.toShow=this.toShow.add(c)},errorsFor:function(b){return this.errors().filter("[title='"+this.idOrName(b)+"']")},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(e,d){return d.form==c&&d.name==b&&d||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit()}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(d){var b={};var c=a(d).attr("class");c&&a.each(c.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(b,a.validator.classRuleSettings[this])}});return b},attributeRules:function(d){var b={};var e=a(d);for(method in a.validator.methods){var c=e.attr(method);if(c){b[method]=c}}if(b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)){delete b.maxlength}return b},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var b={};var d=a.data(c.form,"validator");if(d.settings.rules){b=a.validator.normalizeRule(d.settings.rules[c.name])||{}}return b},normalizeRules:function(c,b){a.each(c,function(e,f){if(f===false){delete c[e];return}if(f.param||f.depends){var d=true;switch(typeof f.depends){case"string":d=!!a(f.depends,b.form).length;break;case"function":d=f.depends.call(b,b);break}if(d){c[e]=f.param!==undefined?f.param:true}else{delete c[e]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(b){if(typeof b=="string"){var c={};a.each(b.split(/\s/),function(){c[this]=true});b=c}return b},addMethod:function(d,c,b){a.validator.methods[d]=c;a.validator.messages[d]=b;if(c.length<3){a.validator.addClassRules(d,a.validator.normalizeRule(d))}},methods:{required:function(b,d,c){if(!this.depend(c,d)){return"dependency-mismatch"}switch(d.nodeName.toLowerCase()){case"select":var e=a("option:selected",d);return e.length>0&&(d.type=="select-multiple"||(a.browser.msie&&!(e[0].attributes.value.specified)?e[0].text:e[0].value).length>0);case"input":if(this.checkable(d)){return this.getLength(b,d)>0}default:return a.trim(b).length>0}},remote:function(b,c,g){if(this.optional(c)){return"dependency-mismatch"}var e=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}this.settings.messages[c.name].remote=typeof e.message=="function"?e.message(b):e.message;g=typeof g=="string"&&{url:g}||g;if(e.old!==b){e.old=b;var d=this;this.startRequest(c);var f={};f[c.name]=b;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:f,success:function(i){if(i){var j=d.formSubmitted;d.prepareElement(c);d.formSubmitted=j;d.successList.push(c);d.showErrors()}else{var h={};h[c.name]=i||d.defaultMessage(c,"remote");d.showErrors(h)}e.valid=i;d.stopRequest(c,i)}},g));return"pending"}else{if(this.pending[c.name]){return"pending"}}return e.valid},minlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)>=c},maxlength:function(b,d,c){return this.optional(d)||this.getLength(a.trim(b),d)<=c},rangelength:function(b,d,c){var e=this.getLength(a.trim(b),d);return this.optional(d)||(e>=c[0]&&e<=c[1])},min:function(b,d,c){return this.optional(d)||b>=c},max:function(b,d,c){return this.optional(d)||b<=c},range:function(b,d,c){return this.optional(d)||(b>=c[0]&&b<=c[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},dateDE:function(c,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},numberDE:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(b,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(b)){return false}var f=0,d=0,e=false;b=b.replace(/\D/g,"");for(n=b.length-1;n>=0;n--){var g=b.charAt(n);var d=parseInt(g,10);if(e){if((d*=2)>9){d-=9}}f+=d;e=!e}return(f%10)==0},accept:function(b,d,c){c=typeof c=="string"?c:"png|jpe?g|gif";return this.optional(d)||b.match(new RegExp(".("+c+")$","i"))},equalTo:function(b,d,c){return b==a(c).val()}}})})(jQuery);(function(c){var b=c.ajax;var a={};c.ajax=function(d){d=c.extend(d,c.extend({},c.ajaxSettings,d));var e=d.port;if(d.mode=="abort"){if(a[e]){a[e].abort()}return(a[e]=b.apply(this,arguments))}return b.apply(this,arguments)}})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){if(a.browser.msie){return false}this.addEventListener(c,a.event.special[b].handler,true)},teardown:function(){if(a.browser.msie){return false}this.removeEventListener(c,a.event.special[b].handler,true)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=b;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(d,c,b){return this.bind(d,function(e){var f=a(e.target);if(f.is(c)){return b.apply(f,arguments)}})},triggerEvent:function(c,b){return this.triggerHandler(c,[a.event.fix({type:c,target:b})])}})})(jQuery);var Attacklab=Attacklab||{};Attacklab.showdown=Attacklab.showdown||{};Attacklab.showdown.converter=function(){var f;var E;var g;var y=0;this.makeHtml=function(H){f=new Array();E=new Array();g=new Array();H=H.replace(/~/g,"~T");H=H.replace(/\$/g,"~D");H=H.replace(/\r\n/g,"\n");H=H.replace(/\r/g,"\n");H="\n\n"+H+"\n\n";H=q(H);H=H.replace(/^[ \t]+$/mg,"");H=e(H);H=m(H);H=G(H);H=C(H);H=H.replace(/~D/g,"$$");H=H.replace(/~T/g,"~");return H};var m=function(H){var H=H.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,function(J,L,M,I,K){L=L.toLowerCase();f[L]=k(M);if(I){return I+K}else{if(K){E[L]=K.replace(/"/g,"&quot;")}}return""});return H};var e=function(J){J=J.replace(/\n/g,"\n\n");var H="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del";var I="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";J=J.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,l);J=J.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,l);J=J.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,l);J=J.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,l);J=J.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,l);J=J.replace(/\n\n/g,"\n");return J};var l=function(H,J){var I=J;I=I.replace(/\n\n/g,"\n");I=I.replace(/^\n/,"");I=I.replace(/\n+$/g,"");I="\n\n~K"+(g.push(I)-1)+"K\n\n";return I};var G=function(I){I=B(I);var H=d("<hr />");I=I.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,H);I=I.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm,H);I=I.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm,H);I=a(I);I=c(I);I=i(I);I=e(I);I=o(I);return I};var t=function(H){H=A(H);H=x(H);H=w(H);H=s(H);H=v(H);H=p(H);H=k(H);H=j(H);H=H.replace(/  +\n/g," <br />\n");return H};var x=function(H){var I=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;H=H.replace(I,function(J){var K=J.replace(/(.)<\/?code>(?=.)/g,"$1`");K=h(K,"\\`*_");return K});return H};var v=function(H){H=H.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,z);H=H.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,z);H=H.replace(/(\[([^\[\]]+)\])()()()()()/g,z);return H};var z=function(R,Q,U,J,L,P,T,I){if(I==undefined){I=""}var K=Q;var M=U;var N=J.toLowerCase();var O=L;var H=I;if(O==""){if(N==""){N=M.toLowerCase().replace(/ ?\n/g," ")}O="#"+N;if(f[N]!=undefined){O=f[N];if(E[N]!=undefined){H=E[N]}}else{if(K.search(/\(\s*\)$/m)>-1){O=""}else{return K}}}O=h(O,"*_");var S='<a href="'+O+'"';if(H!=""){H=H.replace(/"/g,"&quot;");H=h(H,"*_");S+=' title="'+H+'"'}S+=">"+M+"</a>";return S};var s=function(H){H=H.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,r);H=H.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,r);return H};var r=function(Q,P,U,S,L,O,T,I){var K=P;var J=U;var M=S.toLowerCase();var N=L;var H=I;if(!H){H=""}if(N==""){if(M==""){M=J.toLowerCase().replace(/ ?\n/g," ")}N="#"+M;if(f[M]!=undefined){N=f[M];if(E[M]!=undefined){H=E[M]}}else{return K}}J=J.replace(/"/g,"&quot;");N=h(N,"*_");var R='<img src="'+N+'" alt="'+J+'"';H=H.replace(/"/g,"&quot;");H=h(H,"*_");R+=' title="'+H+'"';R+=" />";return R};var B=function(H){H=H.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(I,J){return d("<h1>"+t(J)+"</h1>")});H=H.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(I,J){return d("<h2>"+t(J)+"</h2>")});H=H.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(I,J,L){var K=J.length;return d("<h"+K+">"+t(L)+"</h"+K+">")});return H};var F;var a=function(I){I+="~0";var H=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;if(y){I=I.replace(H,function(J,K,L){var N=K;var M=(L.search(/[*+-]/g)>-1)?"ul":"ol";N=N.replace(/\n{2,}/g,"\n\n\n");var O=F(N);O=O.replace(/\s+$/,"");O="<"+M+">"+O+"</"+M+">\n";return O})}else{H=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;I=I.replace(H,function(J,K,L,M){var O=K;var P=L;var N=(M.search(/[*+-]/g)>-1)?"ul":"ol";var P=P.replace(/\n{2,}/g,"\n\n\n");var Q=F(P);Q=O+"<"+N+">\n"+Q+"</"+N+">\n";return Q})}I=I.replace(/~0/,"");return I};F=function(H){y++;H=H.replace(/\n{2,}$/,"\n");H+="~0";H=H.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(J,K,L,M,N){var P=N;var I=K;var O=L;if(I||(P.search(/\n{2,}/)>-1)){P=G(n(P))}else{P=a(n(P));P=P.replace(/\n$/,"");P=t(P)}return"<li>"+P+"</li>\n"});H=H.replace(/~0/g,"");y--;return H};var c=function(H){H+="~0";H=H.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(J,K,M){var I=K;var L=M;I=u(n(I));I=q(I);I=I.replace(/^\n+/g,"");I=I.replace(/\n+$/g,"");I="<pre><code>"+I+"\n</code></pre>";return d(I)+L});H=H.replace(/~0/,"");return H};var d=function(H){H=H.replace(/(^\n+|\n+$)/g,"");return"\n\n~K"+(g.push(H)-1)+"K\n\n"};var A=function(H){H=H.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(I,J,K,L,M){var N=L;N=N.replace(/^([ \t]*)/g,"");N=N.replace(/[ \t]*$/g,"");N=u(N);return J+"<code>"+N+"</code>"});return H};var u=function(H){H=H.replace(/&/g,"&amp;");H=H.replace(/</g,"&lt;");H=H.replace(/>/g,"&gt;");H=h(H,"*_{}[]\\",false);return H};var j=function(H){H=H.replace(/(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\1/g,"<strong>$2</strong>");H=H.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>");return H};var i=function(H){H=H.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(J,K){var I=K;I=I.replace(/^[ \t]*>[ \t]?/gm,"~0");I=I.replace(/~0/g,"");I=I.replace(/^[ \t]+$/gm,"");I=G(I);I=I.replace(/(^|\n)/g,"$1  ");I=I.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(L,M){var N=M;N=N.replace(/^  /mg,"~0");N=N.replace(/~0/g,"");return N});return d("<blockquote>\n"+I+"\n</blockquote>")});return H};var o=function(N){N=N.replace(/^\n+/g,"");N=N.replace(/\n+$/g,"");var K=N.split(/\n{2,}/g);var M=new Array();var H=K.length;for(var I=0;I<H;I++){var L=K[I];if(L.search(/~K(\d+)K/g)>=0){M.push(L)}else{if(L.search(/\S/)>=0){L=t(L);L=L.replace(/^([ \t]*)/g,"<p>");L+="</p>";M.push(L)}}}H=M.length;for(var I=0;I<H;I++){while(M[I].search(/~K(\d+)K/)>=0){var J=g[RegExp.$1];J=J.replace(/\$/g,"$$$$");M[I]=M[I].replace(/~K\d+K/,J)}}return M.join("\n\n")};var k=function(H){H=H.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;");H=H.replace(/<(?![a-z\/?\$!])/gi,"&lt;");return H};var w=function(H){H=H.replace(/\\(\\)/g,b);H=H.replace(/\\([`*_{}\[\]()>#+-.!])/g,b);return H};var p=function(H){H=H.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>');H=H.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(I,J){return D(C(J))});return H};var D=function(J){function H(L){var K="0123456789ABCDEF";var M=L.charCodeAt(0);return(K.charAt(M>>4)+K.charAt(M&15))}var I=[function(K){return"&#"+K.charCodeAt(0)+";"},function(K){return"&#x"+H(K)+";"},function(K){return K}];J="mailto:"+J;J=J.replace(/./g,function(L){if(L=="@"){L=I[Math.floor(Math.random()*2)](L)}else{if(L!=":"){var K=Math.random();L=(K>0.9?I[2](L):K>0.45?I[1](L):I[0](L))}}return L});J='<a href="'+J+'">'+J+"</a>";J=J.replace(/">.+:/g,'">');return J};var C=function(H){H=H.replace(/~E(\d+)E/g,function(I,K){var J=parseInt(K);return String.fromCharCode(J)});return H};var n=function(H){H=H.replace(/^(\t|[ ]{1,4})/gm,"~0");H=H.replace(/~0/g,"");return H};var q=function(H){H=H.replace(/\t(?=\t)/g,"    ");H=H.replace(/\t/g,"~A~B");H=H.replace(/~B(.+?)~A/g,function(J,K,L){var M=K;var N=4-M.length%4;for(var I=0;I<N;I++){M+=" "}return M});H=H.replace(/~A/g,"    ");H=H.replace(/~B/g,"");return H};var h=function(L,J,I){var H="(["+J.replace(/([\[\]\\])/g,"\\$1")+"])";if(I){H="\\\\"+H}var K=new RegExp(H,"g");L=L.replace(K,b);return L};var b=function(H,I){var J=I.charCodeAt(0);return"~E"+J+"E"}};var Showdown=Attacklab.showdown;if(Attacklab.fileLoaded){Attacklab.fileLoaded("showdown.js")};(function(){var cl=null,cn=true;window.PR_SHOULD_USE_CONTINUATION=cn;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var j=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);window._pr_isIE6=function(){return j};return j};var co="a",az="z",aA="A",aB="Z",aC="!",aD="!=",an="!==",cg="#",ch="%",ci="%=",cd="&",cj="&&",ck="&&=",bM="&=",cm="(",af="*",ag="*=",ah="+=",ai=",",aj="-=",ak="->",cf="/",A="/=",E=":",F="::",G=";",ce="<",m="<<",o="<<=",p="<=",q="=",r="==",s="===",b7=">",t=">=",u=">>",d=">>=",e=">>>",f=">>>=",g="?",h="@",i="[",k="^",l="^=",a="^^",b="^^=",c="{",bs="|",aV="|=",aW="||",aX="||=",aY="~",aZ="break",a0="case",a1="continue",aM="delete",aN="do",aO="else",aP="finally",aQ="instanceof",aR="return",aS="throw",aT="try",aE="typeof",aF="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)",aG="|\\b",aH="\\$1",aI="|^)\\s*$",aJ="&amp;",aK="&lt;",aL="&gt;",aw="&quot;",ax="&#",ay="x",ao="'",b8='"',ap=" ",aq="XMP",ar="</",at='="',b9="PRE",au='<!DOCTYPE foo PUBLIC "foo bar">\n<foo />',b1="",av="\t",bN="\n",bO="nocode",bP=' $1="$2$3$4"',b2="pln",b3="lang-",b4="src",b5="default-markup",b6="default-code",bV="com",bQ="dec",bW="pun",bR="lang-js",bS="lang-css",bX="tag",bY="atv",al="<>/=",bZ="atn",am=" \t\r\n",b0="str",J="'\"",K="'\"`",Q="\"'",R=" \r\n",bT="lit",Z="123456789",aa=".",ad="kwd",ae="typ",v="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",bU="</span>",w='<span class="',y='">',bt="$1&nbsp;",bl="<br />",bm="console",bn="cannot override language handler %s",bo="htm",bp="html",bq="mxml",br="xhtml",bd="xml",be="xsl",bf="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",bg="c",bh="cc",bi="cpp",bj="cxx",bk="cyc",a2="m",a3="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",a4="cs",a5="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",a6="java",a7="break continue do else for if return while case done elif esac eval fi function in local set then until ",a8="bsh",a9="csh",aU="sh",bK="break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",bL="cv",bD="py",bE="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",bF="perl",bG="pl",bH="pm",bI="break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",bJ="rb",bv="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try debugger eval export function get null set undefined var with Infinity NaN ",bw="js",bx="pre",by="code",bz="xmp",bA="prettyprint",bB="class",bC="br",bu="\r\n";(function(){function z(cG){cG=cG.split(/ /g);var cF={};for(var cI=cG.length;--cI>=0;){var cH=cG[cI];if(cH){cF[cH]=cl}}return cF}function X(cF){return cF>=co&&cF<=az||cF>=aA&&cF<=aB}function cv(cG,cF,cI,cH){cG.unshift(cI,cH||0);try{cF.splice.apply(cF,cG)}finally{cG.splice(0,2)}}var Y=(function(){var cG=[aC,aD,an,cg,ch,ci,cd,cj,ck,bM,cm,af,ag,ah,ai,aj,ak,cf,A,E,F,G,ce,m,o,p,q,r,s,b7,t,u,d,e,f,g,h,i,k,l,a,b,c,bs,aV,aW,aX,aY,aZ,a0,a1,aM,aN,aO,aP,aQ,aR,aS,aT,aE],cF=aF;for(var cI=0;cI<cG.length;++cI){var cH=cG[cI];cF+=X(cH.charAt(0))?aG+cH:bs+cH.replace(/([^=<>:&])/g,aH)}cF+=aI;return new RegExp(cF)})(),x=/&/g,cC=/</g,cD=/>/g,ab=/\"/g;function ac(cF){return cF.replace(x,aJ).replace(cC,aK).replace(cD,aL).replace(ab,aw)}function ct(cF){return cF.replace(x,aJ).replace(cC,aK).replace(cD,aL)}var ba=/&lt;/g,bb=/&gt;/g,bc=/&apos;/g,ca=/&quot;/g,cb=/&amp;/g,cc=/&nbsp;/g;function cs(cG){var cF=cG.indexOf(cd);if(cF<0){return cG}for(--cF;(cF=cG.indexOf(ax,cF+1))>=0;){var cI=cG.indexOf(G,cF);if(cI>=0){var cH=cG.substring(cF+3,cI),cK=10;if(cH&&cH.charAt(0)===ay){cH=cH.substring(1);cK=16}var cJ=parseInt(cH,cK);isNaN(cJ)||(cG=cG.substring(0,cF)+String.fromCharCode(cJ)+cG.substring(cI+1))}}return cG.replace(ba,ce).replace(bb,b7).replace(bc,ao).replace(ca,b8).replace(cb,cd).replace(cc,ap)}function cE(cF){return aq===cF.tagName}function cw(cG,cF){switch(cG.nodeType){case 1:var cI=cG.tagName.toLowerCase();cF.push(ce,cI);for(var cH=0;cH<cG.attributes.length;++cH){var cK=cG.attributes[cH];if(!!cK.specified){cF.push(ap);cw(cK,cF)}}cF.push(b7);for(var cJ=cG.firstChild;cJ;cJ=cJ.nextSibling){cw(cJ,cF)}if(cG.firstChild||!/^(?:br|link|img)$/.test(cI)){cF.push(ar,cI,b7)}break;case 2:cF.push(cG.name.toLowerCase(),at,ac(cG.value),b8);break;case 3:case 4:cF.push(ct(cG.nodeValue));break}}var U=cl;function O(cH){if(cl===U){var cG=document.createElement(b9);cG.appendChild(document.createTextNode(au));U=!/</.test(cG.innerHTML)}if(U){var cJ=cH.innerHTML;if(cE(cH)){cJ=ct(cJ)}return cJ}var cI=[];for(var cF=cH.firstChild;cF;cF=cF.nextSibling){cw(cF,cI)}return cI.join(b1)}function P(cG){var cF=0;return function(cK){var cJ=cl,cN=0;for(var cL=0,cI=cK.length;cL<cI;++cL){var cM=cK.charAt(cL);switch(cM){case av:cJ||(cJ=[]);cJ.push(cK.substring(cN,cL));var cH=cG-cF%cG;cF+=cH;for(;cH>=0;cH-="                ".length){cJ.push("                ".substring(0,cH))}cN=cL+1;break;case bN:cF=0;break;default:++cF}}if(!cJ){return cK}cJ.push(cK.substring(cN));return cJ.join(b1)}}var S=/(?:[^<]+|<!--[\s\S]*?--\>|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g,T=/^<!--/,cA=/^<\[CDATA\[/,V=/^<br\b/i,cx=/^<(\/?)([a-zA-Z]+)/;function W(cM){var cL=cM.match(S),cO=[],cN=0,cR=[];if(cL){for(var cP=0,cJ=cL.length;cP<cJ;++cP){var cQ=cL[cP];if(cQ.length>1&&cQ.charAt(0)===ce){if(!T.test(cQ)){if(cA.test(cQ)){cO.push(cQ.substring(9,cQ.length-3));cN+=cQ.length-12}else{if(V.test(cQ)){cO.push(bN);++cN}else{if(cQ.indexOf(bO)>=0&&B(cQ)){var cH=cQ.match(cx)[2],cF=1,cI;cL:for(cI=cP+1;cI<cJ;++cI){var cK=cL[cI].match(cx);if(cK&&cK[2]===cH){if(cK[1]===cf){if(--cF===0){break cL}}else{++cF}}}if(cI<cJ){cR.push(cN,cL.slice(cP,cI+1).join(b1));cP=cI}else{cR.push(cN,cQ)}}else{cR.push(cN,cQ)}}}}}else{var cG=cs(cQ);cO.push(cG);cN+=cG.length}}}return{source:cO.join(b1),tags:cR}}function B(cF){return !!cF.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,bP).match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)}function D(cG,cF,cI,cH){if(!!cF){var cK=cI.call({},cF);if(cG){for(var cJ=cK.length;(cJ-=2)>=0;){cK[cJ]+=cG}}cH.push.apply(cH,cK)}}function cB(cG,cF){var cI={};(function(){var cN=cG.concat(cF);for(var cL=cN.length;--cL>=0;){var cO=cN[cL],cM=cO[3];if(cM){for(var cP=cM.length;--cP>=0;){cI[cM.charAt(cP)]=cO}}}})();var cH=cF.length,cK=/\S/,cJ=function(cU,cZ){cZ=cZ||0;var cS=[cZ,b2],cM=b1,cT=0,cY=cU;while(cY.length){var cN,cV=cl,cW,cL=cI[cY.charAt(0)];if(cL){cW=cY.match(cL[1]);cV=cW[0];cN=cL[0]}else{for(var cO=0;cO<cH;++cO){cL=cF[cO];var cQ=cL[2];if(!(cQ&&!cQ.test(cM))){if(cW=cY.match(cL[1])){cV=cW[0];cN=cL[0];break}}}if(!cV){cN=b2;cV=cY.substring(0,1)}}var cP=b3===cN.substring(0,5);if(cP&&!(cW&&cW[1])){cP=false;cN=b4}if(cP){var cX=cW[1],cR=cV.indexOf(cX),c0=cR+cX.length,c1=cN.substring(5);j.hasOwnProperty(c1)||(c1=/^\s*</.test(cX)?b5:b6);D(cZ+cT,cV.substring(0,cR),cJ,cS);D(cZ+cT+cR,cV.substring(cR,c0),j[c1],cS);D(cZ+cT+c0,cV.substring(c0),cJ,cS)}else{cS.push(cZ+cT,cN)}cT+=cV.length;cY=cY.substring(cV.length);if(cN!==bV&&cK.test(cV)){cM=cV}}return cS};return cJ}var C=cB([],[[b2,/^[^<?]+/,cl],[bQ,/^<!\w[^>]*(?:>|$)/,cl],[bV,/^<!--[\s\S]*?(?:--\>|$)/,cl],[b3,/^<\?([\s\S]+?)(?:\?>|$)/,cl],[b3,/^<%([\s\S]+?)(?:%>|$)/,cl],[bW,/^(?:<[%?]|[%?]>)/,cl],[b3,/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i,cl],[bR,/^<script\b[^>]*>([\s\S]+?)<\/script\b[^>]*>/i,cl],[bS,/^<style\b[^>]*>([\s\S]+?)<\/style\b[^>]*>/i,cl],[bX,/^<\/?\w[^<>]*>/,cl]]),cu=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function H(cH){var cG=C(cH);for(var cJ=0;cJ<cG.length;cJ+=2){if(cG[cJ+1]===b4){var cI,cL;cI=cG[cJ];cL=cJ+2<cG.length?cG[cJ+2]:cH.length;var cK=cH.substring(cI,cL),cF=cK.match(cu);if(cF){cG.splice(cJ,2,cI,bX,cI+cF[1].length,b4,cI+cF[1].length+(cF[2]||b1).length,bX)}}}return cG}var I=cB([[bY,/^\'[^\']*(?:\'|$)/,cl,ao],[bY,/^\"[^\"]*(?:\"|$)/,cl,b8],[bW,/^[<>\/=]+/,cl,al]],[[bX,/^[\w:\-]+/,/^</],[bY,/^[\w\-]+/,/^=/],[bZ,/^[\w:\-]+/,cl],[b2,/^\s+/,cl,am]]);function L(cH,cG){for(var cJ=0;cJ<cG.length;cJ+=2){var cI=cG[cJ+1];if(cI===bX){var cM,cK;cM=cG[cJ];cK=cJ+2<cG.length?cG[cJ+2]:cH.length;var cF=cH.substring(cM,cK),cL=I(cF,cM);cv(cL,cG,cJ,2);cJ+=cL.length-2}}return cG}function n(cH){var cG=[],cJ=[];if(cH.tripleQuotedStrings){cG.push([b0,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,cl,J])}else{cH.multiLineStrings?cG.push([b0,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,cl,K]):cG.push([b0,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,cl,Q])}cJ.push([b2,/^(?:[^\'\"\`\/\#]+)/,cl,R]);cH.hashComments&&cG.push([bV,/^#[^\r\n]*/,cl,cg]);if(cH.cStyleComments){cJ.push([bV,/^\/\/[^\r\n]*/,cl]);cJ.push([bV,/^\/\*[\s\S]*?(?:\*\/|$)/,cl])}cH.regexLiterals&&cJ.push([b0,/^\/(?=[^\/*])(?:[^\/\x5B\x5C]|\x5C[\s\S]|\x5B(?:[^\x5C\x5D]|\x5C[\s\S])*(?:\x5D|$))+(?:\/|$)/,Y]);var cI=z(cH.keywords),cL=cB(cG,cJ),cK=cB([],[[b2,/^\s+/,cl,R],[b2,/^[a-z_$@][a-z_$@0-9]*/i,cl],[bT,/^0x[a-f0-9]+[a-z]/i,cl],[bT,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i,cl,Z],[bW,/^[^\s\w\.$@]+/,cl]]);function cF(cZ,cT){for(var cN=0;cN<cT.length;cN+=2){var cU=cT[cN+1];if(cU===b2){var cY,cO,cV,cW;cY=cT[cN];cO=cN+2<cT.length?cT[cN+2]:cZ.length;cV=cZ.substring(cY,cO);cW=cK(cV,cY);for(var cM=0,cP=cW.length;cM<cP;cM+=2){var cR=cW[cM+1];if(cR===b2){var cQ=cW[cM],cX=cM+2<cP?cW[cM+2]:cV.length,cS=cZ.substring(cQ,cX);if(cS===aa){cW[cM+1]=bW}else{if(cS in cI){cW[cM+1]=ad}else{if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(cS)){cW[cM+1]=cS.charAt(0)===h?bT:ae}}}}}cv(cW,cT,cN,2);cN+=cW.length-2}}return cT}return function(cN){var cM=cL(cN);return cM=cF(cN,cM)}}var cy=n({keywords:v,hashComments:cn,cStyleComments:cn,multiLineStrings:cn,regexLiterals:cn});function M(cP,cO){var cR=false;for(var cQ=0;cQ<cO.length;cQ+=2){var cU=cO[cQ+1],cS,cK;if(cU===bZ){cS=cO[cQ];cK=cQ+2<cO.length?cO[cQ+2]:cP.length;cR=/^on|^style$/i.test(cP.substring(cS,cK))}else{if(cU===bY){if(cR){cS=cO[cQ];cK=cQ+2<cO.length?cO[cQ+2]:cP.length;var cT=cP.substring(cS,cK),cI=cT.length,cG=cI>=2&&/^[\"\']/.test(cT)&&cT.charAt(0)===cT.charAt(cI-1),cJ,cN,cH;if(cG){cN=cS+1;cH=cK-1;cJ=cT}else{cN=cS+1;cH=cK-1;cJ=cT.substring(1,cT.length-1)}var cL=cy(cJ);for(var cM=0,cF=cL.length;cM<cF;cM+=2){cL[cM]+=cN}if(cG){cL.push(cH,bY);cv(cL,cO,cQ+2,0)}else{cv(cL,cO,cQ,2)}}cR=false}}}return cO}function N(cG){var cF=H(cG);cF=L(cG,cF);return cF=M(cG,cF)}function cq(cQ,cP,cS){var cR=[],cV=0,cT=cl,cL=cl,cU=0,cJ=0,cG=P(window.PR_TAB_WIDTH),cK=/([\r\n ]) /g,cO=/(^| ) /gm,cH=/\r\n?|\n/g,cM=/[ \r\n]$/,cN=cn;function cF(cW){if(cW>cV){if(cT&&cT!==cL){cR.push(bU);cT=cl}if(!cT&&cL){cT=cL;cR.push(w,cT,y)}var cX=ct(cG(cQ.substring(cV,cW))).replace(cN?cO:cK,bt);cN=cM.test(cX);cR.push(cX.replace(cH,bl));cV=cW}}while(cn){var cI;if(cI=cU<cP.length?cJ<cS.length?cP[cU]<=cS[cJ]:cn:false){cF(cP[cU]);if(cT){cR.push(bU);cT=cl}cR.push(cP[cU+1]);cU+=2}else{if(cJ<cS.length){cF(cS[cJ]);cL=cS[cJ+1];cJ+=2}else{break}}}cF(cQ.length);cT&&cR.push(bU);return cR.join(b1)}var j={};function cp(cG,cF){for(var cI=cF.length;--cI>=0;){var cH=cF[cI];if(j.hasOwnProperty(cH)){bm in window&&console.log(bn,cH)}else{j[cH]=cG}}}cp(cy,[b6]);cp(N,[b5,bo,bp,bq,br,bd,be]);cp(n({keywords:bf,hashComments:cn,cStyleComments:cn}),[bg,bh,bi,bj,bk,a2]);cp(n({keywords:a3,hashComments:cn,cStyleComments:cn}),[a4]);cp(n({keywords:a5,cStyleComments:cn}),[a6]);cp(n({keywords:a7,hashComments:cn,multiLineStrings:cn}),[a8,a9,aU]);cp(n({keywords:bK,hashComments:cn,multiLineStrings:cn,tripleQuotedStrings:cn}),[bL,bD]);cp(n({keywords:bE,hashComments:cn,multiLineStrings:cn,regexLiterals:cn}),[bF,bG,bH]);cp(n({keywords:bI,hashComments:cn,multiLineStrings:cn,regexLiterals:cn}),[bJ]);cp(n({keywords:bv,cStyleComments:cn,regexLiterals:cn}),[bw]);function cz(cH,cG){try{var cJ=W(cH),cI=cJ.source,cL=cJ.tags;j.hasOwnProperty(cG)||(cG=/^\s*</.test(cI)?b5:b6);var cK=j[cG].call({},cI);return cq(cI,cL,cK)}catch(cF){if(bm in window){console.log(cF);console.a()}return cH}}function cr(cI){var cH=window._pr_isIE6(),cK=[document.getElementsByTagName(bx),document.getElementsByTagName(by),document.getElementsByTagName(bz)],cJ=[];for(var cN=0;cN<cK.length;++cN){for(var cL=0,cG=cK[cN].length;cL<cG;++cL){cJ.push(cK[cN][cL])}}var cM=0;function cF(){var cP=window.PR_SHOULD_USE_CONTINUATION?(new Date).getTime()+250:Infinity;for(;cM<cJ.length&&(new Date).getTime()<cP;cM++){var cV=cJ[cM];if(cV.className&&cV.className.indexOf(bA)>=0){var cY=cV.className.match(/\blang-(\w+)\b/);if(cY){cY=cY[1]}var cQ=false;for(var cW=cV.parentNode;cW;cW=cW.parentNode){if((cW.tagName===bx||cW.tagName===by||cW.tagName===bz)&&cW.className&&cW.className.indexOf(bA)>=0){cQ=cn;break}}if(!cQ){var cX=O(cV);cX=cX.replace(/(?:\r\n?|\n)$/,b1);var cO=cz(cX,cY);if(cE(cV)){var cR=document.createElement(b9);for(var cT=0;cT<cV.attributes.length;++cT){var cS=cV.attributes[cT];if(cS.specified){var cZ=cS.name.toLowerCase();if(cZ===bB){cR.className=cS.value}else{cR.setAttribute(cS.name,cS.value)}}}cR.innerHTML=cO;cV.parentNode.replaceChild(cR,cV);cV=cR}else{cV.innerHTML=cO}if(cH&&cV.tagName===b9){var cU=cV.getElementsByTagName(bC);for(var c0=cU.length;--c0>=0;){var c1=cU[c0];c1.parentNode.replaceChild(document.createTextNode(bu),c1)}}}}}if(cM<cJ.length){setTimeout(cF,250)}else{cI&&cI()}}cF()}window.PR_normalizedHtml=cw;window.prettyPrintOne=cz;window.prettyPrint=cr;window.PR={createSimpleLexer:cB,registerLangHandler:cp,sourceDecorator:n,PR_ATTRIB_NAME:bZ,PR_ATTRIB_VALUE:bY,PR_COMMENT:bV,PR_DECLARATION:bQ,PR_KEYWORD:ad,PR_LITERAL:bT,PR_NOCODE:bO,PR_PLAIN:b2,PR_PUNCTUATION:bW,PR_SOURCE:b4,PR_STRING:b0,PR_TAG:bX,PR_TYPE:ae}})()})();String.prototype.nl2br=function(){var a=escape(this);if(a.indexOf("%0D%0A")>-1){re_nlchar=/%0D%0A/g}else{if(a.indexOf("%0A")>-1){re_nlchar=/%0A/g}else{if(a.indexOf("%0D")>-1){re_nlchar=/%0D/g}else{return unescape(a)}}}return unescape(a.replace(re_nlchar,"<br />"))};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"")};String.prototype.chop=function(a){return(this.length>a)?(this.substring(0,a)+"..."):this};String.prototype.escapeAngles=function(){return this.replace(/>/g,"&gt;").replace(/</g,"&lt;")};String.prototype.coalesce=function(a){return this==""?a:this};function refreshGravatar(){var a=$("#email").attr("value");if(a!=null&&a.length>0){a=a.toLowerCase().trim();var c=hex_md5(a);var b="http://www.gravatar.com/avatar/"+c+".jpg?size=50";$("#gravatarpreview").attr("src",b).show()}else{$("#gravatarpreview").hide()}}function enableGravatarLookup(){$("#email").blur(function(){refreshGravatar()})}function scrollToValidationFailure(){if($(".validation-failure:first").size()>0){$.scrollTo(".validation-failure:first")}}function enablePrettyPrinting(){$("pre").each(function(){$(this).attr("class","prettyprint")});prettyPrint()}function enableValidation(){$("form").each(function(){$(this).validate()})}function enablePrettyDates(){$("span.date").each(function(){var b=$(this).html();var g=new Date(Date.parse(b));var e=g.getTime();var a=g.getTimezoneOffset()*60000;var f=new Date(e-(a));var d=prettyDate(f);if(d==undefined){var c=Date.Format(f,"dd MMM, yyyy");a/360000;$(this).html(c)}else{$(this).html(d)}})}var changes=0;function enableChangeDetection(){$(".promptBeforeUnload input").click(function(){changes++});$(".promptBeforeUnload textarea").click(function(){changes++});$("input[type=submit]").click(function(){changes=0});window.onbeforeunload=function(){if(changes>0){return"Navigating away will lose the unsaved changes you have made."}}}$.expr[":"].external=function(a){return !a.href.match(/^mailto\:/)&&!(a.hostname==location.hostname||a.hostname.match(/paulstovell/))};function enableNewWindowLinks(){$(".content a:external").not(".comment-author a").addClass("new-window");$("a.new-window").click(function(){window.open(this.href);return false})}function enableTextLengthCounters(){$("input.restricted-length").each(function(){$(this).after("<span class='counter'>"+($(this).attr("maxlength")-$(this).attr("value").length)+"</span>")}).keyup(function(){var b=$(this).next(".counter");var a=$(this).attr("maxlength")-$(this).attr("value").length;if(a<=5){b.addClass("close")}else{b.removeClass("close")}b.text(a)})}$(document).ready(function(){scrollToValidationFailure();enableGravatarLookup();refreshGravatar();enablePrettyPrinting();enableValidation();enablePrettyDates();enableNewWindowLinks();if($("#wmd-input").size()>0){initializeWmd()}enableChangeDetection();enableTextLengthCounters()});vbGeneralDate=0;vbLongDate=1;vbShortDate=2;vbLongTime=3;vbShortTime=4;vbUseSystemDayOfWeek=0;vbSunday=1;vbMonday=2;vbTuesday=3;vbWednesday=4;vbThursday=5;vbFriday=6;vbSaturday=7;vbUseSystem=0;vbFirstJan1=1;vbFirstFourDays=2;vbFirstFullWeek=3;Date.MonthNames=[null,"January","February","March","April","May","June","July","August","September","October","November","December"];Date.WeekdayNames=[null,"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.IsDate=function(a){return !isNaN(new Date(a))};Date.CDate=function(d){if(Date.IsDate(d)){return new Date(d)}var e=d.replace(/\-/g,"/").replace(/\./g,"/").replace(/ /g,"/");e=e.replace(/pm$/i," pm").replace(/am$/i," am");if(Date.IsDate(e)){return new Date(e)}var c=e+"/"+new Date().getFullYear();if(Date.IsDate(c)){return new Date(c)}if(e.indexOf(":")){var a=e.replace(/ /,"/"+new Date().getFullYear()+" ");if(Date.IsDate(a)){return new Date(a)}var b=new Date().toDateString()+" "+d;if(Date.IsDate(b)){return new Date(b)}}return false};Date.DateAdd=function(c,d,b){if(!Date.CDate(b)){return"invalid date: '"+b+"'"}if(isNaN(d)){return"invalid number: '"+d+"'"}d=new Number(d);var a=Date.CDate(b);switch(c.toLowerCase()){case"yyyy":a.setFullYear(a.getFullYear()+d);break;case"q":a.setMonth(a.getMonth()+(d*3));break;case"m":a.setMonth(a.getMonth()+d);break;case"y":case"d":case"w":a.setDate(a.getDate()+d);break;case"ww":a.setDate(a.getDate()+(d*7));break;case"h":a.setHours(a.getHours()+d);break;case"n":a.setMinutes(a.getMinutes()+d);break;case"s":a.setSeconds(a.getSeconds()+d);break;case"ms":a.setMilliseconds(a.getMilliseconds()+d);break;default:return"invalid interval: '"+c+"'"}return a};Date.DateDiff=function(h,l,r,m){if(!Date.CDate(l)){return"invalid date: '"+l+"'"}if(!Date.CDate(r)){return"invalid date: '"+r+"'"}m=(isNaN(m)||m==0)?vbSunday:parseInt(m);var d=Date.CDate(l);var q=Date.CDate(r);if("h,n,s,ms".indexOf(h.toLowerCase())==-1){if(l.toString().indexOf(":")==-1){d.setUTCHours(0,0,0,0)}if(r.toString().indexOf(":")==-1){q.setUTCHours(0,0,0,0)}}var g=q.valueOf()-d.valueOf();var o=new Date(g);var j=q.getUTCFullYear()-d.getUTCFullYear();var f=q.getUTCMonth()-d.getUTCMonth()+(j!=0?j*12:0);var k=parseInt(f/3);var i=g;var a=parseInt(g/1000);var p=parseInt(a/60);var n=parseInt(p/60);var s=parseInt(n/24);var e=parseInt(s/7);if(h.toLowerCase()=="ww"){var b=Date.DatePart("w",d,m)-1;if(b){d.setDate(d.getDate()+7-b)}var b=Date.DatePart("w",q,m)-1;if(b){q.setDate(q.getDate()-b)}var c=Date.DateDiff("w",d,q)+1}switch(h.toLowerCase()){case"yyyy":return j;case"q":return k;case"m":return f;case"y":case"d":return s;case"w":return e;case"ww":return c;case"h":return n;case"n":return p;case"s":return a;case"ms":return i;default:return"invalid interval: '"+h+"'"}};Date.DatePart=function(b,c,d){if(!Date.CDate(c)){return"invalid date: '"+c+"'"}var a=Date.CDate(c);switch(b.toLowerCase()){case"yyyy":return a.getFullYear();case"q":return parseInt(a.getMonth()/3)+1;case"m":return a.getMonth()+1;case"y":return Date.DateDiff("y","1/1/"+a.getFullYear(),a)+1;case"d":return a.getDate();case"w":return Date.Weekday(a.getDay()+1,d);case"ww":return Date.DateDiff("ww","1/1/"+a.getFullYear(),a,d)+1;case"h":return a.getHours();case"n":return a.getMinutes();case"s":return a.getSeconds();case"ms":return a.getMilliseconds();default:return"invalid interval: '"+b+"'"}};Date.MonthName=function(b,a){if(isNaN(b)){if(!Date.CDate(b)){return"invalid month: '"+b+"'"}b=DatePart("m",Date.CDate(b))}var c=Date.MonthNames[b];if(a==true){c=c.substring(0,3)}return c};Date.WeekdayName=function(d,b,e){if(isNaN(d)){if(!Date.CDate(d)){return"invalid weekday: '"+d+"'"}d=DatePart("w",Date.CDate(d))}e=(isNaN(e)||e==0)?vbSunday:parseInt(e);var c=((e-1+parseInt(d)-1+7)%7)+1;var a=Date.WeekdayNames[c];if(b==true){a=a.substring(0,3)}return a};Date.Weekday=function(a,b){b=(isNaN(b)||b==0)?vbSunday:parseInt(b);return((parseInt(a)-b+7)%7)+1};Date.FormatDateTime=function(c,b){if(c.toUpperCase().substring(0,3)=="NOW"){c=new Date()}if(!Date.CDate(c)){return"invalid date: '"+c+"'"}if(isNaN(b)){b=vbGeneralDate}var a=Date.CDate(c);switch(parseInt(b)){case vbGeneralDate:return a.toString();case vbLongDate:return Format(c,"DDDD, MMMM D, YYYY");case vbShortDate:return Format(c,"MM/DD/YYYY");case vbLongTime:return a.toLocaleTimeString();case vbShortTime:return Format(c,"HH:MM:SS");default:return"invalid NamedFormat: '"+b+"'"}};Date.Format=function(b,a,g,j){if(!Date.CDate(b)){return"invalid date: '"+b+"'"}if(!a||a==""){return c.toString()}var c=Date.CDate(b);this.pad=function(l){if(l.toString().length==1){l="0"+l}return l};var e=c.getHours()>=12?"PM":"AM";var d=c.getHours();if(d==0){d=12}if(d>12){d-=12}var h=d+":"+this.pad(c.getMinutes())+":"+this.pad(c.getSeconds())+" "+e;var k=(c.getMonth()+1)+"/"+c.getDate()+"/"+new String(c.getFullYear()).substring(2,4);var f=Date.MonthName(c.getMonth()+1)+" "+c.getDate()+", "+c.getFullYear();var i=a;i=i.replace(new RegExp("C","gi"),"CCCC");i=i.replace(new RegExp("mmmm","gi"),"XXXX");i=i.replace(new RegExp("mmm","gi"),"XXX");i=i.replace(new RegExp("dddddd","gi"),"AAAAAA");i=i.replace(new RegExp("ddddd","gi"),"AAAAA");i=i.replace(new RegExp("dddd","gi"),"AAAA");i=i.replace(new RegExp("ddd","gi"),"AAA");i=i.replace(new RegExp("timezone","gi"),"ZZZZ");i=i.replace(new RegExp("time24","gi"),"TTTT");i=i.replace(new RegExp("time","gi"),"TTT");i=i.replace(new RegExp("yyyy","gi"),c.getFullYear());i=i.replace(new RegExp("yy","gi"),new String(c.getFullYear()).substring(2,4));i=i.replace(new RegExp("y","gi"),Date.DatePart("y",c));i=i.replace(new RegExp("q","gi"),Date.DatePart("q",c));i=i.replace(new RegExp("mm","gi"),(c.getMonth()+1));i=i.replace(new RegExp("m","gi"),(c.getMonth()+1));i=i.replace(new RegExp("dd","gi"),this.pad(c.getDate()));i=i.replace(new RegExp("d","gi"),c.getDate());i=i.replace(new RegExp("hh","gi"),this.pad(c.getHours()));i=i.replace(new RegExp("h","gi"),c.getHours());i=i.replace(new RegExp("nn","gi"),this.pad(c.getMinutes()));i=i.replace(new RegExp("n","gi"),c.getMinutes());i=i.replace(new RegExp("ss","gi"),this.pad(c.getSeconds()));i=i.replace(new RegExp("s","gi"),c.getSeconds());i=i.replace(new RegExp("t t t t t","gi"),h);i=i.replace(new RegExp("am/pm","g"),c.getHours()>=12?"pm":"am");i=i.replace(new RegExp("AM/PM","g"),c.getHours()>=12?"PM":"AM");i=i.replace(new RegExp("a/p","g"),c.getHours()>=12?"p":"a");i=i.replace(new RegExp("A/P","g"),c.getHours()>=12?"P":"A");i=i.replace(new RegExp("AMPM","g"),c.getHours()>=12?"pm":"am");i=i.replace(new RegExp("XXXX","gi"),Date.MonthName(c.getMonth()+1,false));i=i.replace(new RegExp("XXX","gi"),Date.MonthName(c.getMonth()+1,true));i=i.replace(new RegExp("AAAAAA","gi"),f);i=i.replace(new RegExp("AAAAA","gi"),k);i=i.replace(new RegExp("AAAA","gi"),Date.WeekdayName(c.getDay()+1,false,g));i=i.replace(new RegExp("AAA","gi"),Date.WeekdayName(c.getDay()+1,true,g));i=i.replace(new RegExp("TTTT","gi"),c.getHours()+":"+this.pad(c.getMinutes()));i=i.replace(new RegExp("TTT","gi"),d+":"+this.pad(c.getMinutes())+" "+e);i=i.replace(new RegExp("CCCC","gi"),k+" "+h);tz=c.getTimezoneOffset();timezone=(tz<0)?("GMT-"+tz/60):(tz==0)?("GMT"):("GMT+"+tz/60);i=i.replace(new RegExp("ZZZZ","gi"),timezone);return i};IsDate=Date.IsDate;CDate=Date.CDate;DateAdd=Date.DateAdd;DateDiff=Date.DateDiff;DatePart=Date.DatePart;MonthName=Date.MonthName;WeekdayName=Date.WeekdayName;Weekday=Date.Weekday;FormatDateTime=Date.FormatDateTime;Format=Date.Format;function prettyDate(c){var a=(((new Date()).getTime()-c.getTime())/1000);var b=Math.floor(a/86400);if(isNaN(b)||b<0||b>=31){return}return b==0&&(a<60&&"Just now"||a<120&&"1 minute ago"||a<3600&&Math.floor(a/60)+" minutes ago"||a<7200&&"1 hour ago"||a<86400&&Math.floor(a/3600)+" hours ago")||b==1&&"Yesterday"||b<7&&b+" days ago"||b<31&&Math.ceil(b/7)+" weeks ago"};