context = "";
s = document.URL;
if(s.match(/\/ds\//))
	{
	context = "/ds"; 
	}

// opens a standard popup with the passed html file
function openstandardpopup(aLink)
	{
	width = 800;
	height = 500;
	mycontext = ""; 
	if(aLink.match(/\.jsp$/))
		{
		mycontext = context;
		}
	
	window.open(mycontext + aLink, 'wndStandard', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,');
	}
	
// opens an image popup with the passed html file
function openimagepopup(aLink)
	{
	width = 684;
	height = 433;
	window.open(context + aLink, 'wndImage', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,');
	}
	
// opens a glossar popup for the passed letter. file will be computed from lang and letter
function openglossarpopup(aletter, anAnchor)
	{
	if(!anAnchor) { anAnchor = ""; }
	//width = 684;
	width = 800;
	height = 433;
	aLink = context + "/dynamicspace/" + lang + "/glossar/" + aletter + "_popup.jsp#" + anAnchor;
	window.open(aLink, 'wndGlossar', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,directories=no,');
	//alert("Glossarpage '" + aLink + "' would be opened now");
	}

// old function
function openglossar(aletter)
	{
	openglossarpopup(aletter);
	}	
	
// opens a media popup with the passed html file
function openmediapopup(aLink)
	{
	width = 490;
	height = 395;
	window.open(context + aLink, 'wndMedia', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,');
	//alert("Mediapage '" + aLink + "' would be opened now");
	}
	