I need someone who is willing to convert the following javascript code to create a visual basic form that will do the same. actually, it doesnt have to be visual basic but that is the only language that i think i could do the following in.

The code for this website allows a student to type in his/her name and id code to get to his/her webgrades. The name input generates a code that is placed at the end of the schools url (such as www.myschool.edu/grades/the_code_right_here.html) I looked through the code and it seems like the id password has no bearing on the creation of this code. I would like an application (not online) that I would like to be able to input a students name in this application and be able to tell him his url code and (if possible--- i doubt it) his id password. The javascript code is right here.

function CharCode(str, ch) {

var space = " ";
var chars = ",-.";
var digit = "0123456789";
var lower = "abcdefghijklmnopqrstuvwxyz";
var upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

code = space.indexOf(str.substr(ch, 1));
if (code != -1) return code + 32;

code = chars.indexOf(str.substr(ch, 1));
if (code != -1) return code + 44;

code = digit.indexOf(str.substr(ch, 1));
if (code != -1) return code + 48;

code = lower.indexOf(str.substr(ch, 1));
if (code != -1) return code + 97;

code = upper.indexOf(str.substr(ch, 1));
if (code != -1) return code + 65;

return -1;

}
function ShowGrades() {

var ch = 0, len = 0, pos = 0, code = 0, total1 = 0, total2 = 0;

id = document.authorization.password.value;
len = id.length;

if (len <= 2) id = id + id;
if (len <= 4) id = id + id;
if (len <= 6) id = id + id;

pos = 15;
len = id.length;

for (ch = 0; ch <= len - 1; ch++) {

code = CharCode(id, ch);

if ((code == 32 ) ||
(code >= 44 && code <= 46) ||
(code >= 48 && code <= 57) ||
(code >= 65 && code <= 90) ||
(code >= 97 && code <= 122)) {

pos += 1;
total1 += pos * (code - 31);

}

}

name = document.authorization.username.value;
len = name.length;
pos = 31;

for (ch = 0; ch <= len - 1; ch++) {

code = CharCode(name, ch);

if ((code == 32 ) ||
(code >= 44 && code <= 46) ||
(code >= 65 && code <= 90) ||
(code >= 97 && code <= 122)) {

pos += 1;
total2 += pos * (code - 31);

}

}


for (var i=0; i < document.authorization.ss.length; i++)
{
if (document.authorization.ss[i].checked)
{
var school = document.authorization.ss[i].value;
}
}

url = "http://www.myschool.org/webgrades/" + total1 * total2 + ".html";
window.location = url;

return false;

}



Actually, now taht i look at it a second time, i think that the password actaully does have a bearing on the value of the url-- but i will let an expert look into that, i am sure there is a way to allow a student to ask me what his/her id and url are and i could tell them if they give me their name. Thanks for any help you can give.

Kenan