var NumberChr = [48, 10]
var LowCaseChr = [97, 26]
var UpCaseChr = [65, 26]
var CurCheckCode="";
var AllChr=[NumberChr,LowCaseChr,UpCaseChr]
function getCheckKey(len) {
     var str=""; 
     for(var i=0;i<len;i++){
       str+=randomOne();
     }
     CurCheckCode = str;
     return str;
}
function randomOne(){
   var idx = Math.round(Math.random()*100);
   var tidx = Math.round(Math.random()*2); 
   var ct = AllChr[tidx];
   var chrcode = ct[0]*1+idx%ct[1];
   var chr = String.fromCharCode(chrcode);
   return chr;
}