JavaScript Program to Position Newly Created Window Using JavaScript

Write a JavaScript program to position newly created window using JavaScript.

Source Code
    <title>Position window using JavaScript</title>
        function createNewWindow() 
            var x = screen.width / 2 - 150
            var y = screen.height / 2 - 100
            var style="status=1, toolbar=1, location=1, width=300, height=200, scrollbars=1, resizable=0, directories=1, menubar=0,left=" +x+",top="+y
            myWindow ="radio.html", "myWindow", style)

<input type="button" value="Create New Window" onclick="createNewWindow()"/>