function openPopup(winurl,winname,winfeatures) {
	windowX = 761; 
	windowY = 576; 
	posX = (window.screen.width-windowX)/2;
	posY = (window.screen.height-windowY)/3;
	
	//This launches a new window and then
	//focuses it if window.focus() is supported.
	newwin = window.open(winurl,winname,winfeatures);
	setTimeout('newwin.focus();',250);
	if (window.moveTo){
		newwin.moveTo(posX,posY);
	}
}

// openPopup('main.html','rmae-demo','height=576,width=761,fullscreen=no,toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=no');

function refreshWindow(pLink) {
	window.parent.opener.location.href = pLink;
	self.close();
}