function adjust_popup()
{
	window.moveTo((screen.availWidth-380)/2, (screen.availHeight-410)/2); 
}

function openPopup(aTag, pWidth, pHeight) {
	//This function is supposed to be called from the a-tag with valid href-attribute
	//If pWidth and pHeight are given, the popup will assume them as width and height
	if (!pWidth) pWidth=600; if (!pHeight) pHeight=500;
	if (top.popup && !top.popup.closed && top.popup.close) top.popup.close();
	top.popup = top.open(aTag.href, "popup", "width="+pWidth+",height="+pHeight+",resizable=0,menubar=0,scrollbars=1");
	top.popup.focus();
	return false;
}