function closePFLightbox(){for(var a=0;a<document.styleSheets.length;a++){document.styleSheets[a].disabled=false}closePFAds();document.body.style.overflow="auto";return false}function closePFAds(){YAHOO.util.Dom.removeClass("pn-sys-info","page-printing");YAHOO.util.Dom.removeClass("pn-sys-info","generating-pdf");YAHOO.util.Dom.addClass("lb-print-pp","hidden");frames.toolsframe.aardvark.resume();return false}function showPFAds(a){if(a=="print"){YAHOO.util.Dom.removeClass("pn-sys-info","generating-pdf");YAHOO.util.Dom.addClass("pn-sys-info","page-printing");var c=document.createElement("img");c.src="http://www.printfriendly.com/print/lbmark?url="+top.location.href+"&type=print";document.body.appendChild(c)}else{YAHOO.util.Dom.removeClass("pn-sys-info","page-printing");YAHOO.util.Dom.addClass("pn-sys-info","generating-pdf");var d=document.createElement("img");d.src="http://www.printfriendly.com/print/lbmark?url="+top.location.href+"&type=pdf";document.body.appendChild(d)}var b=YAHOO.util.Dom.getXY("pnLightbox");YAHOO.util.Dom.removeClass("lb-print-pp","hidden");YAHOO.util.Dom.setXY("lb-print-pp",[b[0]+50,b[1]+60]);return false}function loadPFAds(){var r=document.createElement("div");r.id="lb-print-pp";YAHOO.util.Dom.addClass(r,"print-confirmation hidden");document.body.appendChild(r);var s=document.createElement("div");YAHOO.util.Dom.addClass(s,"print-confirmation-bg");r.appendChild(s);var c=document.createElement("div");YAHOO.util.Dom.addClass(c,"print-confirmation-data");r.appendChild(c);var u=document.createElement("a");u.href="#";u.title="Close";YAHOO.util.Dom.addClass(u,"btn-close");u.onclick=function(){closePFAds()};c.appendChild(u);var g=document.createElement("div");g.id="pn-sys-info";YAHOO.util.Dom.addClass(g,"system-info");c.appendChild(g);var e=document.createElement("div");YAHOO.util.Dom.addClass(e,"system-info-msg pp");g.appendChild(e);var h=document.createElement("h4");if(document.all){h.innerText="Printing Your Page"}else{h.textContent="Printing Your Page"}e.appendChild(h);var w=document.createElement("p");w.innerHTML="We've sent your page to your printer (<a href='#' onclick='frames.toolsframe.focus();frames.toolsframe.print();return false;'>re-send)";e.appendChild(w);var d=document.createElement("div");YAHOO.util.Dom.addClass(d,"system-info-msg gp");g.appendChild(d);var x=document.createElement("h4");if(document.all){x.innerText="Generating Your PDF"}else{x.textContent="Generating Your PDF"}d.appendChild(x);var f=document.createElement("p");f.innerHTML="Just a sec... a window will appear prompting you to open or save your PDF. This usually takes about 5 to 10 seconds.";d.appendChild(f);var q=document.createElement("div");YAHOO.util.Dom.addClass(q,"our-sponsors clearfix");c.appendChild(q);var y=document.createElement("h4");if(document.all){y.innerText="Our Sponsors"}else{y.textContent="Our Sponsors"}q.appendChild(y);var v=document.createElement("div");YAHOO.util.Dom.addClass(v,"ads-google");q.appendChild(v);var b=document.createElement("iframe");b.height="260px";b.width="100%";b.name="gaiframe";b.id="gaiframe";b.frameBorder="0";b.src="http://www.printfriendly.com/googads";b.style.overflow="hidden";b.scrolling="no";v.appendChild(b);var p=document.createElement("div");YAHOO.util.Dom.addClass(p,"ads-amazon");q.appendChild(p);var n=document.createElement("iframe");n.height="260px";n.width="100%";n.name="aaiframe";n.id="aaiframe";n.frameBorder="0";n.src="http://www.printfriendly.com/amznads";n.style.overflow="hidden";n.scrolling="no";p.appendChild(n);var t=document.createElement("div");YAHOO.util.Dom.addClass(t,"popup-ft");c.appendChild(t);var a=document.createElement("h1");t.appendChild(a);var o=document.createElement("a");o.href="http://www.printfriendly.com";o.title="PrintFriendly. Save paper, save ink, and print nicer documents";o.innerHTML="PrintFriendly. Save paper, save ink, and print nicer documents";a.appendChild(o);return false}function setContentStyles(){var a=document.getElementById("toolsframe").contentWindow.document.getElementById("pf-print-area");if(navigator.userAgent.indexOf("Firefox")==-1&&navigator.userAgent.indexOf("MSIE")==-1){a.style.overflow="auto";a.style.overflowX="hidden"}a.style.maxWidth="800px";a.style.margin="1em auto";a.style.textAlign="left";a.style.lineHeight="120%";a.style.color="#222";a.style.fontFamily="Times New Roman, Times, serif";for(i=0;(link=a.getElementsByTagName("a")[i]);++i){link.style.color="blue";link.style.textDecoration="underline";if(link.href.indexOf("http")!=0){if(link.href.indexOf("#")!=0){link.href=top.location.protocol+"//"+top.location.host+link.href}else{link.href=top.location.protocol+"//"+top.location.host+top.location.pathname+link.href}}link.onclick=function(){return false}}for(j=0;(elem=a.getElementsByTagName("*")[j]);++j){elem.style.marginBottom="16px";elem.style.background="none";elem.style.cursor="default";elem.style.border="none"}for(k=0;(img=a.getElementsByTagName("img")[k]);++k){img.style.styleFloat="right";img.style.cssFloat="right";img.style.marginLeft="12px";img.style.marginBottom="12px";img.style.border="none"}for(l=0;(h1=a.getElementsByTagName("h1")[l]);++l){h1.style.display="block";h1.style.width="100%";h1.style.borderBottom="1px solid #333";h1.style.fontSize="140%";h1.style.lineHeight="110%";h1.style.fontFamily="Georgia, Times New Roman, Times, serif"}for(m=0;(bq=a.getElementsByTagName("blockquote")[m]);++m){bq.style.marginLeft="3em";bq.style.marginRight="3em"}return false}function getPdf(){frames.toolsframe.aardvark.suspend();frames.toolsframe.aardvark.clearBox();var d=document.getElementById("pnpdfform");if(d!=null){d.parentNode.removeChild(d)}var c=document.createElement("form");c.id="pnpdfform";c.method="POST";c.action="http://www.printfriendly.com/print/getpdf";c.type="hidden";document.body.appendChild(c);var b=document.createElement("input");b.name="code";b.id="pdfcode";b.type="hidden";b.value=frames.toolsframe.document.documentElement.innerHTML;c.appendChild(b);var a=document.createElement("input");a.name="hostname";a.id="hostname";a.type="hidden";a.value=top.location.host;c.appendChild(a);c.submit();showPFAds("pdf");return false}function pfPrint(){showPFAds("print");frames.toolsframe.aardvark.suspend();frames.toolsframe.aardvark.clearBox();frames.toolsframe.focus();frames.toolsframe.print();return false}function pfUndo(){frames.toolsframe.aardvark.undo();return false}function disableStyles(){for(var a=0;a<document.styleSheets.length;a++){if(document.styleSheets[a].href!=null){if((document.styleSheets[a].href.lastIndexOf("printfriendly")==-1)&&(document.styleSheets[a].href.substring(7,10)!="yui")){document.styleSheets[a].disabled=true}}}document.body.style.overflow="hidden";return false}function getContent(){var c=document.getElementById("toolsframe").contentWindow;var n=c.document;var b=n.getElementsByTagName("head")[0];n.body.style.textAlign="center";if(!b){b=n.body.parentNode.appendChild(document.createElement("head"))}var p=document.getElementsByTagName("p");var r=0;var q=null;var g;var s=document.createElement("DIV");var f=document.createElement("H1");var o=document.createElement("DIV");s.id="pf-print-area";f.innerHTML=document.title;s.appendChild(f);for(var e=0;e<p.length;e++){parentNode=p[e].parentNode;if(typeof parentNode.printfriendly=="undefined"){parentNode.printfriendly={contentScore:0};if(parentNode.className.match(/(comment|meta|footer|footnote)/)){parentNode.printfriendly.contentScore-=50}else{if(parentNode.className.match(/((^|\\s)(post|hentry|entry[-]?(content|text|body)?|article[-]?(content|text|body)?)(\\s|$))/)){parentNode.printfriendly.contentScore+=25}}if(parentNode.id.match(/(comment|meta|footer|footnote)/)){parentNode.printfriendly.contentScore-=50}else{if(parentNode.id.match(/^(post|hentry|entry[-]?(content|text|body)?|article[-]?(content|text|body)?)$/)){parentNode.printfriendly.contentScore+=25}}}if(getInnerText(p[e]).length>10){parentNode.printfriendly.contentScore++}parentNode.printfriendly.contentScore+=getCharCount(p[e])}for(nodeIndex=0;(node=document.getElementsByTagName("*")[nodeIndex]);nodeIndex++){if(typeof node.printfriendly!="undefined"&&(q==null||node.printfriendly.contentScore>q.printfriendly.contentScore)){q=node}}if(q==null){q=document.createElement("div");q.innerHTML="Sorry, printfriendly was unable to parse this page for content"}else{q=q.cloneNode(true)}disableStyles();var d=q.getElementsByTagName("style");for(var e=0;e<d.length;e++){if(navigator.appName!="Microsoft Internet Explorer"){d[e].textContent=""}}cleanStyles(q);q=killDivs(q);q=killBreaks(q);q=clean(q,"script");q=clean(q,"form");q=clean(q,"object");q=clean(q,"table",250);q=clean(q,"h1");q=clean(q,"h2");q=clean(q,"iframe");s.appendChild(q);if(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)){n.body.innerHTML=s.outerHTML;n.getElementById("pf-print-area").style.width="800px"}else{n.body.insertBefore(s,n.body.firstChild)}var h=n.getElementById("pfLink");if(h){h.parentNode.removeChild(h)}var a=n.getElementById("printfriendly");if(a){a.parentNode.removeChild(a)}setContentStyles();YAHOO.util.Get.script("http://cdn.printfriendly.com/aloaderv2-min.js",{win:c});return false}function getInnerText(a){if(navigator.appName=="Microsoft Internet Explorer"){return a.innerText}else{return a.textContent}}function getCharCount(b,a){a=a||",";return getInnerText(b).split(a).length}function cleanStyles(a){a=a||document;var b=a.firstChild;if(!a){return}if(typeof a.removeAttribute=="function"){a.removeAttribute("style")}while(b!=null){if(b.nodeType==1){b.removeAttribute("style");cleanStyles(b)}b=b.nextSibling}}function killDivs(n){var c=n.getElementsByTagName("div");var o=c.length;for(var f=o-1;f>=0;f--){if(c[f].getElementsByTagName("img").length<1){var b=c[f].getElementsByTagName("p").length;var r=c[f].getElementsByTagName("li").length;var q=c[f].getElementsByTagName("a").length;var h=c[f].getElementsByTagName("embed").length;if(getCharCount(c[f])<10){if(r>b||q>b||b==0||h>0){c[f].parentNode.removeChild(c[f])}}}else{var g=c[f].getElementsByTagName("img");for(var d=0;d<g.length;++d){YAHOO.util.Dom.insertAfter(g[d],c[f])}c[f].parentNode.removeChild(c[f])}}return n}function killBreaks(a){a.innerHTML=a.innerHTML.replace(/(<br\s*\/?>(\s|&nbsp;?)*){1,}/g,"<br />");return a}function clean(b,a,d){var c=b.getElementsByTagName(a);d=d||1000000;for(var f=0;f<c.length;f++){if(getCharCount(c[f]," ")<d){c[f].parentNode.removeChild(c[f])}}return b}function removeImages(d){var a=frames.toolsframe.document.getElementById("pf-print-area").getElementsByTagName("img");if(d.checked){for(var c=0;c<a.length;++c){a[c].style.display="none"}}else{for(var b=0;b<a.length;++b){a[b].style.display=""}}return false}function insertPNDiv(){var g=document.getElementsByTagName("body")[0];YAHOO.util.Dom.addClass(g,"yui-skin-sam");var u=YAHOO.util.Dom.getLastChild(g);var h=document.createElement("div");h.id="pnLightbox";YAHOO.util.Dom.insertAfter(h,u);var x=document.createElement("div");x.className="hd clearfix";x.id="pn-hdr";var b=document.createElement("ul");b.className="action clearfix";x.appendChild(b);var e=document.createElement("li");YAHOO.util.Dom.addClass(e,"print");var r=document.createElement("a");r.href="#";r.onclick=pfPrint;e.appendChild(r);b.appendChild(e);var a=document.createElement("li");YAHOO.util.Dom.addClass(a,"getpdf");var q=document.createElement("a");q.href="#";q.onclick=getPdf;q.innerHTML="pdf";a.appendChild(q);b.appendChild(a);var v=document.createElement("ul");v.className="tools clearfix";x.appendChild(v);var s=document.createElement("li");YAHOO.util.Dom.addClass(s,"undo");v.appendChild(s);var d=document.createElement("a");d.href="#";d.innerHTML="undo";d.onclick=pfUndo;s.appendChild(d);var p=document.createElement("li");YAHOO.util.Dom.addClass(p,"last");v.appendChild(p);var y=document.createElement("input");y.type="checkbox";y.id="ri";y.onclick=function(){removeImages(this)};p.appendChild(y);var w=document.createElement("label");w.setAttribute("for","ri");w.innerHTML="remove images";p.appendChild(w);var f=document.createElement("div");f.id="pnicer-body";YAHOO.util.Dom.addClass(f,"bd");var c=document.createElement("div");YAHOO.util.Dom.addClass(c,"ft");var z=document.createElement("a");z.href="http://www.printfriendly.com";z.title="PrintFriendly - Save paper and ink, print nicer documents";YAHOO.util.Dom.addClass(z,"f-logo");c.appendChild(z);h.appendChild(x);h.appendChild(f);h.appendChild(c);var t="900px";var o=YAHOO.util.Dom.getViewportHeight()-80+"px";lbox=new YAHOO.widget.Dialog("pnLightbox",{width:t,height:o,visible:false,modal:true,close:true,fixedcenter:true,constraintoviewport:true,autofillheight:"body"});lbox.beforeHideEvent.subscribe(closePFLightbox);var n=document.createElement("iframe");n.height="100%";n.width="100%";n.name="toolsframe";n.id="toolsframe";n.frameBorder="0";n.src="about:blank";n.onload=getContent;n.onreadystatechange=function(){if(this.readyState=="complete"){getContent()}};lbox.setBody(n);lbox.render();disableStyles();lbox.show();loadPFAds();return false}function loadYUIScripts(){var a=new YAHOO.util.YUILoader({base:"",require:["container","dom","element","event"],loadOptional:false,combine:true,filter:"MIN",allowRollup:true,onSuccess:function(){YAHOO.util.Get.css("http://cdn.printnicer.com/printfriendly.css",{onSuccess:insertPNDiv})}});a.insert();return false}function loadYUILoader(){YAHOO.util.Get.script("http://yui.yahooapis.com/2.7.0/build/yuiloader/yuiloader-min.js",{onSuccess:loadYUIScripts});return false}function loadPNYUIGet(){var b="http://yui.yahooapis.com/2.7.0/build/get/get-min.js";var c=document.getElementsByTagName("head");var a=document.createElement("script");a.type="text/javascript";a.onload=loadYUILoader;a.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){a.onreadystatechange=null;loadYUILoader()}};a.setAttribute("src",b);c[0].appendChild(a);return false}function loadYUIBase(){if(!window.pfLoaded){window.pfLoaded=true;var b="http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js";var c=document.getElementsByTagName("head");var a=document.createElement("script");a.type="text/javascript";a.onload=loadPNYUIGet;a.onreadystatechange=function(){var d=this.readyState;if("loaded"===d||"complete"===d){a.onreadystatechange=null;loadPNYUIGet()}};a.setAttribute("src",b);c[0].appendChild(a)}else{disableStyles();lbox.show()}return false}function insertPFLink(){var a=document.getElementById("pfLink");if(a){a.onclick=function(){window.print();return false}}}var printFun=window.print;window.print=loadYUIBase;if(typeof pfstyle!="undefined"){window.print()}window.onload=insertPFLink;