﻿$('#locationsMenu select').selectedIndex = 0
function CreateRequestObj(action, MenuId) {    
request = {
        "action": action,
        "MenuId": MenuId
    };
    return Ektron.JSON.stringify(request);
}

function GetResults(args) {
    $ektron.ajax({
        type: "POST",
        cache: false,
        async: false,
        url: "/Handler/getLocationmenu.ashx",
        data: { "request": args},
        success: function(msg) {AppendItemsToDropDownList(msg);}
    });
}


function getChildItems(MenuId) {
    var action = "getMenuItems";
    var args = CreateRequestObj(action, MenuId);
    GetResults(args);    
}
function AppendItemsToDropDownList(msg) {
    document.getElementById("loadingImg").style.display = 'none';
    $ektron('#childDDL').show();
    $('#childDDL').html(msg);    
}
