function SetLoading() {
<wbr><wbr> if ($("#loading").length == 0) {</wbr></wbr>
<wbr><wbr><wbr><wbr> $(" ").appendTo("body");</wbr></wbr></wbr></wbr>
<wbr><wbr> }</wbr></wbr>
<wbr><wbr> $("#loading").ajaxStart(function () { $(this).show(); });</wbr></wbr>
<wbr><wbr> $("#loading").ajaxStop(function () { $(this).fadeOut(); });</wbr></wbr>
//1.9
<wbr> $(document).ajaxStart(function () { $("#loading").show(); });</wbr>
<wbr><wbr><wbr><wbr><wbr><wbr> $(document).ajaxStop(function () { $("#loading").fadeOut(); });</wbr></wbr></wbr></wbr></wbr></wbr>
}