Just got this code which opens a link in a new window, how can I change it to open in the same window?

function openRoom(roomId, roomName) {
<?php if (isset($_SESSION['accountId']) || isset($_COOKIE['accountId'])) { ?>
window.open('chatroom.php?join='+escape(roomName), 'Room'+roomId, 'width=1059,height=554,scrollbars=no').focus();
<?php } else { ?>