        function getBrowserType()
        {
            var strRes = "";
            var strUserAgent = navigator.userAgent;
            if (strUserAgent.indexOf("Opera", 0) == -1)
            {
                var intIE = strUserAgent.indexOf("MSIE", 0);
                if (intIE == -1)
                {
                    if (strUserAgent.indexOf("Mozila/", 0) == -1)
                    {   //UnKnown
                        strRes = "UnKnown";
                    }
                    else
                    {   //Mozila系
                        strRes = "MOZ";
                    }
                }
                else
                {   //IE
                    var strVar = strUserAgent.substr(intIE + 5, 1);
                    strRes = "IE" + strVar;
                }
            }
            else
            {   //OPERA
                strRes = "OP";
            }
            return strRes;
        }
        
        function getPageSize()
        {    
            var xScroll, yScroll;
            
            if (window.innerHeight && window.scrollMaxY)
            {
                xScroll = window.innerWidth + window.scrollMaxX;
			    yScroll = window.innerHeight + window.scrollMaxY;
            }
            else
            {
                if (document.body.scrollHeight > document.body.offsetHeight)
                {   // all but Explorer Mac
                    xScroll = document.body.scrollWidth;
                    yScroll = document.body.scrollHeight;
                }
                else
                {   // Explorer Mac...would also work in Explorer 6 Strict,
                    // Mozilla and Safari
                    xScroll = document.body.offsetWidth;
                    yScroll = document.body.offsetHeight;                
                }            
            }

            var windowWidth, windowHeight;
            
            if (self.innerHeight)
            {      // all except Explorer
                if(document.documentElement.clientWidth)
                {
				    windowWidth = document.documentElement.clientWidth; 
			    }
			    else
			    {
				    windowWidth = self.innerWidth;
				}
			    windowHeight = self.innerHeight;
            }
            else                
            {
                if (document.documentElement && document.documentElement.clientHeight)
                {   // Explorer 6 Strict Mode
                    windowWidth = document.documentElement.clientWidth;
                    windowHeight = document.documentElement.clientHeight;
                }
                else
                {
                    if (document.body)
                    {   // other Explorers
                        windowWidth = document.body.clientWidth;
                        windowHeight = document.body.clientHeight;                    
                    }
                }
            }            

            // for small pages with total height less then height of the viewport
            if(yScroll < windowHeight)
            {
                pageHeight = windowHeight;
            }
            else
            {
                pageHeight = yScroll;
            }

            // for small pages with total width less then width of the viewport
            if(xScroll < windowWidth)
            {
                pageWidth = windowWidth;
            }
            else
            {
                pageWidth = xScroll;
            }

            arrPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight) 
            return arrPageSize;
        }
    
        function DisplayMenu()
        {
            if (document.getElementById("Outer").style.display == "block")
                return;
            
            //ボディ要素の高さを計算
            var intBodyHeight = 0;
            intBodyHeight = Math.max(document.body.clientHeight, document.body.scrollHeight);
            intBodyHeight = Math.max(intBodyHeight, document.documentElement.scrollHeight);
            intBodyHeight = Math.max(intBodyHeight, document.documentElement.clientHeight);
                        
            var arr = getPageSize();
            // 縦スクロール幅取得
            var intVScroll = document.body.scrollTop || document.documentElement.scrollTop;              
            // 横スクロール幅取得
            var intHScroll = document.body.scrollLeft || document.documentElement.scrollLeft;
            
            //document.getElementById("Outer").style.width = document.documentElement.clientWidth;
			document.getElementById("Outer").style.width = "" + arr[0] + "px";
            document.getElementById("Outer").style.height = "" + arr[1] + "px";
            
            //こだわり条件ウィンドウのサイズと位置決め
            document.getElementById("Specially").style.width = 708 + "px";
            document.getElementById("Specially").style.height = 640 + "px";
            document.getElementById("Specially").style.left = "" + (intHScroll + document.documentElement.clientWidth / 2 - 354) + "px";
            document.getElementById("Specially").style.top = "" + (intVScroll + document.documentElement.clientHeight / 2 - 320) + "px";
            
            if (getBrowserType() == "IE6")
            {   //IE6はselectタグがz-indexを無視するので非表示にする
                var cboObjs = document.getElementsByTagName("select");
                for (var i = 0; i < cboObjs.length; i++)
                {                    
                    cboObjs[i].style.visibility = "hidden";
                }
            }
            
            document.getElementById("Outer").style.display = "block";
            document.getElementById("Specially").style.display = "block"; 
        }
        
        function HideMenu()
        {
            document.getElementById("Outer").style.display = "none";
            document.getElementById("Specially").style.display = "none";
            
            if (getBrowserType() == "IE6")
            {   //IE6のみ非表示にしていたselectタグを表示
                var i = 1;
                var cboObjs = document.getElementsByTagName("select");
                for (var i = 0; i < cboObjs.length; i++)
                {
                    cboObjs[i].style.visibility = "visible";
                }            
            }
        }
