/**********************************************************
FILE:  gsdjava.js
DESC:  JavaScript functions for the GSDBBR survey website
DATE:  28-JAN-2005
**********************************************************/


function js_gsdrg_music($musfile, $musloop, $mustext)
/*
//  Fire off a music popunder window
*/
{
	var mywin = window.open("", "gsdrg_music", "height=160,width=250,scrollbars=no");
	var url = mywin.document.URL;
	if (url != "about:blank" && (url.indexOf($musfile) < 0))
	{
		// There is already one open playing different music for HG
		// Destroy it and create another one
		mywin.close(); // Get rid of the existing music window
		mywin = window.open("", "gsdrg_music", "height=160,width=250,scrollbars=no");
	}
	if (url.indexOf($musfile) < 0)
	{
		// Make it a popunder (see, they DO have their legitimate uses!)
		mywin.blur(); // Pop the music window under
		window.focus(); // Make this window the active one
		// Point the music window to the music handler page
		mywin.location="gsdrgmus.php?musfile="+$musfile+"&musloop="+$musloop+"&mustext="+$mustext;
	}
}

/**********************************************************
That's All Folks!
**********************************************************/
