/*
*** PASSWORD CHECKER #1 ***
This extension checks to see if the Password Cookie is on the user's
computer, then verifys that the User ID and Password are in the PMass list. 
*/
function CMPasswordCheck(cookie, string) {
	//Create and load the Cookie object you want to work with first.
	var cookie = new CMCookie(document, cookie, 0);
	//If there is a Cookie.
	if (cookie.loadCookie()) {
		//Initialize the PMassID variable.
		var access = eval("PMass_" + 0);
		var cmcheck = access();
		//If there are userid and password fields.
		if (cookie.userid != null && cookie.password != null) {
			//Check all the passwords.
			for (var i = 1; PMassID.toLowerCase() != "end"; i++) {
				//Setup the Function pointer.
				access = eval("PMass_" + i);
				//Point to the userid and the password.
				cmcheck = access();
				//If the userid and password match.
				if (cookie.userid != "" && cookie.password != "" && cookie.userid == PMassID && cookie.password == PMassPassw) {
					//Change this URL to your own...
					window.location.href = "http://webmail.nuborgh.nl/gw/webacc";
					//UserID and Password are confirmed. Return without checking the rest of the list.
					return true;
				}
			}
		}
	}
	return false;
}