var req; var response; function getRequest(){ if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } } function getResponse(url){ getRequest(); req.open("GET", url, true); req.onreadystatechange = run; req.send(null); } function run(){ if (req.readyState == 4) { if (req.status == 200) { response = eval('(' + req.responseText + ')'); processResponse(); } } } function processListObj(listObj){ var frm=document.forms[listObj.targetForm]; enableFormElements(frm); var lItem=frm[listObj.targetName]; clearList(lItem); var optns=listObj.targetValue; for (x in optns){ addList (x,lItem,optns[x]); } } function clearList(listItem){ listItem.options.length=0; } function addList(i,LItem,optn){ LItem.options[i]=new Option(optn.value, optn.name); } function enableFormElements(frm){ for (var x=0; x