function InitMenu()
{
	var div0101obj = document.getElementById("div0101");
	if(div0101obj)
	{
		var MenuObjArr = div0101obj.getElementsByTagName("div");
		for(var i=0;i<MenuObjArr.length;i++)
		{
			if(MenuObjArr[i].className == "div010101")
			{ MenuObjArr[i].onclick = function() { window.open("/main.aspx","_self"); }; }
			
			if(MenuObjArr[i].className == "div010103")
			{
				MenuObjArr[i].onmouseover = function() { ShowMenu(this); };
				MenuObjArr[i].onmouseout = function() { HideMenu(this); };
			}
		}
	}
}

function ChangeConBorderDivSize()
{
    var GetSize = GetWH();
    var ConBorderDivObj = document.getElementById("ConBorderDiv");
    if (ConBorderDivObj) {
        if ((GetSize.height - 93) > 0) {
            ConBorderDivObj.style.height = (GetSize.height - 93).toString() + "px";
        }
    }
}

function ShowMenu(obj)
{
	obj.className="div010103hover";
	var MObjArr = obj.getElementsByTagName("div");
	if(MObjArr.length>0)
	{ MObjArr[0].className = "MenuLinkDivShow"; }
}

function HideMenu(obj)
{
	obj.className="div010103";
	var MObjArr = obj.getElementsByTagName("div");
	if(MObjArr.length>0)
	{ MObjArr[0].className = "HideObj"; }
}

function GetWH() {
    var winWidth = 0;
    var winHeight = 0;
    var PageSize = { width: winWidth, height: winHeight };
    if (window.innerWidth) winWidth = window.innerWidth;
    else if ((document.body) && (document.body.clientWidth)) winWidth = document.body.clientWidth;
    if (window.innerHeight) winHeight = window.innerHeight;
    else if ((document.body) && (document.body.clientHeight)) winHeight = document.body.clientHeight;
    if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth) {
        winHeight = document.documentElement.clientHeight;
        winWidth = document.documentElement.clientWidth;
    }
    PageSize.width = winWidth;
    PageSize.height = winHeight;
    return PageSize;
}
