// JavaScript Document
// Pop-Up Embedder by David Battino, www.batmosphere.com
// version 2007-02-11 

var UniqueID = 314 // Identify pop-ups so subsequent ones don't replace current one; increment each time function runs. 
// Could pass this parameter to the function so clicking the link twice wouldn't open another copy....
var newWinOffset = 0 // Position of first pop-up
var now = new Date()

function PlayerOpen(filedesc,filepath,origwidth,orighite,caption) {
 
PlayWin = window.open('',UniqueID,'top=' + newWinOffset +',left=' + newWinOffset + ',position=' + newWinOffset +',width='+screen.availWidth+',height='+screen.availHeight+',resizable=1,scrollbars=1'); 
PlayWin.document.write("<HTML><HEAD><TITLE>" + filedesc + "</TITLE>");
PlayWin.document.write("<link href='sctstyle.css' rel='stylesheet' type='text/css'>");
PlayWin.document.write("</HEAD>");

PlayWin.document.write("<BODY bgcolor='#ffffff'>");
PlayWin.document.write("<DIV align='center' style='width:" + origwidth + "px;display:block; clear:both; margin:0 auto 1em;'><FORM>");
PlayWin.document.write("<h3 class='hed2contact'><br>" + filedesc + "</h3>");
PlayWin.document.write("<IMG SRC='" + filepath + "' id='image1' name='image1' alt='Loading " + filedesc + " image...' width='" + origwidth + "' height='" + orighite + "'title='" +filedesc + "'>");
PlayWin.document.write("<span class='bodycopy'><br>" + caption + "<br></span>");

PlayWin.document.write("<br><INPUT type='button' value='Close this window' onClick='javascript:window.close()'><br><br>");

PlayWin.document.write("<BR><BR><span class='address'>Copyright &copy;" + now.getFullYear() + " <a href='http://www.leafmoonarts.com' target='_blank'>Leaf Moon Arts</a></span><BR><BR>");
PlayWin.document.write("</FORM></DIV>");
PlayWin.document.write("</BODY></HTML>");
PlayWin.document.close(); // "Finalizes" new window
UniqueID = UniqueID + 1 // gives subsequent pop-ups new ID
// newWinOffset = newWinOffset + 24 // subsequent pop-ups will be this many pixels lower and to the right.
}