// 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 = 0 // Position of first pop-up


function PlayerOpen(soundfiledesc,soundfilepath) {




PlayWin = window.open('',UniqueID,'width=400,height=190,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');

PlayWin.focus(); 


var winContent = "<HTML><HEAD><META HTTP-EQUIV='Pragma' CONTENT='no-cache'><TITLE>one</TITLE></HEAD><BODY bgcolor='#000000'>";
winContent += "<B style='font-size:18px;font-family:Verdana,sans-serif;color:#FFFFFF;line-height:1.5'>" + soundfiledesc + "</B>";



var safari_is_not_browser_test = 1

if ((navigator.userAgent.indexOf("Safari") != -1) || ((navigator.userAgent.indexOf("Firefox") != -1) && (navigator.userAgent.indexOf("Macintosh") != -1)))
{
	safari_is_not_browser_test = 0;
}

if (safari_is_not_browser_test != 0)
{
	winContent += "<OBJECT ID='MediaPlayer' WIDTH=300 HEIGHT=42 classid='CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Microsoft Windows Media Player components...'  type='application/x-oleobject' CODEBASE='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112'>";
	winContent += "<PARAM NAME='ControlType' VALUE='1'>";
	winContent += "<PARAM NAME='AutoStart' VALUE='true'>";
	winContent += "<PARAM NAME='ShowDisplay' VALUE='0'>";
	winContent += "<PARAM NAME='ShowStatusBar' VALUE='0'>";
	winContent += "<PARAM NAME='cache' VALUE='false'>";
	winContent += "<PARAM NAME='FileName' VALUE='" + soundfilepath + "'>";

	winContent += "<Embed type='application/x-mplayer2' Height=42 width=300 pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' Name=MediaPlayer ShowControls=1 ShowDisplay=0 ShowStatusBar=0 autostart=true Src='" + soundfilepath + "' >";
	winContent += "</embed>";
}
else
{
	winContent += "<Embed type='application/x-mplayer2' Height=16 width=300 pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' Name=MediaPlayer ShowControls=1 ShowDisplay=0 ShowStatusBar=0 autostart=true Src='" + soundfilepath + "' >";
	winContent += "</embed>";
}




if (safari_is_not_browser_test != 0)
{
	winContent += "</OBJECT>";
}

//winContent += "<p style='font-size:12px;font-family:Verdana,sans-serif;text-align:center'><a href='"+soundfilepath+"'>Download this file</a> <SPAN style='font-size:10px'>(right-click or Option-click)</SPAN></p>";

winContent += "<FORM><DIV align='center'><INPUT type='button' value='Close this window' onClick='javascript:window.close();'></DIV></FORM>";
winContent += "</BODY>";
winContent += "</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.
}

