  var cats = new Array(new Array("Consulting", " ", " ","none",""),new Array("Consulting", "General", " ","none",""),new Array("Hardware TS", " ", " ","none",""),new Array("Hardware TS", "Hardware Removal/Installation", " ","none",""),new Array("Hardware TS", "Hardware Troubleshooting", " ","none",""),new Array("PC Maintenance", " ", " ","none",""),new Array("Software TS", " ", " ","none",""),new Array("Software TS", "Data Recovery", " ","none",""),new Array("Software TS", "Malware Removal", " ","none",""),new Array("Software TS", "Software Install/Removal", " ","none",""),new Array("Software TS", "Software Troubleshooting", " ","none",""),new Array("Support", "General", "","none"," "),new Array("Training", " ", " ","none",""),new Array("Web Services", " ", " ","none",""),new Array("Web Services", "Search Engine Optimization", " ","none",""),new Array("Web Services", "Site Creation", " ","none",""),new Array("Web Services", "Site Maintenance", " ","none",""));
     function updateSubCategory() {         sub = document.frm.subcategory;         len = sub.length ;         cat = document.frm.problem_type.value;         for ( i = (len -1); i>0; i--){           sub.options[i] = null;         }         lastSub = "!NOTDEFINED!";         for ( i=0; i < cats.length ; i++){             if (cats[i][0] == cat ) {               if (lastSub != cats[i][1]) {                 lastSub = cats[i][1];                 len = sub.length;                 sub.options[len]= new Option(cats[i][1],cats[i][1]);               }             } else {               lastSub = "!NOTDEFINED!";             }         }         len = sub.length;         if (len==2) {           sub.value = sub.options[1].value;           subCatChage();         }     }     function updateThirdLevelCategory() {         third = document.frm.thirdLevelCategory;         len = third.length ;         cat = document.frm.problem_type.value;         subVal = document.frm.subcategory.value;         for ( i = (len -1); i>0; i--){           third.options[i] = null;         }         for ( i=0; i < cats.length ; i++){             if (cats[i][0] == cat && cats[i][1] == subVal) {                 len = third.length;                 third.options[len]= new Option(cats[i][2],cats[i][2]);             }         }         len = third.length;         if (len==2) {           third.value = third.options[1].value;           thirdLevelChage();         }     }     function subCatChage() {       cat = document.frm.problem_type.value;       subval = document.frm.subcategory.value;       user = "";       for ( i=0; i< cats.length ; i++){             if (cats[i][0] == cat && cats[i][1] == subval) {                 user = cats[i][3];                 if (document.frm.autoDescriptionTemplate.value=="Y" || document.frm.desc.value=="") {                   document.frm.autoDescriptionTemplate.value="Y";                   document.frm.desc.value = cats[i][4];                 }                 break;             }       }         document.frm.reRoute.value = "1";         gotoPage('-3ba8ea8c:12683348377:-8000');     }     function thirdLevelChage() {       cat = document.frm.problem_type.value;       subval = document.frm.subcategory.value;       third = document.frm.thirdLevelCategory.value;       user = "";       for ( i=0; i< cats.length ; i++){             if (cats[i][0] == cat && cats[i][1] == subval && cats[i][2] == third ) {                 user = cats[i][3];                 if (document.frm.autoDescriptionTemplate.value=="Y" || document.frm.desc.value=="") {                   document.frm.autoDescriptionTemplate.value="Y";                   document.frm.desc.value = cats[i][4];                 }                 break;             }       }          document.frm.reRoute.value = "1";          gotoPage('-3ba8ea8c:12683348377:-8000');     }
function checkChangeDesc(val) {
  if (global_value.length!=val.length) {
    setChangeDesc();
    return;
  }
  for(i=0;i< global_value.length;i++) {
    if(global_value.charAt(i) != val.charAt(i)) {
       setChangeDesc();
    }
  }
}
function setChangeDesc() {
  document.frm.autoDescriptionTemplate.value = "N"; 
}



