
function localesInit() {
    var locales = new Space4Web.Localization('localization', ['cs', 'sk', 'en']);

    locales.init();
}

function pagerInit() {
    var selPageSize = SZN.gEl("selPageSize");
    var frmDomain = SZN.gEl("frmDomain");

    if (selPageSize != null && frmDomain != null) {
        SZN.Events.addListener(selPageSize, "change", window, function(e, elm) {
            frmDomain.submit();
        })
    }

}

//function ftpModulReceive(txt, status) {
//    if (status == 200) {
//        alert(txt);
//    }
//}
//
//function ftpModul() {
//    var radioActivation = SZN.Dom.getElementsByClass("activation", null, "input")
//
//    //if (!radioActivation.length)
//    //    return;
//
//    var sendEvent = function(e, elm) {
//        var url = "/administration/ftp/activation/" + elm.value + "/" + (elm.checked ? 1 : 0);
//        var req = new SZN.HTTPRequest();
//        req.setMethod("get");
//        req.setFormat("txt");
//        req.setMode("async");
//        req.send(url, window, "ftpModulReceive");
//    }
//
//    for (var i = 0; i < radioActivation.length; ++i) {
//        SZN.Events.addListener(radioActivation[i], "click", window, sendEvent)
//    }
//
//    var selHomedir = SZN.gEl("selHomedir");
//    var inpHomedir = SZN.gEl("inpHomedir");
//
//    if (selHomedir != null && inpHomedir != null)
//        SZN.Events.addListener(selHomedir, "change", window, function(e, elm) {
//            //if (selHomedir.value == "") {
//            //    inpHomedir.disabled = false;
//            //} else {
//                inpHomedir.value = selHomedir.value;
//            //    inpHomedir.disabled = true;
//            //}
//        })
//}

function ready() {
    //localesInit();
    pagerInit();
//    ftpModul();
}

SZN.Events.onDomReady(window, 'ready');
