// JavaScript Audio Popup
// 10/25/2005
// by Alan McGill
//
// finds any <a> tags with type="audioPop" and opens them in a window if they're clicked.
// if you have other window.onload calls, merge them or something will break.

var PlayWin;
function PlayerOpen(soundfiledesc, soundfilepath) {
	if (!PlayWin||PlayWin.closed){
		PlayWin=window.open (soundfilepath,"mywindow",'width=220,height=80,top=100,left=400,resizable=1,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
	} else{
		PlayWin.location.href=soundfilepath;
	}
	PlayWin.focus;
	return false;
}


window.onload=function()
{
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++){
		if (x[i].getAttribute('type')=='audioPop'){
			x[i].onclick=function(){
				return PlayerOpen("Audio File",this.href);
			}

		}
	}
}

