function getBrowserHeight() {
                var intH = 0;
                var intW = 0;
               
                //if(typeof window.innerWidth  == 'number' ) {
                  // intH = window.innerHeight;
                 //  intW = window.innerWidth;
                 //  alert("0"+window.innerHeight);
                //}
                /*if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                    intH = document.documentElement.clientHeight;
                    intW = document.documentElement.clientWidth;
                    
                    
                }*/
                if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
                    intH = document.body.clientHeight;
                    intW = document.body.clientWidth;
                    //alert("1"+intH);
                }
                if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                    if(document.documentElement.clientHeight > intH)
                    {
                        intH = document.documentElement.clientHeight;
                    }
                    if(document.documentElement.clientWidth > intW)
                    {
                        intW = document.documentElement.clientWidth;
                    }
                    //alert("2"+intH);
                }
                if(typeof window.innerWidth  == 'number')
                {
                    if(window.innerHeight > intH)
                    {
                        intH = window.innerHeight;
                    }
                    if(window.innerWidth > intW)
                    {    
                        intW = window.innerWidth;
                    }
                    //alert("3"+intH);
                }

                //alert(document.body.clientHeight);
                return { width: parseInt(intW), height: parseInt(intH) };
            }  
            function darkLayer() {
                
                var shadow = document.getElementById("shadow");
                
                var bws = getBrowserHeight();
                
                shadow.style.width = bws.width + 30 + "px";
                shadow.style.height = bws.height+ 30 + "px";

                shadow.style.display = "block";

                document.documentElement.style.overflow = 'hidden';	 // firefox, chrome
                document.body.scroll = "no";

                shadow = null;

            }

            function whiteLayer() {
                var shadow = document.getElementById("shadow");
                //var bright = document.getElementById(obj);

                document.documentElement.style.overflow = 'scroll';	 // firefox, chrome
                document.body.scroll = "yes";

                shadow.style.display = "none";
                //bright.style.display = "none";


                shadow = null;

            }

            function setLayerPosition(obj) {
                var shadow = document.getElementById("shadow");
                var bright = document.getElementById(obj);

                var bws = getBrowserHeight();
                //alert(bws.height);
                shadow.style.width = bws.width + 200 + "px";
                shadow.style.height = bws.height+ 200 + "px";
                
                bright.style.left = 50+"%";
                bright.style.top = 50+"%";

                shadow = null;
                bright = null;
            }

            function showLayer(obj) {
                setLayerPosition(obj);
                
                var shadow = document.getElementById("shadow");
                //var bright = document.getElementById(obj);
 
                shadow.style.display = "block"; 
                //bright.style.display = "block";
                                
                document.documentElement.style.overflow = 'hidden';	 // firefox, chrome
                document.body.scroll = "no";

                shadow = null;
                //bright = null;
            }
            
            function hideLayer(obj) {
                var shadow = document.getElementById("shadow");
                //var bright = document.getElementById(obj);
                
                document.documentElement.style.overflow = 'scroll';	 // firefox, chrome
                document.body.scroll = "yes";
                
                shadow.style.display = "none"; 
                //bright.style.display = "none";

                
                shadow = null;
                //bright = null;
            }

            //window.onresize = setLayerPosition;