function getBrowser () {
  if  (navigator.appName == "Netscape") {
    return 'ns4'; }
  if  (navigator.appName == "Microsoft Internet Explorer") {
    return 'msie'; }
//  switch (navigator.appName) {
//    case "Navigator" :
//      return 'ns4';
//    case "Microsoft Internet Explorer" :
//      return 'msie';
//    default :
  alert("Unknown browser - " + navigator.appName);
  return 'Unknown';
}

var ctoIds = new Array();
var ctoNames = new Array();

function FillCto (item) {
  var i;
  var n = item.form.govtDept.selectedIndex;
  var govtDeptId = item.form.govtDept.options[n].value;

//  if  (getBrowser != 'ns4') { return; }

//alert("govtDeptId " + govtDeptId);
  if  (n >= 0) {
//alert('no of ctos: ' + ctoIds[govtDeptId].length);
    for (i = 0; i < item.form.cto.length; i++) {
      item.form.cto.options[i] = null; }
//      delete(item.form.cto.options[i]); }
    item.form.cto.length = 0;
    for (i = 0; i < ctoIds[govtDeptId].length; i++) {
      item.form.cto.options[i] = new Option(ctoNames[govtDeptId][i],ctoIds[govtDeptId][i]); }
    item.form.cto.options[0].selected = 1; }
}

function Help (item,topic) {

alert('Help called: ' + window.document.anchors['help'].href);
alert('Help called: ' + window.document.links['help'].href);
//this.link.href = 'xxx';

}

var help = new Array();

help["csv"] = "The CSV format consists of comma-separated data which can be imported into spreadsheets and " +
"databases.\n\nChecking the CSV box will show a comma-separated list which can be saved as a file and subsequently be imported into a spreadsheet.\n\nAlternatively the list can be cut and pasted directly into the spreadsheet.";


