function addValue(newValue) { if (CapsLockValue==) { var str=Calc.password.value; if(str.length{ Calc.password.value += newValue; } if(str.length{ password.value=Calc.password.value; } } else { var str=Calc.password.value; if(str.length{ //Calc.password.value += newValue.toUpperCase(); Calc.password.value += newValue; } if(str.length{ password.value=Calc.password.value; } } }
function setpassvalue() { var longnum=Calc.password.value.length; var num num=Calc.password.value.substr(,longnum-); Calc.password.value=num; var str=Calc.password.value; password.value=Calc.password.value; }
function OverInput() { var str=Calc.password.value; password.value=Calc.password.value; closekeyboard(); Calc.password.value=""; password.readOnly=; }
function closekeyboard(theForm) { softkeyboard.style.display="none"; if(null!=unhideSelect){ unhideSelect(); } }
function showkeyboard() { randomNumberButton(); var th = password; var ttop = th.offsetTop; var thei = th.clientHeight; var tleft = th.offsetLeft; var ttyp = th.type; while (th = th.offsetParent){ttop+=th.offsetTop; tleft+=th.offsetLeft;} softkeyboard.style.top = ttop+thei+; softkeyboard.style.left = tleft-; softkeyboard.style.display="block"; password.readOnly=; password.blur(); document.all.useKey.focus(); if(null!=hideSelect){ hideSelect(); } }
function setCapsLock() { if (CapsLockValue==) { CapsLockValue= } else { CapsLockValue= } } function setCalcborder() { CalcTable.style.border="px solid #BADF" } function setHead() { CalcTable.cells[].style.backgroundColor="#BADF" } function setCalcButtonBg() { for(var i=;i{ if(Calc.elements[i].type=="button"&&Calc.elements[i].bgtype!="") { if(Calc.elements[i].bgtype==""){ Calc.elements[i].className="btn_num"; }else{ Calc.elements[i].className="btn_letter"; } var str=Calc.elements[i].value; str=str.trim(); if(str.length==) { } var thisButtonValue=Calc.elements[i].value; thisButtonValue=thisButtonValue.trim(); if(thisButtonValue.length==) { Calc.elements[i].onclick= function () { var thisButtonValue=this.value; thisButtonValue=thisButtonValue.trim(); thisButtonValue=jiamiMimaKey(thisButtonValue); addValue(thisButtonValue); } Calc.elements[i].ondblclick= function () { var thisButtonValue=this.value; thisButtonValue=thisButtonValue.trim(); thisButtonValue=jiamiMimaKey(thisButtonValue); addValue(thisButtonValue); } } } } } function initCalc() { setCalcborder(); setHead(); setCalcButtonBg(); } String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } var capsLockFlag; capsLockFlag=true; function capsLockText() { if(capsLockFlag) { for(var i=;i{ var char=Calc.elements[i].value; var char=char.trim() if(Calc.elements[i].type=="button"&&char>="a"&&char{ Calc.elements[i].value=" "+String.fromCharCode(char.charCodeAt()-)+" " } } } else { for(var i=;i{ var char=Calc.elements[i].value; var char=char.trim() if(Calc.elements[i].type=="button"&&char>="A"&&char{ Calc.elements[i].value=" "+String.fromCharCode(char.charCodeAt()+)+" " } } } capsLockFlag=!capsLockFlag; }
function randomNumberButton(){ var a = new Array(); a[]=;a[]=;a[]=;a[]=;a[]=;a[]=;a[]=;a[]=;a[]=;a[]=; var randomNum; var times=; for(var i=;irandomNum = parseInt(Math.random()*); var tmp=a[]; a[]=a[randomNum]; a[randomNum]=tmp; } Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; Calc.button_number.value=" "+a[]+" "; }
function hideSelect(){ var i=; while(idocument.getElementsByTagName("select")[i].style.visibility = "hidden"; i=i+; } }
function unhideSelect(){ var i=; while(idocument.getElementsByTagName("select")[i].style.visibility = "visible"; i=i+; } }
function jiamiMimaKey(newValue) { if (typeof(b) == "undefined" || typeof(ifUseYinshe) == "undefined" || ifUseYinshe == ) {return newValue;} var everyone = ''; var afterPass = ''; for (var i=;i everyone = newValue.charAt(i); for (var j =;j if (everyone == b[*j]) { afterPass = afterPass + b[*j+]; break; } } } newValue= afterPass; jiami =; return afterPass; }