protected = new Array("danoboss", "max", "robman79", "lister88", "urna"); // add another names here

function protect(name) {
	if (protected.contains(name.value.toLowerCase().trim())) {
		if (navigator.appName == 'Microsoft Internet Explorer') {
			document.getElementById("password").style.display = "block";
		}
		else {
			document.getElementById("password").style.display = "table-row";
		}
	}
	else {
		document.getElementById("password").style.display = "none";
	}
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}

Array.prototype.contains = function(obj) {
	var i = this.length;

	while (i--) {
		if (this[i] === obj) {
			return true;
		}
	}

	return false;
}
