var kc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var textu = new String();
var textp = new String();
var user = new Array();
var url = new Array();
user[0] = new Array("fbs2004","snpgf");
url[0] = new Array("thisisformembersonly.htm");
function schluessel(u,p){
	this.textu = code(u);
	this.tr = "";
	this.textp = code(p);
	for(x = 0; x < this.user.length; x++){
		if((this.textu == this.user[x][0]) && (this.textp == this.user[x][1])){
			window.location.href = ""+url[x];
			break;
			return false;
		}
		else if((x==this.user.length-1) || (this.textu != this.user[x][0]) || (this.textp != this.user[x][1])){
			alert("Falscher Benutzer / Passwort!");
			break;
			return false;
		}
	}
}
function code(text){
	var tr = new String();
	text = text.toLowerCase();
	for(var i = 0; i < text.length; i++){
		var cc = text.substring(i, i + 1);
		var pos = this.kc.indexOf(cc.toUpperCase());
		if(pos >= 0){
			pos = (pos + this.kc.length / 2) % kc.length;
			cc = (cc == cc.toUpperCase()) ? kc.substring(pos, pos + 1) : kc.substring(pos, pos + 1).toLowerCase();
		}
	tr = tr + cc;
	}
return tr;
}
