mynewWindow=null
function openWindow(content) {
  mynewWindow = window.open(content, "newWin", "resizable=yes,width=400,height=620")
       } 
/* remember that open wants a string, hence the concatenation of params and text */
function openSizedWindow(content,w,h) {
  mynewWindow = window.open(content, "newWin", "resizable=yes,width="+w+",height="+h)
       } 
function openSizedTextWindow(txt,w,h) {
  mynewWindow = window.open("", "newWin", "titlebar=no, resizable=yes,width="+w+",height="+h);
  mynewWindow.document.write(txt);
  mynewWindow.document.title = "Footnote..........................................";  
       } 

//findPos function is from http://www.quirksmode.org/js/findpos.html;
//where its workings are explained in more detail.
function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
				curleft = obj.offsetLeft
				curtop = obj.offsetTop
				while (obj = obj.offsetParent) {
							curleft += obj.offsetLeft
							curtop += obj.offsetTop
				}	} return [curleft,curtop]; } 

/* These popup functions need the popup styles to be defined. Important style definition 
   is 'position:absolute'. Means the element canbe placed at an arbitrary position 
   without affecting the flow of surroundingelements
    <style type="text/css">
     .popup{position:absolute; border:solid 1px black; 
            background-color:white; padding:4px;}
     </style>   */

//Display a named text object, at the position of another object
function display_popup(parent,named)
{	var text_element = document.getElementById(named);	
	text_element.style.display = "";
	var placement = findPos(parent);
	text_element.style.left = placement[0] + "px";
	text_element.style.top = placement[1] + "px"; } 

//Hide a named text object
function hide_popup(named)
{	var text_element = document.getElementById(named);	
   text_element.style.display = "none"; }

// The next line is the path for the local machine
//var path_to_pdfs = "C:/My Documents/CCS/Resurrection/pdf/"; 

var path_to_pdfs = "pdfs/"; 
function writeLink(current_pdf){ 
  var full_link = '<a href="' + path_to_pdfs + current_pdf + '">' + 'PDF Version</a>'; 
  document.write(full_link); 
} 

