﻿// determines which option is selected in the map types drop down 
// and executes the callback to change map visibility
function submitSite(uniqueID, clientID) {
    // find the outer span
    var span = document.getElementById(clientID);

    // find the select box
    var select = null;
    for (var i = 0; i < span.childNodes.length; i++) {
        if (span.childNodes[i].tagName == "SELECT") {
            select = span.childNodes[i];
        }
    }

    // get the selected value
    var selectedValue = null;
    for (var i = 0; i < select.options.length; i++) {
        if (select.options[i].selected == true) {
            selectedValue = select.options[i].value;
        }
    }

    // do the callback
    var context = "";
    var argument = "Site=" + selectedValue;
    Geocortex_Essentials_doCallback(argument, context, uniqueID, clientID);
}
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();