window.onload=function(){
 if(window.print()){window.print();}
};