
//- these are the databasases bit you'll ever need to change

var jsunarray = new Array("admin", "car2006", "apest2006", "create2005", "matthoddy", "hannahrodgers", "autotechnik");
var jspwarray = new Array("squareback", "roly1", "william1", "william1", "matt2006", "hr2006", "geoff2006");
var jspagearray = new Array("proofstemp.html", "car2005.html", "apest2005.html", "create2005.html", "matthoddy2006.html", "hr2006.html", "autotechnik2006.html");

//- Remember to incredment this number everytime you add a new user

var users = 7;

//- this is the main function DON'T CHANGE ANYTHING BELOW HERE


var wrongtag = 0;

function pasuser(form) {

for(var i=0;i<users;i++) {

if (form.id.value==jsunarray[i]) {
if (form.pass.value==jspwarray[i]) {
location=jspagearray[i];
stop;
} else {
wrongtag = 1;
}
} else {  
wrongtag = 1;
}

}

if (wrongtag==1) {
alert("Your Username or Password is not correct!\nPlease email info@cdesignltd.co.uk for assistance!");
}

}

