var intervaG_ID = null;
function startLoadAndSwohDotsRun(loadingtext, selector, maxDots, interval){
    // ie fix for 59195
    if(typeof maxDots == 'undefined') {
        maxDots = 8;
    } 

    if(typeof interval == 'undefined') {
        linterval = 1000;
    } 

    i = 0;
    if($("" + selector + "").length){
        intervaG_ID = setInterval(function() {
            i = ++i % maxDots;
            if($("" + selector + "").is("input")) {
                $("" + selector + "").val(loadingtext + " " + Array(i+1).join("."));
            } else {
                $("" + selector + "").html(loadingtext + " " + Array(i+1).join("."));
            }
        }, interval);
    }
}

function stopLoadAndSwohDotsRun(){
    if(typeof intervaG_ID != undefined) {
        clearInterval(intervaG_ID);
    }
}
