
/*
To add/change users & Passwords just change the users array 
and passwords were it tells you.

You can have as many/little as you like 
When you add a new user be sure to add a Pass word
so a new user would look like
" users[7] = 'username'; pass[7] = 'password' "
(without "s)

REMEMBER: Usernames & Passwords are case sensative so 'pass'
is differnt to 'Pass' & 'PaSs'
*/

// -------- Set Vars -----------
var users = new Array()
var pass = new Array()
	users[0] = 'Admin'; pass[0] = '23nmk23m'	//Leave this Username for Webmaster (you) but change password
//Add/change user names here & Add/chage passwords here
	users[1] = 'zupsic'; pass[1] = 'fresno01'	//User1 name & password
	users[2] = 'jon'; pass[2] = 'fresno02'	//User1 name & password

var wrighturl = 'internal.html'	//Page you want the user to go to if Password is wright
var wrighturl2 = 'propertylist.htm'
var wrongurl = 'badpass.html'	//  "   "   "    "   "   "  "  "  "    "   "  "  wrong

//-----------------------------------------
//----------- Leave this alone ------------
function isPass(){
	var dn = document.nameenter
	userN = dn.usern.value
	passV = dn.pass.value
	if (userN.length < 1){ alert('Enter Username'); return false }
	if (passV.length < 1){ alert('Enter Password'); return false }
	for (var i = 0; i < users.length ; i++){
	if (users[i] == userN && pass[i] == passV){ location.href = wrighturl; return false}
	if (users[i] == userN && pass[i] != passV){ location.href = wrongurl; return false}
	}
	location.href = wrongurl
}
function list(){
	userO=window.open('about:blank','winID','height=400,width=200,top=100,left=100,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no')
	userO.document.write('<u><big> List Of Users </big></u><br> \n')
	for (var u = 0; u < users.length; u++){
		userO.document.write(' &raquo; ' + users[u] + "<br> \n")
	}
	userO.document.write('<a href="javascript:window.close()"> Close </a>')
}
//------------------------------------------
//------------------------------------------
//       DISCLAIMER
// USE SCRIPT AT OWN RISK
function isPass2(){
	var dn = document.nameenter
	userN = dn.usern.value
	passV = dn.pass.value
	if (userN.length < 1){ alert('Enter Username'); return false }
	if (passV.length < 1){ alert('Enter Password'); return false }
	for (var i = 0; i < users.length ; i++){
	if (users[i] == userN && pass[i] == passV){ location.href = wrighturl2; return false}
	if (users[i] == userN && pass[i] != passV){ location.href = wrongurl; return false}
	}
	location.href = wrongurl
}

