Люди, вот помогите мне подправить этот скрипт, а то дебаггер такую муйню метет, что аж подумать страшно. Программа вроде генератора паролей.
<html>
<head>
<script type="text/javascript">
function getrandom(min_random, max_random) {
var range = max_random - min_random + 1;
return Math.floor(Math.random()*range) + min_random;
}
function go()
{
document.getElementById('getran').value=getrandom(1,92)
var gtr=document.getElementById('getran').value
alert(gtr)
if (gtr ==1 ) {document.getElementById('pass').value+'a'}
if (gtr ==2 ) {document.getElementById('pass').value+'b'}
if (gtr ==3 ) {document.getElementById('pass').value+'c'}
if (gtr ==4 ) {document.getElementById('pass').value+'d'}
if (gtr ==5 ) {document.getElementById('pass').value+'e'}
if (gtr ==6 ) {document.getElementById('pass').value+'f'}
if (gtr ==7 ) {document.getElementById('pass').value+'g'}
if (gtr ==8 ) {document.getElementById('pass').value+'h'}
if (gtr ==9 ) {document.getElementById('pass').value+'i'}
if (gtr ==10 ) {document.getElementById('pass').value+'j'}
if (gtr ==11 ) {document.getElementById('pass').value+'k'}
if (gtr ==12 ) {document.getElementById('pass').value+'l'}
if (gtr ==13 ) {document.getElementById('pass').value+'m'}
if (gtr ==14 ) {document.getElementById('pass').value+'n'}
if (gtr ==15 ) {document.getElementById('pass').value+'o'}
if (gtr ==16 ) {document.getElementById('pass').value+'p'}
if (gtr ==17 ) {document.getElementById('pass').value+'q'}
if (gtr ==18 ) {document.getElementById('pass').value+'r'}
if (gtr ==19 ) {document.getElementById('pass').value+'s'}
if (gtr ==20 ) {document.getElementById('pass').value+'t'}
if (gtr ==21 ) {document.getElementById('pass').value+'u'}
if (gtr ==22 ) {document.getElementById('pass').value+'v'}
if (gtr ==23 ) {document.getElementById('pass').value+'w'}
if (gtr ==24 ) {document.getElementById('pass').value+'x'}
if (gtr ==25 ) {document.getElementById('pass').value+'y'}
if (gtr ==26 ) {document.getElementById('pass').value+'z'}
if (document.getElementById('grs')='checked')
{
if (gtr ==27 ) {document.getElementById('pass').value+'а'}
if (gtr ==28 ) {document.getElementById('pass').value+'б'}
if (gtr ==29 ) {document.getElementById('pass').value+'в'}
if (gtr ==30 ) {document.getElementById('pass').value+'г'}
if (gtr ==31 ) {document.getElementById('pass').value+'д'}
if (gtr ==32 ) {document.getElementById('pass').value+'е'}
if (gtr ==33 ) {document.getElementById('pass').value+'ё'}
if (gtr ==34 ) {document.getElementById('pass').value+'ж'}
if (gtr ==35 ) {document.getElementById('pass').value+'з'}
if (gtr ==36 ) {document.getElementById('pass').value+'и'}
if (gtr ==37 ) {document.getElementById('pass').value+'й'}
if (gtr ==38 ) {document.getElementById('pass').value+'к'}
if (gtr ==39 ) {document.getElementById('pass').value+'л'}
if (gtr ==40 ) {document.getElementById('pass').value+'м'}
if (gtr ==41 ) {document.getElementById('pass').value+'н'}
if (gtr ==42 ) {document.getElementById('pass').value+'о'}
if (gtr ==43 ) {document.getElementById('pass').value+'п'}
if (gtr ==44 ) {document.getElementById('pass').value+'р'}
if (gtr ==45 ) {document.getElementById('pass').value+'с'}
if (gtr ==46 ) {document.getElementById('pass').value+'т'}
if (gtr ==47 ) {document.getElementById('pass').value+'у'}
if (gtr ==48 ) {document.getElementById('pass').value+'ф'}
if (gtr ==49 ) {document.getElementById('pass').value+'х'}
if (gtr ==50 ) {document.getElementById('pass').value+'ц'}
if (gtr ==51 ) {document.getElementById('pass').value+'ч'}
if (gtr ==52 ) {document.getElementById('pass').value+'ш'}
if (gtr ==53 ) {document.getElementById('pass').value+'щ'}
if (gtr ==54 ) {document.getElementById('pass').value+'ъ'}
if (gtr ==55 ) {document.getElementById('pass').value+'ы'}
if (gtr ==56 ) {document.getElementById('pass').value+'ь'}
if (gtr ==57 ) {document.getElementById('pass').value+'э'}
if (gtr ==58 ) {document.getElementById('pass').value+'ю'}
if (gtr ==59 ) {document.getElementById('pass').value+'я'}
}
if (document.getElementById('symb')='checked')
{
if (gtr ==60 ) {document.getElementById('pass').value+'`'}
if (gtr ==61 ) {document.getElementById('pass').value+'~'}
if (gtr ==62 ) {document.getElementById('pass').value+'!'}
if (gtr ==63 ) {document.getElementById('pass').value+'@'}
if (gtr ==64 ) {document.getElementById('pass').value+'#'}
if (gtr ==65 ) {document.getElementById('pass').value+'$'}
if (gtr ==66 ) {document.getElementById('pass').value+'%'}
if (gtr ==67 ) {document.getElementById('pass').value+'^'}
if (gtr ==68 ) {document.getElementById('pass').value+':'}
if (gtr ==69 ) {document.getElementById('pass').value+'&'}
if (gtr ==70 ) {document.getElementById('pass').value+'*'}
if (gtr ==71 ) {document.getElementById('pass').value+'('}
if (gtr ==72 ) {document.getElementById('pass').value+')'}
if (gtr ==73 ) {document.getElementById('pass').value+'-'}
if (gtr ==74 ) {document.getElementById('pass').value+'_'}
if (gtr ==75 ) {document.getElementById('pass').value+'='}
if (gtr ==76 ) {document.getElementById('pass').value+'+'}
if (gtr ==77 ) {document.getElementById('pass').value+'/'}
if (gtr ==79 ) {document.getElementById('pass').value+'?'}
if (gtr ==80 ) {document.getElementById('pass').value+'>'}
if (gtr ==81 ) {document.getElementById('pass').value+'<'}
if (gtr ==82 ) {document.getElementById('pass').value+'.'}
}
if(document.getElementById('num')='checked')
{
if (gtr ==83 ) {document.getElementById('pass').value+'0'}
if (gtr ==84 ) {document.getElementById('pass').value+'1'}
if (gtr ==85 ) {document.getElementById('pass').value+'2'}
if (gtr ==86 ) {document.getElementById('pass').value+'3'}
if (gtr ==87 ) {document.getElementById('pass').value+'4'}
if (gtr ==88 ) {document.getElementById('pass').value+'5'}
if (gtr ==89 ) {document.getElementById('pass').value+'6'}
if (gtr ==90 ) {document.getElementById('pass').value+'7'}
if (gtr ==91 ) {document.getElementById('pass').value+'8'}
if (gtr ==92 ) {document.getElementById('pass').value+'9'}
}
}
</script>
</head>
<body bgcolor="black" text="white">
<input type='hidden' id='getran'>
<center>
<br><br><br><br>
<input type="text" id="pass"><br>
<input type="button" onClick="go()"value="Generate"><br>
<input type="checkbox" id="grs">+ использовать русские буквы<br>
<input type="checkbox" id="symb">+ использовать символы<br>
<input type="checkbox" id="num">+ использовать числа<br>
</center>
</body>
</html>