// $Id: register.js,v 1.2 2009/12/14 07:48:57 santiago Exp $
var arrAlph = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "_", "a", "b", "c", "d", "e", "f", "g", "h", 
				     "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "r", "s", "t", "u", "v", "x", "y", "z", 
					  "A", "B", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "O", "P", "Q", "R", "S", 
					  "T", "U", "V", "X", "Y", "Z"];	

function generatePassword(passwdFld) 
{
	if (passwdFld) {
		var nLength = Math.floor(Math.random()*6)+6;
		var str = "";
		for(i=0; i<nLength; i++) 
		{
			var sNum = Math.floor(Math.random() * (arrAlph.length - 1));
		    str += arrAlph[sNum];
		}
		passwdFld.val(str);
	}
	return true;
}
