// Added function to popup window to play MP3  by BY
function openPlayWin() 
{
	playWin=window.open("", "XXX", "toolbar=no,directories=no,location=0,status=0,menubar=no,resizable=no,scrollbars=no,width=280,height=160");
	if (window.focus) {playWin.focus()};
	playWin.document.write('<html><title>Mp3 Player: Sonny Black</title></head><body style="background:#21243F;text-align:center;font-size:11pt;color:#AAAAFF;margin-top:10px;margin-bottom:4px">');
	playWin.document.write('<div style="text-align: center">');

	playWin.document.write('<object  style="text-align:center" type="application/x-shockwave-flash" data="http://www.sonnyblack.co.uk/mp3/player_mp3_multi.swf" width="260" height="100">');
	playWin.document.write('<param name="movie" value="http://www.sonnyblack.co.uk/mp3/player_mp3_multi.swf" />');
	playWin.document.write('<param name="wmode" value="transparent" />');
	playWin.document.write('<param name="FlashVars" value="playlist=http://www.sonnyblack.co.uk/mp3/mp3_player_playlist.txt&amp;showvolume=1&amp;width=260&amp;bgcolor1=000099&amp;bgcolor2=6600AA&amp;autoplay=1&amp;loop=1&scrollbarcolor=6666AA&scrollbarovercolor=7777CC" />');

	playWin.document.write('</object></div>');
	playWin.document.write('playing Sonny Black mp3 clips<br/><span style="font-size:9pt;color:#CCCCFF">Nb. you can leave this popup open & continue to browse in the main window.</span> ');
	playWin.document.write('</body></html>');
	playWin.document.bgColor='#AA0055';
	playWin.document.close();
}
// End of added function
//
// display decision alert box
function decision(message, url){
	if(confirm(message)) location.href = url;
}

// open browser window
function openPopUp(url, windowName, w, h, scrollbar) {

           var winl = (screen.width - w) / 2;
           var wint = (screen.height - h) / 2;
           winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollbar ;
		   win = window.open(url, windowName, winprops);
           if (parseInt(navigator.appVersion) >= 4) { 
              	win.window.focus(); 
           } 
}

function jumpMenu(target,object,restore){ 
  eval(target+".location='"+object.options[object.selectedIndex].value+"'");
  if (restore) object.selectedIndex=0;
}

function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function getImage(imageName)
{
		findObj('img').src = imageName;
}

function submitDoc(formName) { 
  var obj;
 
	if (obj=findObj(formName)!=null) 
	{
		findObj(formName).submit(); 
	}
	else 
	{
		alert('The form you are attempting to submit called \'' + formName + '\' couldn\'t be found. Please make sure the submitDoc function has the correct id and name.');
	}

}
