function GetMedia(file)
{
   if (right(file,3) == 'mp3')
	{
		showAudio(file);
		return false;
	}
 	if (right(file,3) == 'mov')
	{
		showMOV(file);
		return false;
	}
	return false;
 } 
function showAudio(audiofile)
{
   	mywindow = window.open ("flashPlayer.asp?media=" + audiofile,"mywindow","location=0,status=0,scrollbars=0,width=200,height=80");
  	mywindow.moveTo(0,0);
  	return false;
}
function showMOV(movfile)
{
	mywindow = window.open ("movPlayer.asp?media=" + movfile,"mywindow","location=0,status=0,scrollbars=0,width=350,height=290");
	mywindow.moveTo(0,0);
	return false;
}
function right(str, n)
{
		if (n <= 0)     // Invalid bound, return blank string
		   return "";
		else if (n > String(str).length)   // Invalid bound, return
		   return str;                     // entire string
		else { // Valid bound, return appropriate substring
		   var iLen = String(str).length;
		   return String(str).substring(iLen, iLen - n);
		}
}


