/* open popup window */
function popupWindow(url, winName, w, h, sb, rs) {
	var leftPos, topPos, property;
	leftPos = (screen.availWidth)  ? parseInt((screen.availWidth-w)/2) : 0;
	topPos  = (screen.availHeight) ? parseInt(((screen.availHeight-h)/2)-30) : 0;
	property = 'width='+w+',height='+h+',left='+leftPos+',top='+topPos+',';
	property+= 'toolbar=0,location=0,directories=0,menubar=0,';
	property+= 'scrollbars='+sb+',resizable='+rs+',status=1';
	winName = window.open(url,winName,property);
	self.onBlur = winName.focus();
}