var UniqueID = 314 // Make each link open in a new window 
var newWinOffset = 0 // Position of first pop-up

function PlayerOpenQT(soundfiledesc,soundfilepath) { 
PlayWin = window.open('',UniqueID,'width=320,height=180,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 

var winContent = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'" + 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>";

winContent += "<html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>";

winContent += "<HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY style='font: 8pt georgia; background-color:#F7FFEE; text-align: center;'> <DIV style='text-align: left; padding: 3px; background-color:#FFFFE0; width: 300px; border: 1px solid #534741; margin: 5px auto;'>";

winContent += "<span style='font: bold 10pt verdana; line-height:1.5'>" + soundfiledesc + "</span>";

winContent += "<OBJECT ID='Player' CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='300' height='16' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab'>"; 
winContent += "<param name='SRC' value='" + soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>"; 
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#ccc'>"; 
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='300' HEIGHT='16' CONTROLLER='TRUE' PLUGINSPAGE='http://www.apple.com/quicktime/download/'></EMBED>";
winContent += "</OBJECT>"; 

winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='" + soundfilepath +"' style='color:#228B22'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";
winContent += "<DIV align='center'><a href='#' onclick='javascript:window.close();' style='color:#228B22'><img style='border: 0px;' src='imgs/closewindow.gif' alt='close window'/></a></DIV></div>"; 
winContent += "Copyright Anna Tabbush 2005</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 
} 

function PlayerOpenWM(soundfiledesc,soundfilepath) { 
PlayWin = window.open('',UniqueID,'width=320,height=180,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 

var winContent = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'" + 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>";
   
winContent += "<html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>";

winContent += "<HEAD><TITLE>" + soundfiledesc + "</TITLE></HEAD><BODY style='font: 8pt georgia; background-color:#F7FFEE; text-align: center;'> <DIV style='text-align: left; padding: 3px; background-color:#FFFFE0; width: 300px; border: 1px solid #534741; margin: 5px auto;'>";

winContent += "<span style='font: bold 10pt verdana;line-height:1.5'>" + soundfiledesc + "</span>";

winContent += "<OBJECT ID='MediaPlayer1' CLASSID='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' width='300' height='42' CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902' standby='Loading Microsoft® Windows® Media Player components...' type='application/x-oleobject'>"; 
winContent += "<param name='SRC' value='" + soundfilepath + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>"; 
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#ccc'>"; 
winContent += "<EMBED SRC='" + soundfilepath + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='300' HEIGHT='42' CONTROLLER='TRUE' type='application/x-mplayer2' PLUGINSPAGE='http://www.microsoft.com/Windows/MediaPlayer/'></EMBED>";
winContent += "</OBJECT>"; 

winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='" + soundfilepath +"' style='color:#228B22'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";
winContent += "<DIV align='center'><a href='#'  onclick='javascript:window.close();' style='color:#228B22'><img style='border: 0px;' src='imgs/closewindow.gif' alt='close window'/></a></DIV></div>"; 
winContent += "Copyright Anna Tabbush 2005</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 
} 

//The popUp function is for the lyrics windows

function popUp(URL) {
window.open(URL,null,"width=600,status=no,toolbar=no,menubar=no,location=no, scrollbars=yes, resizable=yes");
}