// JavaScript Document
// Pop-Up Embedder by David Battino, www.batmosphere.com

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) {
 
PlayWin = window.open('',UniqueID,'top=' + newWinOffset +',left=' + newWinOffset + ',position=' + newWinOffset +',width='+screen.availWidth+',height='+screen.availHeight+',resizable=1,scrollbars=1,titlebar=0,toolbar=0,menubar=0,status=0,directories=0'); 
PlayWin.document.write("<HTML><HEAD><TITLE>" + filedesc + "</TITLE></HEAD>");
PlayWin.document.write("<BODY bgcolor='#ffffff'>");
PlayWin.document.write("<DIV align='center'><FORM>");
PlayWin.document.write("<INPUT type='button' value='Close this window' onClick='javascript:window.close()'><br><br>");
PlayWin.document.write("<IMG SRC='" + filepath + "' id='image1' name='image1' alt='Loading " + filedesc + " image...' width='" + origwidth + "' height='" + orighite + "'>");
PlayWin.document.write("<BR><BR>Copyright &copy;" + now.getFullYear() + " <a href='http://www.siliconvalleymap.com' target='_blank'>Silicon Valley Map &amp; Calendar</a><BR><BR>");
PlayWin.document.write("<INPUT type='button' value='Close this window' onClick='javascript:window.close()'><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.
}