var css = 'hp_print.css';
var header = '<table width="600" border="0" align="center"><tr><td><div class="print_header" align="center">Hampton - its past and its present </div></td></tr></table>';
var footer = '<table width="600" border="0" align="center"><tr><td><div class="print_footer" align="center">This page has been printed from http://www.ourhampton.org.uk<br>&copy; Hampton Society and Hampton Riverside Trust </div></td></tr></table>';
var message= 'Please print through - "PRINT THIS PAGE" - on the menu';

function printPage()
{
	printFriendlyPage(window.parent.mainFrame, 'printable');
}


function printFriendlyPage(frametoprint, printablecontent_id)
{

   var sOption="toolbar=no,location=no,directories=no,menubar=yes,"; 
       sOption+="scrollbars=yes,width=720,height=600,left=5,top=25"; 

   var sWinHTML = frametoprint.document.getElementById(printablecontent_id).innerHTML; 
   
   var winprint=window.open("","",sOption); 
       winprint.document.open(); 
	   winprint.document.write('<html>');
	   winprint.document.write('<LINK href=\"' + css + '\" rel=Stylesheet>'); 
       winprint.document.write('<body leftmargin="75">');
       winprint.document.write(header);
       winprint.document.write(sWinHTML);          
       winprint.document.write(footer);
       winprint.document.write('</body></html>'); 
       winprint.document.close(); 
       winprint.focus(); 
       winprint.print();
}


 
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

