function val_password(strText) { 

	//have to split regex to work on older browsers

	//password must satisfy the following.
	//* Password should be 4 to 12 character long.
	//* Password should have at least one alpha character.
	//* Password should have at least one numeric character.
	//* Password should only contain alphanumerics

	var x1 = /^[a-z\d]{4,12}$/i; // only alphanumerics, and length 4-12
	var x2 = /[a-z]/i;           // a letter present
	var x3 = /\d/;               // a digit present

	if (x1.test(strText) && x2.test(strText) && x3.test(strText)) {
		return true;
	} else {
		return false;
	}

} 

