    var SCRelativePath=""; //Should be change inside a page that is no in the "browse" dir.
    
    var ns = (navigator.appName.indexOf("Netscape") != -1);
    var d = document;
    var px = document.layers ? "" : "px";
   var autoCheck = false;
   
    function positionSysChk(){
        //Sets the Sys Chk Frame to the center of the window
        
        var syschk_Frame = document.getElementById("ctl00_syschk_Frame");
        var blackbg = document.getElementById("blackbg");
        
        //Sets the Offset for scrolling
        pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		    document.documentElement.scrollTop : document.body.scrollTop;
        
        var winH=document.documentElement.offsetHeight;
        
        var userBrowser=window.clientInformation.userAgent;
        if (userBrowser.indexOf("MSIE 6.0")!=-1){
          winH=winH-4;  
        }
        
        //var left = (document.body.clientWidth / 2) - 570;
        var left = 0;
        var top = ((winH / 2) - 205);  
         // alert(top);            
        syscheck.style.left=0;
        syscheck.style.top=pY+top;
                               
        blackbg.style.left=0;
        blackbg.style.top=pY;
        
        blackbg.style.height=winH;

        //alert(window.screen.availHeight);
        //alert(document.body.offsetHeight);
        //syschk_Frame.style.left=left;
        //syschk_Frame.style.top=top;
        
        //syschk_table.style.left=0;
        //syschk_table.style.top=top;
    }
    
    function systemcheck(show,auto,isAutoCheck){
        //This function hides/shows the Sys Chk frame (according to "show").
        //if auto=true reloads the check. Used in order to prevent dubble check when the 
        //page loads.
        //SCRelativePath - will be soplied at every page this function will be included
        //alert(isAutoCheck);
        var syschk_Frame = document.getElementById("ctl00_syschk_Frame");
        autoCheck = isAutoCheck;
        
        if (show=="true"){          
            if (auto=="false"){
                var syschkti = new Date();
                try{
                    syschk_Frame.location.href = SCRelativePath + "Components/SystemCheck/syscheck.aspx?TMID=" + syschkti.getTime();
                }catch(e){
                    syschk_Frame.src = SCRelativePath + "Components/SystemCheck/syscheck.aspx?TMID=" + syschkti.getTime();
                }
            }

            positionSysChk();
            this.onresize = positionSysChk;
            
            blackbg.style.display="block";
            syscheck.style.display="inline";
            x=top.window.document.screentop;
            //debugger
        }else{
            this.onresize = "";
            blackbg.style.display="none";
            syscheck.style.display="none";        
        }
    
    }

    function initSysChk(){
    
        window.onscroll = positionSysChk;
        window.onresize = positionSysChk;
    }

    initSysChk();

    /*document.write ("<div id=\"blackbg\" style=\"z-index: 99; position:absolute; top:0px; display:none;\"></div>");
    document.write ("<div id=\"syscheck\" style=\"z-index: 100; position:absolute; display:none;\">");
    document.write ("<iframe runat=\"server\" src=\"\" scrolling=\"auto\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\"  id=\"syschk_Frame\"></iframe></div>");*/