function openWindow(strUrl,nWidth,nHeight) {

leftVal = (screen.width - nWidth) / 2;
topVal = (screen.height - nHeight) / 2;

newWindow = window.open(strUrl, 'WinName',
'width='+nWidth+',height='+nHeight+',left='+leftVal+',top='+topVal);

}