// JavaScript Document
// Pop-Up Embedder Script by David Battino, www.batmosphere.com; Object tag implementation by Mark Levitt, http://digitalmedia.oreilly.com
var UniqueID = 314 // Make each link open in a new window.
var newWinOffset = 20 // Position of first pop-up
function PlayerOpen(soundfiledesc,soundfilepath) {

PlayWin = window.open('',UniqueID,'width=400,height=200,top=' + newWinOffset +',left=20,resizable=1,scrollbars=0,titlebar=1,toolbar=0,menubar=0,status=1,directories=0,personalbar=0');
PlayWin.focus(); 
var winContent = "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='sv'>";
winContent += "<head><title>" + soundfiledesc + "</title><link rel='styleSheet' href='/scripts/stylesheet_popup.css' type='text/css' />";
winContent += "</head><body>";
winContent += "<div id='sound'><h3>" + soundfiledesc + "</h3>";

winContent += "<object width='300' height='42'>";
winContent += "<param name='SRC' value='" +  soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' value='true'>";
winContent += "<param name='CONTROLLER' value='true'>";
winContent += "<param name='bgcolor' value='#ffffff'>";
winContent += "<embed src='" + soundfilepath + "' autostart='true' loop='false' width='300' height='42' controller='true' bgcolor='#ffffff'></embed>";
winContent += "</object>";

winContent += "<p><a href='"+soundfilepath+"'>Ladda ner den h&auml;r filen</a><br><span class='footer'>(Windows: h&ouml;gerklicka eller anv&auml;nd Option+klicka.<br>Mac: klicka och h&aring;ll nere eller anv&auml;nd Ctrl+klicka.)</span></p>";

winContent += "<div align='center'><a href='#'  onclick='javascript:window.close();'>St&auml;ng det h&auml;r f&ouml;nstret</a></div></form>";
winContent += "</div></body></html>";
PlayWin.document.write(winContent);
PlayWin.document.close(); // "Finalizes" new window
//UniqueID = UniqueID + 1
// newWinOffset = newWinOffset + 20 // subsequent pop-ups will be this many pixels lower.
}