/*  Base javascript functions
 * ---------------------------------------------------------------------------

 */


function gonow(url)
  {
  document.location=url;
  }


function modify_acc(it){
        document.formadmin.submit();
        }

function modify(it){
        document.formadmin.elements['status_' + it].value=1;
        //alert ('result is ' + document.formadmin.elements[itx].name)
        }

function modifydelfile(it){
        document.formadmin.elements['cbxdel_' + it].value=1;
        }


function sel(it){
        if (document.formadmin.elements['status_' + it].value==0){
            document.formadmin.elements['status_' + it].value=1;
            }
        else {
              document.formadmin.elements['status_' + it].value=0;
              }
        }

function creerf(url,larg,haut){
	var options = "toolbar=no,location=no,directories=no,status=no,"
        + "menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,"
        + "width=" + larg + ",height=" + haut;
	mafenetre= window.open(url,"DWU",options);
	}

/* Secure Authentication using MD5 hashing */

//history.go(1); // disable the browser's back button

function md5auth(seed) {
          var password = document.formauth.password.value;
          var hash = MD5(seed+password);
          document.formauth.password.value='';
          document.formauth.velo.value=hash;
          //alert('source = ' +seed+password +',data sent = '+hash);
          return true;
        }