﻿Namespace.register("How2go.Load");
How2go.Load=
{
    Show:function()
    {
        //aspnetForm
        var id="How2go.Load";
         var imgId="How2go.Load.Images";
            var obj=How2go.$(id);
            var img=How2go.$(imgId);
        var iframe=How2go.$("How2go.Load.Iframe");
        if (null==obj)
        {
        //function(parent,tabName,id,display,width,height,position,index,left,top)
        var parentNode=document.aspnetForm;
            obj=How2go.CreateObjcet(parentNode,"div",id,"block",parentNode.offsetWidth,parentNode.offsetHeight,"absolute",88888888,0,0);
            obj.className='modalBackground';
                obj.style.position='absolute';
                obj.style.left='0px';
                obj.style.top='0px';
            //obj.style.backgroundColor='#F8F9D0';
            img=How2go.CreateObjcet(parentNode,"img",imgId,"block",68,68,"absolute",88888888,parseInt(parentNode.offsetWidth)/2,parseInt(parentNode.offsetHeight)/2);
            img.src=How2go.Path+"/images/progress.gif";
           
            if (How2go.IE)
            {
                iframe=How2go.CreateObjcet(parentNode,"iframe","How2go.Load.Iframe","block",parentNode.offsetWidth,parentNode.offsetHeight,"absolute",88888887,'','');
                iframe.className='modalBackground';
                iframe.style.position='absolute';
                iframe.style.left='0px';
                iframe.style.top='0px';
            }
        }
//        setTimeout(
//        function()
//        {
//           //  alert();
//           How2go.Load.Hidden();
//        }
//        ,2000)
        //obj.innerHTML="<img src=\""+How2go.Path+"/images/progress.gif\" style=\"left:"+parseInt(p.offsetWidth)/2+"px;top:"+parseInt(p.offsetHeight)/2+"px;position:absolute\" unselectable=\"on\" />";
    }
    ,
    Hidden:function()
    {
       var obj=How2go.$("How2go.Load");
        var img=How2go.$("How2go.Load.Images");
        var iframe=How2go.$("How2go.Load.Iframe");
        if (null!=obj)
        {
                obj.parentNode.removeChild(obj);
                img.parentNode.removeChild(img);
                if (How2go.IE && null!=iframe)
                {
                  iframe.parentNode.removeChild(iframe);
                }
        }
    }
}
