﻿(function ($DJS) { $DJS.ajax = { load: function (url) { var xmlhttp = null; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { if (new ActiveXObject("Microsoft.XMLHTTP")) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } } xmlhttp.open("POST", url, false); xmlhttp.send(); var responseText = xmlhttp.responseText; delete xmlhttp; return responseText; } }; })($DBA = new Object()); var flag = false; function $e(v) { return document.getElementById(v); } var _lflag = false;
function loadImage(v) {
    var _hide=function () { $('#Img_loader').hide(); $('#imgCanvas').remove(); $('#ModelMsk').remove(); };
    var timg = new Image(); timg.src = v;
    var _divM = document.createElement("div");
    _divM.id = "ModelMsk";
    _divM.style.height = $(document).height() + "px"; _divM.style.width = $(document).width() + "px";
    var _img = document.createElement("img");
        $(_img).attr({ "id": "imgCanvas" });
       $('#Img_loader').show();
       _divM.onclick = _hide;
      $(_img).click(function () { _hide(); });

       timg.onload = function () {
           $(_img).attr({ "src": timg.src }); _img.style.top = (($(window).height() / 2) - (this.height / 2)) + "px";
            _img.style.left = (($(window).width() / 2) - (this.width / 2)) + "px"; timg.src = "";
           document.body.appendChild(_divM); 
       $('#Img_loader').hide(); document.body.appendChild(_img); } 
   }
   function jrequest(path, tar) { $("#" + tar).hide(); $("#ImgLoading").show(); var Te = setTimeout(function () { var _result = $DBA.ajax.load(path); $("#" + tar).html(_result); $("#ImgLoading").hide(); $("#" + tar).show(); }, 200); } function loadData(path) { if (!_lflag) { return false; } if (!flag) { $("#Media_content").hide(); $("#ImgLoading").show(); flag = true; $("html, body").animate({ scrollTop: 0 }, 1); var Te = setTimeout(function () { var _result = $DBA.ajax.load(path); var newF = new Function(_result); newF(); flag = false; $("#Media_content").show(); $("#ImgLoading").hide(); }, 200); } } function loadLogin(e) { var _p = $(e).position(); $('#user_login').css('left', (_p.left - 220)); $('#user_login').css('top', (_p.top - 30)); $('#user_login').slideDown(); } function hideLogin() { $('#user_login').hide(); } window.onload = function () { _lflag = true; };


   function showCalendarContent(e,o) {
       _d=e.getElementsByTagName("div");
       _d[0].style.display = o ? 'block' : 'none';
       //pos = $(e).offset();

          }
