Javascript pop up help(fix bug)

hy :slight_smile: here is my as

on (release) {
getURL ("javascript:NewWindow=window.open('mapservice.html','newWin','width=600,height=600,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=Yes,fullscreen=No');  NewWindow.focus();     screen_height = window.screen.availHeight; screen_width = window.screen.availWidth; left_point = parseInt(screen_width/2)-(800/2); top_point = parseInt(screen_height/2)-(600/2); setTimeout('NewWindow.moveTo(left_point,top_point)',100); void(0);");
}

but when i press on button first time window opened in left top corner and then it goes in centre,but i want when i press on button it to open in centre.can any one helps me to fix my as? thanks :bounce: