/* 
 * Copyright (c) 2010 Digital Fulcrum, LLC
 *  
 * Unless other rights have been explicitly granted by the copyright holder, this 
 * work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Generic
 *
 * http://creativecommons.org/licenses/by-nc-nd/3.0/
 * 
 *
 */
if(window==window.top)window.ghostwriter=function(){function p(a,b){if(!B||!e){B=p.htmlstreamparser;e=p.domtree;p.fh.set()}b=b||{};if(k){p.running=true;w[w.length]=[a,b];return false}else p.running=false;if(typeof a=="string")a=s.getElementById(a);if(!a)throw Error("Unable to find element "+a+"\nUsage: docwrite(element|elementid, options);");return new i(a,b)}function i(a,b){function c(q){x.parse(q)}function f(q){D--;K&&K.parentNode&&K.parentNode===g&&g.removeChild(K);if(L.length>0){T(F);F=L.shift();
U(F);j(F,f);D++;v.reset();A(F)}else if(z&&!q){p.currload=f;K=s.createElement("SCRIPT");K.text="ghostwriter.currload(true)";K.type="text/javascript";D++;g.appendChild(K)}else if(D<=0&&N){p.currload=m;u()}}function n(q){if(q){var E=!l&&!q.src&&q.text,P=E&&"text"in q?q.text:"";if(q.defer){v.close();return q}if(typeof q=="function"){q();f(false)}else if(E){q.setAttribute("type","any");q.removeAttribute("language");v.close();try{o.eval(P)}catch(Q){O("error running script "+P+" ... "+Q.message)}D++;f(false)}else if(D&&
q.src){L[L.length]=q;v.close("script",false)}else{U(q);D++;j(q,f);F=q;v.close()}return q}}function u(){T(F);s.write=C;s.writeln=I;typeof b.done=="function"&&b.done(a);k=false;V(b.G);w.length>0&&p.apply(o,w.shift());return true}var A=H(a,b.insertType),J=p.domelement,v=new e(A),x=new B({chars:function(q){v.j(q)},start:function(q,E,P){q=q.toLowerCase();for(var Q={},R=0,W=E.length,S=E[R];R<W;S=E[++R])Q[S.name]=S.value;E=Q;if("src"in E)E.src=r(E.src);else if("name"in E&&E.name=="movie")E.value=r(E.value);
v.add(q,E);P&&v.close(q)},end:function(q){q.toLowerCase()=="script"?n(v.a.element):v.close(q)}}),C=s.write,I=s.writeln,D=0,F=y(b.script),L=[],G=null,N=false;G=p.handlers;var M=b.handlers||G,X=M.begin||G.begin||new Function,V=M.end||G.end||new Function,U=M.startscript||G.startscript||new Function,T=M.finishscript||G.finishscript||new Function;s.write=c;s.writeln=function(q){c(q+"\n")};k=true;if("tagName"in F){G=J("script",{});G.b=false;G.element=F;G.parentNode=v.a;v.a=G}X(b.script);n(F);N=true;D||
u();var K=null}function r(a){a=a.replace(t,"&");if(a.indexOf("file:")===0)return a.replace("file","http");else if(a.indexOf("//")===0)return"http:"+a;return a}function H(a,b){var c=b in d?d[b]:d.append;return function(f){c(a,f)}}function y(a){if(typeof a=="function"||typeof a=="object"&&"nodeType"in a&&"tagName"in a&&a.tagName=="SCRIPT")return a;var b=s.createElement("SCRIPT");if(typeof a=="string")a={src:a};for(var c in a){if(c=="text"||c=="innerText")b.text=a[c];if(typeof a[c]!="object")b[c]=a[c]}return b}
function j(a,b){function c(f){f.type=="error"&&O("uh oh ... script "+a.src+" finished shamefully");if(!(f.type=="readystatechange"&&a.readyState&&a.readyState!="complete"&&a.readyState!="loaded")){if(a.detachEvent){a.detachEvent("onreadystatechange",arguments.callee);a.detachEvent("onerror",arguments.callee)}else if(a.removeEventListener){a.removeEventListener("load",arguments.callee,false);a.removeEventListener("error",arguments.callee,false)}else a.onload=a.onerror=null;b()}}if(a.attachEvent){a.attachEvent("onreadystatechange",
c);a.attachEvent("onerror",c)}else if(a.addEventListener){a.addEventListener("load",c,false);a.addEventListener("error",c,false)}else{a.onload=c;a.onerror=c}}var s=document,o=window,g=s.getElementsByTagName("HEAD")[0],h=navigator.userAgent,l=h.indexOf("MSIE")>-1,z=!l&&h.indexOf("Gecko/")>-1,w=[],k=false,m=new Function,B,e,t=RegExp("&amp;","gi"),d={append:function(a,b){a.appendChild(b)},before:function(a,b){var c=a.parentNode||c;c&&c.insertBefore(b,a)},after:function(a,b){var c=a.parentNode,f=a.nextSibling;
f?c.insertBefore(b,f):c.appendChild(b)}};p.F=w;p.handlers={};return p}();function O(p){if(typeof Y=="object"&&typeof Y.log=="function")Y.log(p);else typeof console=="object"&&"log"in console&&console.log(p)}window.flog=O;
window.ghostwriter.flushloadhandlers=window.ghostwriter.fh=function(){function p(){var a,b;if(typeof Element=="object"&&typeof Element.prototype=="object"&&Element.prototype.doScroll)b=Element.prototype;else if(y.documentElement&&y.documentElement.doScroll)b=y.documentElement;if(b){a=b.doScroll;b.doScroll=new Function("throw new Error;");return function(){b.doScroll=function(c){a.call(this,c)}}}else return new Function}function i(a){a=a&&a in h?a:"";l=j.onload||l;j.onload=null;if(l){var b="load";
h[b][j].push(l);l=null}for(var c in h)if(!(a&&a!=c)){var f=h[c],n=0,u=null,A=s[c];for(var J in f){u=A[n++];var v=o[c][J],x=f[J],C;if(v)for(;C=x.shift();)try{C.call(u,v)}catch(I){O("error running callback: "+C+"\n"+I.message)}}if(a)break}z=true;k()}function r(a,b){var c=o,f=h;return function(n){var u=a.readyState;if(!(b=="onreadystatechange"&&u!="complete"&&u!="loaded")){c[b][a]=n;f[b][this].length&&z&&i(b)}}}function H(a,b){if(a in o&&a in h&&this in h[a]){h[a][this].push(b);this in o[a]&&z&&setTimeout(i,
0)}else arguments.length>2?this.f(a,b,arguments[2]):this.f(a,b)}var y=document,j=window,s={n:[y],onreadystatechange:false,load:[j],onload:false},o={n:[y,j],onreadystatechange:false,load:[j],onload:false},g=[j,y],h={},l=j.onload,z=false,w=false,k=new Function;i.set=function(){if(w)return false;for(var a=0,b=g.length;a<b;a++){var c=g[a];if(c.addEventListener){c.f=c.addEventListener;c.addEventListener=H}else if(c.attachEvent){c.f=c.attachEvent;c.attachEvent=H}}k=p();w=true};for(var m in o)if(o[m])for(var B=
o[m],e=0,t=B.length,d=B[e];e<t;d=B[++e]){h[m]=h[m]||{};h[m][d]=h[m][d]||[];if(d.addEventListener)d.addEventListener(m,r(d,m),false);else d.attachEvent&&d.attachEvent(m,r(d,m))}j.onload=null;return i}();
window.ghostwriter.domtree=function(){function p(j){document.body.appendChild(j)}function i(j){y=y||H.domelement;var s=this;this.l=typeof j=="function"?j:p;this.a={tagName:null,appendChild:function(o){s.elements.push(o);s.l(o);return this},close:function(){return this},parentNode:null,ready:function(){return true}};this.a.parentNode=this.a;this.D=null;this.elements=[];this.c=0}var r={html:false,head:false,body:false,noscript:true,noembed:true,title:true,meta:true},H=window.ghostwriter,y;i.prototype=
{j:function(j){j=y("",j);this.c||this.a.appendChild(j.element);return this},add:function(j,s){s=typeof s=="undefined"?{}:s;if(j in r){r[j]&&this.c++;return this}else if(this.c)return this;var o=this.a,g=this.a=y(j,s);g.parentNode=o;g.ready()&&o.appendChild(g.element);return this},reset:function(){for(;this.a!=this.a.parentNode;)this.a=this.a.parentNode;this.c=0;return this},close:function(j,s){j=j||"";j=j.toLowerCase();if(s==null)s=true;if(j&&j in r&&r[j]&&this.c){this.c--;return this}else if(j&&
j in r)return this;else if(this.c)return this;var o=this.a.ready(),g=o||this.a.close()&&this.a.ready();this.a=this.a.parentNode;if(!g)throw Error("attempting to close tag that is not ready");if(s&&!o)if(this.a)try{this.a.appendChild(g)}catch(h){O(h.message)}else this.l(g);return this}};i.prototype.addText=i.prototype.j;i.prototype.add=i.prototype.add;i.prototype.close=i.prototype.close;return i}();
window.ghostwriter.domelement=function(){function p(g,h){this.element=r.createTextNode(h);this.b=true;return this}function i(g,h){if(H==this)return new i(g,h);if(!g)return this;var l=h.src;l&&delete h.src;this.tagName=g.toUpperCase();this.element=this.create(g,h);l&&this.setAttribute("src",l);this.b=g in s?s[g]:true;return this}var r=document,H=window,y=navigator.userAgent,j=y.indexOf("MSIE")>-1?true:false;y=y.indexOf("WebKit")>-1?true:false;var s={style:false,script:false},o={};i.prototype={setAttribute:function(g,
h){return this.element.setAttribute(g,h)},appendChild:function(g){var h=this.element;if("canHaveChildren"in h&&!h.canHaveChildren){g="data"in g?g.data:g.textContent;if(!g)return false;h.text+=g}else h.appendChild(g);return this},s:function(){return this.b?this.element:false},close:function(){this.b=true;return this.element},create:function(){var g=j?function(h,l){var z=["<"+h];for(var w in l)z[z.length]=w+'="'+l[w]+'"';z[z.length]=">";return r.createElement(z.join(" "))}:function(h,l){var z=r.createElement(h);
for(var w in l)z.setAttribute(w,l[w]);return z};return function(h,l){h=h.toLowerCase();l=typeof l=="object"?l:{};return g.call(this,h,l)}}()};i.prototype.setAttribute=i.prototype.setAttribute;i.prototype.appendChild=i.prototype.appendChild;i.prototype.ready=i.prototype.s;i.prototype.close=i.prototype.close;i.prototype.create=i.prototype.create;o.link=function(){var g={};return function(h,l){if(l.href&&l.href in g)return new p("","");g[l.href]=true;return new i(h,l)}}();p.prototype=new i;o[""]=p;j&&
function(){function g(){i.apply(this,arguments);return this}function h(k,m){this.h="";this.o=m;this.b=false;return this}function l(){i.apply(this,arguments);this.b=false;return this}l.prototype=new i;h.prototype=new i;g.prototype=new i;g.prototype.appendChild=function(k){if(k.tagName=="TBODY"){this.e=k;this.element.appendChild(k);return this}else if(!this.e){this.e=document.createElement("TBODY");this.element.appendChild(this.e)}this.e.appendChild(k);return this};h.prototype.create=function(k,m){return m};
h.prototype.appendChild=function(k){if(k="data"in k?k.data:k.text)this.h+=k};h.prototype.close=function(){var k="STYLE",m=["<span>&nbsp;</span><"+k],B=r.getElementsByTagName("HEAD")[0];return function(){var e=this.o,t=m.slice(),d=r.createElement("DIV");for(var a in e)t[t.length]=[a,'"'+e[a]+'"'].join("=");t[t.length]=[">",this.h,"</",k,">"].join("");d.innerHTML=t.join(" ");e=this.element=d.lastChild;e=e.styleSheet.imports;t=0;for(d=e.length;t<d;t++){a=(new i("LINK",{href:e[t].href.replace(m,""),type:"text/css",
rel:"stylesheet"})).close();B.appendChild(a)}this.b=true;return this.element}}();var z={setAttribute:function(k,m){this.element.i[k]=m},appendChild:function(k){if(!k.tagName)return null;if(k.tagName.toUpperCase()==="PARAM"){var m=k.getAttribute("name"),B=this.element.m;if(m)B[m]=k.getAttribute("value")}return this},close:function(){var k=this.element,m=k.i,B=r.createElement("DIV"),e=["<object"];k=k.m;for(var t in m)e[e.length]=[t,'="',m[t],'"'].join("");e[e.length]=">";for(var d in k)e[e.length]=
['<PARAM name="',d,'" value="',k[d],'"></PARAM>'].join("");e[e.length]="</object>";B.innerHTML=e.join(" ");this.b=true;return this.element=B.firstChild},create:function(k,m){m.type="application/x-shockwave-flash";return{i:m,m:{}}}};for(var w in z)l.prototype[w]=z[w];o.object=l;o.table=g;o.style=h}();if(y)o.C=function(){function g(){return i.apply(this,arguments)}g.prototype=new i;g.prototype.create=function(){return r.createElement("noscript")};return g}();return function(g,h){g=g.toLowerCase();return g in
o?new o[g](g,h):new i(g,h)}}();
window.ghostwriter.htmlstreamparser=function(){function p(e){e=e||{};this.stack=[];this.g="";this.k=e||{};this.r=0;this.B=-1;for(var t=0,d=k.length,a=k[t];t<d;a=k[++t])a in this.k||(e[a]=new Function)}function i(e){var t={};e=e.split(",");for(var d=0;d<e.length;d++)t[e[d]]=true;return t}var r=/^<(\w+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,H=/^<\/(\w+)[^>]*>/,y={u:/^\s*(<!--).*/,t:"<!--",q:/--[^>]*>/,w:"--\>"},j=/<!\[CDATA\[(.*?)]]\>/g,s=/([\w:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,
o=i("xml,area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),g=i("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),h=i("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var"),l=i("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),
z=i("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),w=i("script,style,iframe"),k="chars,comment,start,end".split(","),m={};p.prototype={parse:function(e){function t(v,x){x=x.replace(y.u,"").replace(j,"$1");u.chars(x);return""}function d(v,x,C,I){x=x.toLowerCase();if(g[x])for(;f.d()&&h[f.d()];)a("",f.d());l[x]&&f.d()==x&&a("",x);(I=o[x]||!!I)||f.push(x.toLowerCase());var D=[];C.replace(s,function(F,L,G,N,M){F=G?G:N?N:M?M:z[L]?L:"";D.push({name:L,
value:F,z:F.replace(/(^|[^\\])"/g,'$1\\"')})});u.start(x,D,I)}function a(v,x){if(x){var C=false,I=f.slice();x=x.toLowerCase();for(var D=f.length-1;D>=0;D--)if(f[D]==x){C=true;break}if(C){f.length=D;for(C=I.length-1;C>=D;C--)u.end(I[C])}}}e=this.g+e;var b,c,f=this.stack,n=e,u=this.k,A="",J=0;this.g="";this.r++;for(f.d=function(){return this[this.length-1]};e;){A=this.stack[this.stack.length-1];c=true;J++;if(!A||!w[A]){if(e.indexOf(y.t)===0){if(b=y.q.exec(e)){if(b[0].length>3)b=b.index+b[0].length-
3;u.comment(e.substring(4,b));e=e.substring(b+3);c=false}}else if(e.indexOf("</")===0){if(b=e.match(H)){e=e.substring(b[0].length);b[0].replace(H,a);c=false}}else if(e.indexOf("<")===0)if(b=e.match(r)){e=e.substring(b[0].length);b[0].replace(r,d);c=false}else e=e.replace(/^<[^>]*>/,"");if(c){b=e.indexOf("<");c=b<0?e:e.substring(0,b);A=A;e=b<0?"":e.substring(b);A in w||(c=B.htmlDecode(c));c.length>0&&u.chars(c)}}else if(e.indexOf("</")>-1&&e.match(RegExp("</"+A+"[^>]*>","i"))){b=e.length;c=m[A]=m[A]||
RegExp("((?:.|\n|\r)*?)</"+A+"[^>]*>","i");e=e.replace(c,t);b>e.length&&a("",A)}if(e==n){this.g=e;return this}n=e}a();return false}};var B=function(){var e="&nbsp;,&iexcl;,&cent;,&pound;,&curren;,&yen;,&brvbar;,&sect;,&uml;,&copy;,&ordf;,&laquo;,&not;,&shy;,&reg;,&macr;,&deg;,&plusmn;,&sup2;,&sup3;,&acute;,&micro;,&para;,&middot;,&cedil;,&sup1;,&ordm;,&raquo;,&frac14;,&frac12;,&frac34;,&iquest;,&agrave;,&aacute;,&acirc;,&atilde;,&Auml;,&aring;,&aelig;,&ccedil;,&egrave;,&eacute;,&ecirc;,&euml;,&igrave;,&iacute;,&icirc;,&iuml;,&eth;,&ntilde;,&ograve;,&oacute;,&ocirc;,&otilde;,&Ouml;,&times;,&oslash;,&ugrave;,&uacute;,&ucirc;,&Uuml;,&yacute;,&thorn;,&szlig;,&agrave;,&aacute;,&acirc;,&atilde;,&auml;,&aring;,&aelig;,&ccedil;,&egrave;,&eacute;,&ecirc;,&euml;,&igrave;,&iacute;,&icirc;,&iuml;,&eth;,&ntilde;,&ograve;,&oacute;,&ocirc;,&otilde;,&ouml;,&divide;,&Oslash;,&ugrave;,&uacute;,&ucirc;,&uuml;,&yacute;,&thorn;,&yuml;,&quot;,&amp;,&lt;,&gt;,&oelig;,&oelig;,&scaron;,&scaron;,&yuml;,&circ;,&tilde;,&ensp;,&emsp;,&thinsp;,&zwnj;,&zwj;,&lrm;,&rlm;,&ndash;,&mdash;,&lsquo;,&rsquo;,&sbquo;,&ldquo;,&rdquo;,&bdquo;,&dagger;,&dagger;,&permil;,&lsaquo;,&rsaquo;,&euro;,&fnof;,&alpha;,&beta;,&gamma;,&delta;,&epsilon;,&zeta;,&eta;,&theta;,&iota;,&kappa;,&lambda;,&mu;,&nu;,&xi;,&omicron;,&pi;,&rho;,&sigma;,&tau;,&upsilon;,&phi;,&chi;,&psi;,&omega;,&alpha;,&beta;,&gamma;,&delta;,&epsilon;,&zeta;,&eta;,&theta;,&iota;,&kappa;,&lambda;,&mu;,&nu;,&xi;,&omicron;,&pi;,&rho;,&sigmaf;,&sigma;,&tau;,&upsilon;,&phi;,&chi;,&psi;,&omega;,&thetasym;,&upsih;,&piv;,&bull;,&hellip;,&prime;,&prime;,&oline;,&frasl;,&weierp;,&image;,&real;,&trade;,&alefsym;,&larr;,&uarr;,&rarr;,&darr;,&harr;,&crarr;,&larr;,&uarr;,&rarr;,&darr;,&harr;,&forall;,&part;,&exist;,&empty;,&nabla;,&isin;,&notin;,&ni;,&prod;,&sum;,&minus;,&lowast;,&radic;,&prop;,&infin;,&ang;,&and;,&or;,&cap;,&cup;,&int;,&there4;,&sim;,&cong;,&asymp;,&ne;,&equiv;,&le;,&ge;,&sub;,&sup;,&nsub;,&sube;,&supe;,&oplus;,&otimes;,&perp;,&sdot;,&lceil;,&rceil;,&lfloor;,&rfloor;,&lang;,&rang;,&loz;,&spades;,&clubs;,&hearts;,&diams;".split(","),
t="&#160;,&#161;,&#162;,&#163;,&#164;,&#165;,&#166;,&#167;,&#168;,&#169;,&#170;,&#171;,&#172;,&#173;,&#174;,&#175;,&#176;,&#177;,&#178;,&#179;,&#180;,&#181;,&#182;,&#183;,&#184;,&#185;,&#186;,&#187;,&#188;,&#189;,&#190;,&#191;,&#192;,&#193;,&#194;,&#195;,&#196;,&#197;,&#198;,&#199;,&#200;,&#201;,&#202;,&#203;,&#204;,&#205;,&#206;,&#207;,&#208;,&#209;,&#210;,&#211;,&#212;,&#213;,&#214;,&#215;,&#216;,&#217;,&#218;,&#219;,&#220;,&#221;,&#222;,&#223;,&#224;,&#225;,&#226;,&#227;,&#228;,&#229;,&#230;,&#231;,&#232;,&#233;,&#234;,&#235;,&#236;,&#237;,&#238;,&#239;,&#240;,&#241;,&#242;,&#243;,&#244;,&#245;,&#246;,&#247;,&#248;,&#249;,&#250;,&#251;,&#252;,&#253;,&#254;,&#255;,&#34;,&#38;,&#60;,&#62;,&#338;,&#339;,&#352;,&#353;,&#376;,&#710;,&#732;,&#8194;,&#8195;,&#8201;,&#8204;,&#8205;,&#8206;,&#8207;,&#8211;,&#8212;,&#8216;,&#8217;,&#8218;,&#8220;,&#8221;,&#8222;,&#8224;,&#8225;,&#8240;,&#8249;,&#8250;,&#8364;,&#402;,&#913;,&#914;,&#915;,&#916;,&#917;,&#918;,&#919;,&#920;,&#921;,&#922;,&#923;,&#924;,&#925;,&#926;,&#927;,&#928;,&#929;,&#931;,&#932;,&#933;,&#934;,&#935;,&#936;,&#937;,&#945;,&#946;,&#947;,&#948;,&#949;,&#950;,&#951;,&#952;,&#953;,&#954;,&#955;,&#956;,&#957;,&#958;,&#959;,&#960;,&#961;,&#962;,&#963;,&#964;,&#965;,&#966;,&#967;,&#968;,&#969;,&#977;,&#978;,&#982;,&#8226;,&#8230;,&#8242;,&#8243;,&#8254;,&#8260;,&#8472;,&#8465;,&#8476;,&#8482;,&#8501;,&#8592;,&#8593;,&#8594;,&#8595;,&#8596;,&#8629;,&#8656;,&#8657;,&#8658;,&#8659;,&#8660;,&#8704;,&#8706;,&#8707;,&#8709;,&#8711;,&#8712;,&#8713;,&#8715;,&#8719;,&#8721;,&#8722;,&#8727;,&#8730;,&#8733;,&#8734;,&#8736;,&#8743;,&#8744;,&#8745;,&#8746;,&#8747;,&#8756;,&#8764;,&#8773;,&#8776;,&#8800;,&#8801;,&#8804;,&#8805;,&#8834;,&#8835;,&#8836;,&#8838;,&#8839;,&#8853;,&#8855;,&#8869;,&#8901;,&#8968;,&#8969;,&#8970;,&#8971;,&#9001;,&#9002;,&#9674;,&#9824;,&#9827;,&#9829;,&#9830;".split(",");
return{EncodeType:"entity",isEmpty:function(d){return d?d===null||d.length==0||/^\s+$/.test(d):true},HTML2Numerical:function(d){return this.swapArrayVals(d,e,t)},NumericalToHTML:function(d){return this.swapArrayVals(d,t,e)},numEncode:function(d){if(this.isEmpty(d))return"";for(var a="",b=0;b<d.length;b++){var c=d.charAt(b);if(c<" "||c>"~")c="&#"+c.charCodeAt()+";";a+=c}return a},htmlDecode:function(d){var a,b,c=d;if(this.isEmpty(c))return"";c=this.HTML2Numerical(c);d=c.match(/&#[0-9]{1,5};/g);if(d!==
null)for(var f=0;f<d.length;f++){b=d[f];a=b.substring(2,b.length-1);c=a>=-32768&&a<=65535?c.replace(b,String.fromCharCode(a)):c.replace(b,"")}return c},htmlEncode:function(d,a){if(this.isEmpty(d))return"";a|=false;if(a)d=this.EncodeType=="numerical"?d.replace(/&/g,"&#38;"):d.replace(/&/g,"&amp;");if(this.v=="numerical"||!a)d=this.HTML2Numerical(d);d=this.numEncode(d);if(!a){d=d.replace(/&#/g,"##AMPHASH##");d=this.EncodeType=="numerical"?d.replace(/&/g,"&#38;"):d.replace(/&/g,"&amp;");d=d.replace(/##AMPHASH##/g,
"&#")}d=d.replace(/&#\d*([^\d;]|$)/g,"$1");a||(d=this.correctEncoding(d));if(this.EncodeType=="entity")d=this.NumericalToHTML(d);return d},correctEncoding:function(d){return d.replace(/(&amp;)(amp;)+/,"$1")},swapArrayVals:function(d,a,b){if(this.isEmpty(d))return"";var c;if(a&&b)if(a.length==b.length)for(var f=0,n=a.length;f<n;f++){c=RegExp(a[f],"g");d=d.replace(c,b[f])}return d}}}();return p}();
window.ghostwriter.loadscripts=function(){function p(){var b=d.shift(),c=(b&&b[0].getAttribute(o)||"").toLowerCase(),f=(b&&b[0].getAttribute(l)||"").toLowerCase();if(b){if(!c||c.indexOf("javascript")>=0||f.indexOf("javascript")>=0)return p();else if(c.indexOf("javascript")<0&&c.indexOf(B)<0){b[0].setAttribute(o,g);b[1].parentNode.replaceChild(b[0],b[1]);return p()}c=i(b[0]);f=b[1];var n={insertType:"before",script:c,done:p},u=b[2];u&&c.setAttribute(k,u);if(c[w]){e[e.length]=[c,f];t=null;return p()}if(f.parentNode===
H){n.A="append";f=f.parentNode}t=c;y(f,n);b.p&&b.p();return false}else{f=r.getElementsByTagName(z)[0];n=0;for(u=e.length;n<u;n++){b=i(e[n][0]);b.removeAttribute(w);c=e[n][1];c.parentNode?c.parentNode.replaceChild(b,c):f.parentNode.insertBefore(b,f)}setTimeout(y.flushloadhandlers,0)}}function i(b){b.className="";var c=r.createElement(z),f=b.attributes,n="";if("cssText"in c.style)c.style.cssText="";for(var u=0,A=f.length;u<A;u++){n=f[u];c.hasAttribute&&c.hasAttribute(n.name)&&c.setAttribute(n.name,
n.value)}c.setAttribute(o,h);c.removeAttribute(l);c.removeAttribute(m);if(b.text)c.text=b.text;return c}var r=document,H=r.getElementsByTagName("HEAD")[0],y=window.ghostwriter,j=r.defaultView,s=j&&j.getComputedStyle?"background-position":"backgroundPositionX",o="type",g="text/html",h="text/javascript",l="language",z="script",w="defer",k="src",m=w+k,B=w+z,e=[],t=null,d=function(b){for(var c=[],f=0,n=b.length;f<n;f++)c[c.length]=b[f][1];return c}(function(){for(var b=r.getElementsByTagName(z),c=r.createTextNode(""),
f=[],n=0;b.length>0;){var u=b[0],A=c.cloneNode(false),J=parseInt,v;v=u;var x=s,C=void 0;if(j&&j.getComputedStyle)C=j.getComputedStyle(v,"").getPropertyValue(x);else if(v.currentStyle)C=v.currentStyle[x];v=C||"";J=J(v.split.call(v," "),10)||0;f[f.length]=[J,[u,A,u.getAttribute(m)||u.getAttribute(k),n]];u.parentNode.replaceChild(A,u);n++}return f}().sort(function(b,c){var f=b[0],n=c[0];if(f==n){f=b[1][3];n=c[1][3];return f<n?-1:1}else return f>n?-1:1}));r.write=r.writeln=new Function("a","flog('ILLEGAL WRITE: ' + a);");
if(r.execCommand)try{r.execCommand("BackgroundImageCache",false,true)}catch(a){}p()};
setTimeout(ghostwriter.loadscripts, 250);
