function SpawnMediaEx( typ, filename, headword, def, caption, width, height, nHeightTitle, soundFile) 
{
	//def=def.replace("_","'");
	var sizeX=width + 20;
	var sizeY=height+nHeightTitle+20;
	if (sizeX==0) { sizeX=360 }
	if (sizeY==0) { sizeY=360 }
	var posX=(screen.width-sizeX)/2;
	var posY=10;
	var windowfeatures='channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,top='+posY+',left='+posX+',width='+sizeX+',height='+sizeY;
	var newWin=window.open('popup.php?type='+typ+'&filename='+filename+'&headword='+headword+'&def='+def+'&cap='+caption+'&width='+width+'&height='+height+'&sndfile='+soundFile,typ,windowfeatures,1)
}
  
function SpawnAudio( filename, headword) 
{
	filename=""+filename;
	var sizeX=350;
	var sizeY=350;
	var posX=(screen.width-sizeX)/2;
	var posY=(screen.height-sizeY)/2;
	var windowfeatures='channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,top='+posY+',left='+posX+',width='+sizeX+',height='+sizeY;
	var newWin=window.open('popup_audio.php?filename='+filename+'&headword='+headword,'audio',windowfeatures,1)
}

function WcdHelp( filename) 
{
  	var sizeX=750;
  	var sizeY=470;
  	var posX=(screen.width-sizeX)-20;
  	var posY=10;
  	var windowfeatures='channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,top='+posY+',left='+posX+',width='+sizeX+',height='+sizeY;
  	var helpWin=top.open(filename,'help',windowfeatures,1)
  	helpWin.focus();
} 

function PopupHelpPage( filename, nWidth, nHeight)
{
	var sizeX=nWidth;
	var sizeY=nHeight;
	if (sizeX==0) { sizeX=500 }
	if (sizeY==0) { sizeY=500 }
	var posX=(screen.width-sizeX)/2;
	var posY=10;
	var windowfeatures='channelmode=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,top='+posY+',left='+posX+',width='+sizeX+',height='+sizeY;
	var newWin=window.open(filename,'help',windowfeatures,1)
}
