addListener( window, 'load', function() {
  var print_page = document.getElementById( 'print_page_link' );
  var retour_liste = document.getElementById( 'retour_liste' );
  if ( print_page ) {
    addListener( print_page, 'click', function( e ) {
      DOMEvent.stopEvent( e );
      if ( window.print )
        window.print();
    } );
  }
  if ( retour_liste ) {
    addListener( retour_liste, 'click', function( e ) {
      DOMEvent.stopEvent( e );
      history.go(-1);
    } );
  }
  
  var crypto = document.getElementById("crypto");
  if ( crypto ) {
		crypto.onclick = function() {
			var x = screen.width / 2; 
			var y = screen.height / 2;
			var popup = window.open( "http://"+URLcrypto + "/crypto.php", "cryptoWindow", "height=201,width=351,location=no,status=no,toolbar=no,menubar=no,scrollbars=no");
			popup.focus();
			return false;
		}
  }
  

  var anchors = document.getElementsByTagName( 'a' );
  for( var i=0; i<anchors.length; i++ )
    if ( -1 != anchors[ i ].className.indexOf( 'external_link' ) )
      anchors[ i ].target = '_blank';
} );
