var wimpyWindow2;
var winOpen=0;

function wimpyPopPlayer(wimpyPopPage,theWidth,theHeight) {
	wimpyWindow = window.open(wimpyPopPage,'wimpyMP3player','width='+theWidth+',height='+theHeight);
	winOpen=1;
}
function wimpyPopPlayerWithFile(wimpyPopPage,initialFile,theWidth,theHeight) {
	wimpyWindow = window.open(wimpyPopPage+'?theFile='+initialFile,'wimpyMP3player','width='+theWidth+',height='+theHeight);
	winOpen=1;
}
function wimpyIsOpen(){
	if (winOpen==1){
		if (wimpyWindow.closed){
			return false;
		} else {
			return true;
		}
	} else {
		return false;
	}
}
function wimpyPopAndPlay(theFile, theArtist, theTitle, graphicURL, hotlinkURL){
	if(wimpyIsOpen()){
		wimpyWindow2.wimpy_loadAndPlay(theFile, theArtist, theTitle, graphicURL, hotlinkURL);
	} else {
		wimpyPopPlayerWithFile('player',theFile,'360','100');
	}
}



