<!--

// USERNAME / PASSWORD VERIFICATION
// -----------------------------------------------------------
// These functions verify that the user attempting to log into
//   the development page has a legitimate reason to be here

function LogIn(Username, Password)
{
	this.Username = Username;
	this.Password = Password;
}

function CheckPass(ID, PW)
{
	// Declare Variables
	var User = new Array;

	// add users here
	User[0] = new LogIn("Admit", "!@one@!");
	// continue adding logins here

	// Highest subscript of Username/Password pairs
	var HighestIndex = 0;

	// Find Username
	for ( var i = 0; ((i <= HighestIndex) && (ID != User[i].Username)); i++ )
	{
	}

	// Determines why the for loop was broken:
	// case1: end of array reached
	if (i > HighestIndex)
	{
		FtA();
	}

	// case2: found a username, check password
	else if (PW == User[i].Password)
	{
		location.replace("http://65.106.217.240/hillminerals/index.html");
	}

	// case3: correct username, incorrect password
	else
	{
		FtA();
	}
}

function FtA()
{
	alert("Incorrect Username or Password");
	location.replace("HMG_LogIn.htm");
}



// -->