function hintQuestEntry(code, text){
  this.code = code;
  this.text = text;
};
var hintQuestTable = new Array(
	new hintQuestEntry( "PQS001", "What is your pet's name?"),
	new hintQuestEntry( "PQS002", "What was the name of your first school?"),
	new hintQuestEntry( "PQS003", "Who was your childhood hero?"),
	new hintQuestEntry( "PQS004", "What is your favorite pastime?"),
	new hintQuestEntry( "PQS005", "What is your all-time favorite sports team?"),
	new hintQuestEntry( "PQS006", "What is your father's middle name?"),
	new hintQuestEntry( "PQS007", "What was your high school mascot?"),
	new hintQuestEntry( "PQS008", "What make was your first car or bike?"),
	new hintQuestEntry( "PQS009", "Where did you first meet your spouse?")
);

function makeHintQuestOptions(oSelect, selectedCode){
  var oOption = null;
  /*oOption = document.createElement("option");
  oSelect.options.add(oOption);
  oOption.value = "";  
  oText = document.createTextNode("[Select a Question]");
  oOption.appendChild(oText);
  oOption.selected = true;*/
  for(var i=0; i < hintQuestTable.length;i++) {
    oOption = document.createElement("option");
    oSelect.options.add(oOption);
    oText = document.createTextNode(hintQuestTable[i].text);
    oOption.appendChild(oText);
    oOption.value = hintQuestTable[i].code;
    if( hintQuestTable[i].code == selectedCode) oOption.selected = true;
  }
}
function makeHintQuestOptionsForEdit(oSelect, selectedCode){
  var oOption = null;
  oOption = document.createElement("option");
  oSelect.options.add(oOption);
  oOption.value = "";  
  oText = document.createTextNode("[Use the current Security Question]");
  oOption.appendChild(oText);
  oOption.selected = true;
  for(var i=0; i < hintQuestTable.length;i++) {
    oOption = document.createElement("option");
    oSelect.options.add(oOption);
    oText = document.createTextNode(hintQuestTable[i].text);
    oOption.appendChild(oText);
    oOption.value = hintQuestTable[i].code;
    if( hintQuestTable[i].code == selectedCode) oOption.selected = true;
  }
}

function getHintQuestText(code){
	for(var i=0;i < hintQuestTable.length;i++) {
		if( code == hintQuestTable[i].code)	return hintQuestTable[i].text;
	}
	return "";
}

function getHintQuestCodeRamdom(fixCode){
	if(fixCode==""){
		var randomChoose = ((new Date()).getTime() % hintQuestTable.length);
		fixCode = hintQuestTable[randomChoose].code;
	}
	return(fixCode);
}

