    function SpeakString( sTitle, sString, iWidth, iHeight )
    {

      var sVisibility = "visible";

      var iPageHeight = screen.height - 200;
      var iPageWidth = screen.width;

      var iTop = ( iPageHeight - iHeight ) / 2;
      var iLeft = ( iPageWidth - iWidth ) / 2;

      var sHtml = "";

      if ( sString == "" && sTitle == "" )
        sVisibility = "hidden";

      document.getElementById( 'SpeakString' ).style.width=iWidth + "px";
      document.getElementById( 'SpeakString' ).style.height=iHeight + "px";
      document.getElementById( 'SpeakString' ).style.top=iTop + "px";
      document.getElementById( 'SpeakString' ).style.left=iLeft + "px";

      sHtml = '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
      sHtml += '<tr><th style="width: 100%;">' + sTitle + '</th><th style="width: 20px;"><a href="javascript:SpeakString(\'\',\'\',0,0);"><img src="/nwn/images/interface/speakstringclose.jpg" width="16" height="16" alt="Fermer"></a></th></tr>';
      sHtml += '<tr><td valign="top" colspan="2" style="width: 100%;">' + sString + '</td></tr>';
      sHtml += '<tr><td style="width: 100%;" align="right" colspan="2"><a href="javascript:SpeakString(\'\',\'\',0,0);">Fermer</a></td></tr>';
      sHtml += '</table>';

      document.getElementById( 'SpeakString' ).innerHTML=sHtml;
      document.getElementById( 'SpeakString' ).style.visibility=sVisibility;
    }

    function AddFavorite()
    {
      if ( ( navigator.appName.indexOf( "Microsoft", 0 ) >= 0 ) && ( parseInt( navigator.appVersion ) >= 4 ) )
      {
		window.external.AddFavorite("http://www.bbnwn.eu","La Bibliothéque de Neverwinter" );
	  }
      else
      {
        SpeakString( "Ajouter aux favoris", "Cette option ne fonctionne que sous Internet Explorer 4 et plus.", 196, 64 ); 
      }
    }

    function PollWindow()
    {
      popupWin = window.open('', 'sondage', 'scrollbars,resizable,width=520,height=300')
    }
    function vote( iFileId )
    {
      sDownloadNote = document.getElementById('note').value;

      window.open( '../downloadvote.php?id=' + iFileId + '&note=' + sDownloadNote, 'targetwindowebecauseitisawindow', 'width=200, height=100' );
    }
 //   window.resizeTo( 800, 600 );

  function carmax( sId, iCar, iMax )
  {
    document.getElementById( sId ).innerHTML = iCar + '/' + iMax;
    
    if ( iCar > iMax )
	  document.getElementById( sId ).style.color = 'red';
    else if ( iCar == iMax )
	  document.getElementById( sId ).style.color = 'blue';
    else
      document.getElementById( sId ).style.color = 'black';
    
  }

  function menu_deploy( id, event )
  {
    if ( document.getElementById )
    {
      var oSubMenu = document.getElementById( "MenuSubItem" + id );
      var oSubMenuState = document.getElementById( "MenuSubItem" + id + "State" );
   
      if ( oSubMenu.style.display == 'none' && ( event == null || event == false ) )
      {
        oSubMenu.style.display = 'block';
        oSubMenuState.src = GLOBAL_SKIN + 'submenu_close.png';
      }
      else if ( event == null || event == true )
      {
        oSubMenu.style.display = 'none';
        oSubMenuState.src = GLOBAL_SKIN + 'submenu_open.png';
      }
    }
    else
      alert( 'Votre navigateur ne supporte pas document.getElementById. Veuillez passer à Firefox, Mozilla 1.0++, Netscape 6.0++, et autres' );
  }
  
   function changeinterface()
    {
      sTitre = "Changer d'interface";
      iWidth = 400;
      iHeight = 180;
	  
      var sLocation = location.href;
      var sSignet = '';
      var sIsFirstVar = '';

      if ( sLocation.indexOf( '#' ) != -1 )
      {
        sSignet = sLocation.substr( sLocation.indexOf( '#' ) );
        sLocation = sLocation.substr( 0, sLocation.indexOf( '#' ) );
      }

      if ( sLocation.indexOf( '?' ) == -1 )
        sIsFirstVar = '?';

      if ( sLocation.indexOf( 'skinid' ) != -1 )
      {
        iIndex = sLocation.indexOf( 'skinid' );
        sNewLocation = sLocation.substr( 0, iIndex - 1 );
        sLocation = sLocation.substr( iIndex + 1 );
       
        if ( sLocation.indexOf( '&' ) != -1 )
        { 
          iIndex = sLocation.indexOf( '&' );
          sLocation = sLocation.substr( iIndex  );
          sNewLocation += sLocation;
        }
        sLocation = sNewLocation;
      }  
	    
      sContent = '<form action="/nwn/changeskin.php" method="post">' +
		"<p>Cette option vous permet de changer d\'interface (skin) : cela vous permet d'avoir" + 
        " différents choix de coloris, et surtout des interfaces qui soient légéres, lourdes" + 
        " , correctes pour les différentes résolutions d\'écran.</p>" +
		"<p>Ceci nécessite que les cookies soient activés. Le cookie sera gardé pendant un an.</p>" + 
		'Skin : <select name="skinid" id="skinid">' +
		' <option value="0">Défaut, 1024*768 conseillé</option>' +
		' <option value="1">Ancien, 800*600 conseillé</option>' +
		'</select>' + 
		'<input type="submit" value="Changer" />' +
		'<input type="button" value="Tester" onclick="' +
		"location.href='" + sLocation + sIsFirstVar + "&skinid=' + document.getElementById('skinid').value + '" + sSignet + "';" + 
		'" />' +
		'<input type="hidden" name="purl" value="' + sLocation + '" /></p></form>';

      SpeakString( sTitre, sContent, iWidth, iHeight );
    }
  
  
