﻿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=600,height=600,top=' + newWinOffset +',left=100,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 


var winContent = "<DIV align='center'><HTML><HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY bgcolor='#FFFFFF'>"; 
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + soundfiledesc + "</B></DIV><P></P>";

winContent += "<DIV align='center'>";
winContent += "<OBJECT width='600' height='600'>"; 
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></DIV>"; 

winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'>Right Click <a href='" + soundfilepath +"'>Here</a> <SPAN style='font-size:10px'>to Download</SPAN></p>";
winContent += "<FORM><DIV align='center'><INPUT type='button' value='Close this window' onclick='javascript:window.close();'></DIV></FORM>"; 

winContent += "<p></p><DIV align='center'><iframe name='Iframe1' src='" + soundfilepath + ".htm ' style='width: 550px; height: 400px'>Your browser does not support inline frames or is currently configured not to display inline frames.</iframe></DIV>"

//winContent += "<p></p><iframe name='Iframe1' src='inlinetest.htm' style='width: 550px; height: 250px'>Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>"



winContent += "</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 
} 


