*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
-
-{literal}
 function correctUserName() {
     var u = document.forms.login.username;
     // login with no space
     document.forms.loginsub.submit();
 
 }
-{/literal}
\ No newline at end of file
 
+++ /dev/null
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-require_once("xorg.inc.php");
-new_nonhtml_page('javascript/do_challenge_response.js.tpl', AUTH_PUBLIC);
-header("Content-type: text/javascript");
-$page->run();
-?>
 
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
-
-{literal}
 function readCookie(name)
 {
     var nameEQ = name + "=";
     document.forms.login.password.value = "";
     document.forms.loginsub.submit();
 }
-{/literal}
\ No newline at end of file
 
+++ /dev/null
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-require_once("xorg.inc.php");
-new_nonhtml_page('javascript/do_challenge_response_logged.js.tpl', AUTH_PUBLIC);
-header("Content-type: text/javascript");
-$page->run();
-?>
 
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-document.write('<script language="javascript" src="{rel}/javascript/secure_hash.js.php"></script>');
-
-{literal}
 function EnCryptedResponse() {
     pw1 = document.forms.changepass.nouveau.value;
     pw2 = document.forms.changepass.nouveau2.value;
     document.forms.changepass2.submit();
     return true;
 }
-{/literal}
 
+++ /dev/null
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-require_once("xorg.inc.php");
-new_nonhtml_page('javascript/motdepasse.js.tpl', AUTH_PUBLIC);
-header("Content-type: text/javascript");
-$page->run();
-?>
 
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *\r
  ***************************************************************************/\r
 \r
-document.write('<script language="javascript" src="{rel}/javascript/md5.js"></script>');\r
-document.write('<script language="javascript" src="{rel}/javascript/sha1.js"></script>');\r
-\r
-{literal}\r
 function hash_encrypt(a) {\r
     return hex_sha1(a);\r
 }\r
         c += a.charAt(k);\r
     return c;\r
 }\r
-{/literal}\r
 
+++ /dev/null
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-require_once("xorg.inc.php");
-new_nonhtml_page('javascript/secure_hash.js.tpl', AUTH_PUBLIC);
-header("Content-type: text/javascript");
-$page->run();
-?>
 
     require_once('secure_hash.inc.php');
     if (hash_encrypt($_SESSION['password'].":".$_SESSION['session']->challenge) != Post::get('response')) {
         new_skinned_page('motdepasse.tpl', AUTH_MDP);
-        $page->addJsLink('javascript/motdepasse.js.php');
+        $page->addJsLink('javascript/motdepasse.js');
         $page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
         $page->trig('Ancien mot de passe erronnĂ©');
         $page->run();
 }
 
 new_skinned_page('motdepasse.tpl', AUTH_MDP);
-$page->addJsLink('javascript/motdepasse.js.php');
+$page->addJsLink('javascript/motdepasse.js');
 $page->assign('xorg_title','Polytechnique.org - Mon mot de passe');
 $page->run();
 ?>
 
         $page->run();
     } else {
         new_skinned_page('motdepasse.tpl', AUTH_PUBLIC);
-        $page->addJsLink('javascript/motdepasse.js.php');
+        $page->addJsLink('javascript/motdepasse.js');
         $page->run();
     }
 } else {
 
 
     function doLogin(&$page) {
         // login for non-x has been disabled, so don't need this js anymore
-        //$page->addJsLink('javascript/do_challenge_response.js.php');
+        //$page->addJsLink('javascript/do_challenge_response.js');
         $page->assign("xorg_tpl", "xnet/login.tpl");
         $page->run();
     }
 
     {
         if (logged() and !$new_name) {
             $page->changeTpl('password_prompt_logged.tpl');
-            $page->addJsLink('javascript/do_challenge_response_logged.js.php');
+            $page->addJsLink('javascript/do_challenge_response_logged.js');
             $page->assign("xorg_tpl", "password_prompt_logged.tpl");
             $page->run();
         } else {
             $page->changeTpl('password_prompt.tpl');
-            $page->addJsLink('javascript/do_challenge_response.js.php');
+            $page->addJsLink('javascript/do_challenge_response.js');
             $page->assign("xorg_tpl", "password_prompt.tpl");
             
             global $globals;
 
     <script type="text/javascript" src="{rel}/{$js}"></script>
     {/foreach}
     <script type="text/javascript" src="{rel}/javascript/overlib.js"></script>
+    <script type="text/javascript" src="{rel}/javascript/md5.js"></script>
+    <script type="text/javascript" src="{rel}/javascript/sha1.js"></script>
+    <script type="text/javascript" src="{rel}/javascript/secure_hash.js"></script>
     
     {if $xorg_rss}
     <link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{rel}{$xorg_rss.href}" />