//SECONDARY CODE 2 - Start - Department Drop list
//Start - Department Drop List - Fixed List
function GetDeptValues(departmentfld){
  var m_deptvalue = departmentfld.value;
  var m_branch = this.getField("CSTM_DEPT_BRANCH_VALUES").value; //Hidden field with all dept name-values.
  var a_branchlistpairs = m_branch.split(";");
  var k = "";
  var m_branchname; var m_branchval;
 
  for (i=0;i<a_branchlistpairs.length;i++)  
  {
    var a_branchItem = a_branchlistpairs[i].split(":");
// app.alert (a_branchItem[0]);
 // app.alert (a_branchItem[1]);
    m_branchname = a_branchItem[0];
    m_branchval = a_branchItem[1];
    departmentfld.insertItemAt(m_branchname, m_branchval,-1);
  }
	if (m_deptvalue == "[None]" || m_deptvalue == null) departmentfld.value = departmentfld.getItemAt(0);
		else departmentfld.value = m_deptvalue;
}
//SECONDARY CODE 2 - End - Department Drop List
