 function getWidth()
        {
              var myWidth = 600;
              if (window.innerWidth && window.scrollMaxX) 
              {
                // Firefox
                if (myWidth<window.innerWidth + window.scrollMaxX)
                    myWidth = window.innerWidth + window.scrollMaxX;     
              }
              if( document.documentElement && document.documentElement.clientWidth ) 
              {
                //IE 6+ in 'standards compliant mode'
                if (myWidth<document.documentElement.clientWidth)
                myWidth = document.documentElement.clientWidth;
              }
              if (document.body && document.body.scrollWidth > document.body.offsetWidth)
              { 
                // all but Explorer Mac
                if (myWidth<document.body.scrollWidth)
                myWidth = document.body.scrollWidth;     
              } 
              else if (document.body)
              { 
                // works in Explorer 6 Strict, Mozilla (not FF) and Safari
                if (myWidth<document.body.offsetWidth)
                myWidth = document.body.offsetWidth;
              } 
              return myWidth;
        }
        function getHeight()
        {
              var myHeight = 600;
              if (window.innerHeight && window.scrollMaxY) 
              {
                // Firefox
                if (myHeight<window.innerHeight + window.scrollMaxY)
                    myHeight = window.innerHeight + window.scrollMaxY;     
              }
              if( document.documentElement && document.documentElement.clientHeight ) 
              {
                //IE 6+ in 'standards compliant mode'
                if (myHeight<document.documentElement.clientHeight)
                myHeight = document.documentElement.clientHeight;
              }
              if (document.body && document.body.scrollHeight > document.body.offsetHeight)
              { 
                // all but Explorer Mac
                if (myHeight<document.body.scrollHeight)
                myHeight = document.body.scrollHeight;     
              } 
              else if (document.body)
              { 
                // works in Explorer 6 Strict, Mozilla (not FF) and Safari
                if (myHeight<document.body.offsetHeight)
                myHeight = document.body.offsetHeight;
              } 
              return myHeight;
        }
        
        function showModalWindow(url,width,height)
        {
            showShade();
            setTimeout("showModal('"+url+"',"+width+","+height+");",500);
            
        }
        function showShade()
        {
            var shade=document.getElementById("shaderDiv");
            shade.style.width=getWidth()+"px";
            shade.style.height=getHeight()+"px";
            shade.style.visibility="visible";
        }
        function showModal(url,width,height)
        {
            var modal=document.getElementById("modalWindowDiv");
            var top=getHeight()/2-100;
            top=top-height/2;
            var left=getWidth()/2;
            left=left-50-width/2;
            if (top<0) top=0;
            if (left<0) left=0;
            modal.style.top=top+"px";
            modal.style.left=left+"px";
            modal.style.height=(height+40)+"px";
            modal.style.width=(width+40)+"px";
            modal.style.visibility="visible";
            var frame=document.getElementById("frameModal");
            frame.src=url;
            frame.height=height+"px";
            frame.width=width+"px";
        }
        function hideModalWindow()
        {   
            var frame=document.getElementById("frameModal");
            var modal=document.getElementById("modalWindowDiv");
            frame.src="";
            frame.height="0px";
            frame.width="0px";
            modal.style.top="0px";
            modal.style.left="0px";
            modal.style.height="0px";
            modal.style.width="0px";
            modal.style.visibility="hidden";
            setTimeout("hideShade();",500);
        }
        function hideShade()
        {
            var shade=document.getElementById("shaderDiv");
            shade.style.width="0px";
            shade.style.height="0px";
            shade.style.visibility="hidden";
        }

