//Generating Pop-up Print Preview page

function getPrint(print_area)

{

//Creating new page

var pp = window.open("about:blank", "print", '');

//Adding HTML opening tag with <HEAD> … </HEAD> portion
pp.document.writeln('<html><head><title>Ecoist Abode Article Print Preview</title>')
pp.document.writeln('<link rel="stylesheet" type="text/css" href="Print.css">')
pp.document.writeln('<base target="_self"></head>')

//Adding Body Tag
pp.document.writeln('<body style="font-family:Arial Narrow;font-size:11pt;" bottomMargin="0"');
pp.document.writeln(' leftMargin="0" topMargin="0" rightMargin="0">');

//Adding form Tag
pp.document.writeln('<form method="post">');

//Creating two buttons Print and Close within a HTML table
pp.document.writeln('<table width=600px><tr><td align=right>');
pp.document.writeln('<input id="PRINT" type="button" value="Print" ');
pp.document.writeln('onclick="javascript:window.print();">');
pp.document.writeln('<input id="CLOSE" type="button" value="Close" onclick="window.close();">');
pp.document.writeln('</td></tr><tr><td><img src="images/logo.gif" /></td></tr></table>');

//Writing print area of the calling page
pp.document.writeln('<div id="printArea">')
pp.document.writeln(document.getElementById(print_area).innerHTML);
pp.document.writeln('</div>')

//Ending Tag of </form>, </body> and </html>
pp.document.writeln('</form></body></html>');
pp.document.close();
} 

function AddToFavs(ids, title){
if (window.external) 
    {
    var url="http://www.EcoistAbode.com";
    
    external.AddFavorite(url,title);
    }
else
    {
    alert('press ctrl+d to add to favorites')
    }

}