function change_fontweight(id, weight)
{
   document.getElementById(id).style.fontWeight = weight ;
}

function openwin(anchor)
{
   window.open(anchor.href, "_blank") ;
   return false ;
}
var resp='' ;
var pos_img_pw =100 ;
var h_img_pw =150 ;
var w_img_pw = 150 ;
function img_pass_click(event)
{
    y = Math.floor((event.clientY - pos_img_pw.top) / h_img_pw) ;
    x = Math.floor((event.clientX - pos_img_pw.left) / w_img_pw) ;
    resp = resp + String.fromCharCode(65 + 5 * y + x );
    $the_jquery("#edt_pw").val(resp) ;
    $the_jquery("#edt_pw2").val(resp) ;
    $the_jquery("#edt_pw3").val(resp) ;
}
function init_img_pass()
{
    pos_img_pw = $the_jquery("#img_pw").offset();
    h_img_pw = $the_jquery("#img_pw").height() / 5 ;
    w_img_pw = $the_jquery("#img_pw").width()/ 5 ;
}
function img_pass_reset()
{
    resp='' ;
    $the_jquery("#edt_pw").val(resp) ;
    $the_jquery("#edt_pw2").val(resp) ;
    $the_jquery("#edt_pw3").val(resp) ;
}
var autres = "#()&lt;&gt;&amp;[]-@$*%!§/\\" ;
var chiffres = "0123456789" ;
var majs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
var majs2 = "AEIOUY" ;
var majs1 = "BCDFGJKLMNPQRSTVWXZ" ;
var mins = majs.toLowerCase() ;
var mins1 = majs1.toLowerCase() ;
var mins2 = majs2.toLowerCase() ;
function get_pw()
{
   var inp, inp1, inp2  ;
   var outp, outp1  ;
   var len = document.getElementById("pw_size").selectedIndex + 1 ;
   inp = "" ;
   inp1 = "" ;
   inp2 = "" ;
   if ( document.getElementById("F_MAJ").checked == true)
   {
      inp = inp + majs ;
      inp1 = inp1 + majs1 ;
   }
   if ( document.getElementById("F_MIN").checked == true)
   {
      inp = inp + mins ;
      inp1 = inp1 + mins1 ;
   }
   if ( document.getElementById("F_AUT").checked == true)
   {
      inp = inp + autres ;
   }
   if ( document.getElementById("F_FIG").checked == true)
   {
      inp = inp + chiffres ;
      inp1 = inp1 + chiffres ;
   }
   outp = inp.charAt(Math.floor(Math.random()*inp.length)) ;
   outp1 = inp1.charAt(Math.floor(Math.random()*inp1.length)) ;
   
   inp = "" ;
   inp1 = "" ;
   inp2 = "" ;
   if ( document.getElementById("M_MAJ").checked == true)
   {
      inp = inp + majs ;
      inp1 = inp1 + majs1 ;
      inp2 = inp2 + majs2 ;
   }
   if ( document.getElementById("M_MIN").checked == true)
   {
      inp = inp + mins ;
      inp1 = inp1 + mins1 ;
      inp2 = inp2 + mins2 ;
   }
   if ( document.getElementById("M_AUT").checked == true)
   {
      inp = inp + autres ;
      inp1 = inp1 + autres ;
      inp2 = inp2 + autres ;
   }
   if ( document.getElementById("M_FIG").checked == true)
   {
      inp = inp + chiffres ;
      inp1 = inp1 + chiffres ;
      inp2 = inp2 + chiffres ;
   }
   var i ;
   for (i = 0 ; i < len - 2 ; i++)
   {
      outp = outp + inp.charAt(Math.floor(Math.random()*inp.length)) ;
      if ( i % 3 == 0)
      {
         outp1 = outp1 + inp2.charAt(Math.floor(Math.random()*inp2.length)) ;
      }
      else if ( i % 3 == 1)
      {
         outp1 = outp1 + inp1.charAt(Math.floor(Math.random()*inp1.length)) ;
      }
      else if ( i % 3 == 2)
      {
         outp1 = outp1 + inp2.charAt(Math.floor(Math.random()*inp2.length)) ;
      }
   }
   
   inp = "" ;
   inp1 = "" ;
   if ( document.getElementById("L_MAJ").checked == true)
   {
      inp = inp + majs ;
      inp1 = inp1 + majs1 ;
   }
   if ( document.getElementById("L_MIN").checked == true)
   {
      inp = inp + mins ;
      inp1 = inp1 + mins1 ;
   }
   if ( document.getElementById("L_AUT").checked == true)
   {
      inp = inp + autres ;
   }
   if ( document.getElementById("L_FIG").checked == true)
   {
      inp = inp + chiffres ;
      inp1 = inp1 + chiffres ;
   }
   outp = outp + inp.charAt(Math.floor(Math.random()*inp.length)) ;
   outp1 = outp1 + inp1.charAt(Math.floor(Math.random()*inp1.length)) ;
   $the_jquery("#txt_pw").val(outp) ;
   $the_jquery("#txt_pw2").val(outp1) ;
}
function init_gene_pass()
{
   var list = document.getElementById("pw_size") ;
   list.remove(0) ;
   var i, opt ;
   for (i = 1 ; i < 21; i++)
   {
      opt = document.createElement("option");
      opt.text = i ;
      opt.value = i ;
      list.add(opt) ;
   }
   list.selectedIndex= 7 ;
}
function copy_pw()
{
}


