var ajaxreq = false, ajaxCallback; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //NAME: ajaxRequest() //PURPOSE: //ARG: //RET: //NOTE: //DLM: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ajaxRequest(filename) { try { ajaxreq = new XMLHttpRequest(); } catch (error) { try { ajaxreq = new ActiveXObject("Microsoft.XMLHTTP"); } catch (error) { return false; } } ajaxreq.open("GET",filename); ajaxreq.onreadystatechange = ajaxResponse; ajaxreq.send(null); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //NAME: ajaxResponse() //PURPOSE: //ARG: //RET: //NOTE: //DLM: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function ajaxResponse() { if (ajaxreq.readyState != 4) return; if (ajaxreq.status == 200) { if (ajaxCallback) ajaxCallback(); } else alert("Request failed: " + ajaxreq.statusText); return true; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //NAME: js_getLayerSelect() //PURPOSE: update property location form //ARG: layer, unit_id //RET: //NOTE: //DLM: //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function js_getLayerSelect(layer, unit_id) { var parent_id = (layer * 1) - 1; if (unit_id == 0) { var selection = document.getElementById("layer" + parent_id + "_select").selectedIndex; var id = document.getElementById("layer" + parent_id + "_select").options[selection].value; } else { id = unit_id; } if (unit_id != 0) { var options = document.getElementById("layer" + parent_id + "_select").options; for (x=0;x 0 && level[0].childNodes[0].nodeValue < 8) { //GET RID OF ADDRESS BOX IF PREVIOUSLY DISPLAYED document.getElementById("actual_address_textarea_block").style.display = 'none'; var layer_span = document.createElement("SPAN"); layer_span.id = "layer" + level[0].childNodes[0].nodeValue + "_span"; layer_span.setAttribute("class","layer_span"); layer_span.setAttribute("className","layer_span"); //var layer_span_text = document.createTextNode("Layer " + level[0].childNodes[0].nodeValue); //var layer_span_text_br = document.createElement("BR"); var layer_select = document.createElement("SELECT"); layer_select.name = "layer" + level[0].childNodes[0].nodeValue + "_id"; layer_select.id = "layer" + level[0].childNodes[0].nodeValue + "_select"; layer_select.onchange = new Function("js_getLayerSelect(" + child_level_id + ",0)"); var layer_select_choose_option = document.createElement("OPTION"); layer_select_choose_option.text = "Please choose"; layer_select_choose_option.value = ''; if (navigator.appName == 'Microsoft Internet Explorer') layer_select.add(layer_select_choose_option); if (navigator.appName == 'Netscape') layer_select.add(layer_select_choose_option,null); var layer_select_nl_option = document.createElement("OPTION"); layer_select_nl_option.text = "Not listed"; layer_select_nl_option.value = '0'; if (navigator.appName == 'Microsoft Internet Explorer') layer_select.add(layer_select_nl_option); if (navigator.appName == 'Netscape') layer_select.add(layer_select_nl_option,null); for (i=0;i