Drupal.behaviors.print = function(context) {window.print();window.close();}>

Is That How it Works?