var validated = false;

function validateGroup1(){
	var redirect = "http://www.frucon.net/quickstep/index_uk.htm";
	var logincode = document.frmLogin.txtLogin.value;
	
	
	var codes = Array(
 					    'QSDUK12',
						'TEST0002',
						'TEST0003'
					);
	
	/* iterate through codes and check if they occur in the list */
	for(i = 0 ; i< codes.length;i++){
		if(codes[i] == logincode){
			validated = true;
			document.location.href = redirect;

		}
	}
}

function validateLogin(){
	// validate group 1 
	validateGroup1();

	if(!validated){
		alert("incorrect code was given");
	}
}