
function open_window(aPage,aWidth,aHeight,aLeft,aTop) {		
	if (!aWidth)
		aWidth = 480;
	if (!aHeight)
		height = 350; 
	if (!aLeft)
		aLeft = (screen.width / 2) - (aWidth / 2);
	if (!aTop)
		aTop = (screen.height / 2) - (aHeight / 2);
		
	OpenWin = window.open(aPage, "window", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=" + aWidth + ",height=" + aHeight + ",left=" + aLeft + ",top=" + aTop + "");
}

function close_window(aReload) {
	if (!aReload) 
		self.opener.document.location = self.opener.document.location;
	window.close();	
}

function select_option (aForm,aElm,aOpValue) {	
	var lOption = document.forms[aForm].elements[aElm].options;		
	for (var i = 0; i < lOption.length; i++) {
		if (lOption[i].value == aOpValue) {
			lOption[i].selected = true;
		}
	}	
}