This is not possible unless both pages are on the same domain. Your code does not work in FF, but rather prints the current page. If the pages are on the same domain, then you would write:
printwindow=window.open('/mypage.html');
printwindow.onload = function() {
printwindow.focus();
printwindow.print();
}