//Copyright 2002 George E. Mbuagbaw sendmailtogeorge@yahoo.co.uk
//get the document's url
var myloc = new Array(window.location.href);
//make it a string so we can parse or operate on it
var mystring = new String(myloc);
//change the extension from .pdf.html to .pdf
var thepdf = mystring.replace('.pdf.html','.pdf');
//write it into the document as a url
var myinfo="<p>This document is an html version of a pdf document. To download, view or print " + 
"  the file in pdf format click <a href="+"'"+thepdf+"'>here</a>.</p>";
document.write(myinfo);