//Print Friendly Page Function

function PFCurrentPage() {

 var $newPageContent = document.getElementById("content").innerHTML;

 $('a.new-window').click(function(){
 window.open(this.href);
 return false;
 });

document.write("<html><head><title>"+document.title+"</title>");
document.write("<link href='http://www.communitylivingyorksouth.ca/development/wp-content/themes/Deluxe/jscss/print.css' rel='stylesheet' type='text/css' />");
document.write("<script src='http://www.communitylivingyorksouth.ca/development/wp-content/themes/Deluxe/jscss/jQuery.js' type='text/javascript' charset='utf-8'></script>");
document.write("<script src='http://www.communitylivingyorksouth.ca/development/wp-content/themes/Deluxe/jscss/print-friendly-hide.js' type='text/javascript' charset='utf-8'></script>");
document.write("</head><body>");
document.write("<div id='PFPage'>");
document.write("<h4 style='font-size: 100%'><strong>"+document.title+"</strong></h4>");
document.write("<br />");
document.write($newPageContent);
document.write("</div>");
document.write("<div id=print_button><input type='submit' value='Print this page' /></div>");
document.write("</body></html>");


document.close();
}



// Include the script link in the main page load
// (A) <script src="<?php echo $template_url; ?>/jscss/print-friendly.js" type="text/javascript" charset="utf-8"></script>

// Include a call to the script on the element in the html code
// <a href="javascript:PFCurrentPage()"> Printer Friendly</a>

// Upload the print.css stylesheet to style the print friendly page - it is called from the generated print friendly page only

