﻿function ShowLoading(selector, img)
{
    elem = $(selector + " *")
    if(elem.length > 0)
    {
        elem.css("visibility", "hidden");
        $(selector).append("<img class=\"vinLoadingImage\" src=\"" + img + "\" />");
        $(".vinLoadingImage").css("visibility", "visible");
        $(document).ready(
            function(){
                setTimeout("StopLoading('" + selector + "');", 100);
            }
        );
    }
    else
    setTimeout("ShowLoading('" + selector + "', '" + img + "');", 100);
}
function StopLoading(selector)
{
    $(selector + " *").css("visibility", "visible");
    $(".vinLoadingImage").hide();
}
