// Browse Type
// IE Script
var NS4;
var IE4;
if (document.all)
{
    IE4 = true;
    NS4 = false;
}
else
{
    IE4 = false;
    NS4 = true;
}
isWin = (navigator.appVersion.indexOf("Win") != -1)


/* onLoad Handler */
function LH_create()
{
    this.LIST = new Array();
    this.add = LH_add;
    this.exec = LH_exec;
}

function LH_add(strExec)
{
    this.LIST[this.LIST.length] = strExec;
}

function LH_exec()
{
    var list_len = this.LIST.length;
    for (var i = 0; i < list_len; i++)
    {
        eval(this.LIST[i]);
    }
}
// == Iframe Handling ==
// iframe resize½Ã ÃÖ¼Ò width, height
var frmMinWidth;
var frmMinHeight;
var applyMinSize = false;
// iframe resize½Ã ÃÖ´ë width, height
var frmMaxWidth;
var frmMaxHeight;
var applyMaxSize = false;
function setMinSize(width, height)
{
    frmMinWidth = width;
    frmMinHeight = height
    applyMinSize = true;
}
function setMaxSize(width, height)
{
    frmMaxWidth = width;
    frmMaxHeight = height
    applyMaxSize = true;
}

function resizeIframe(name)
{
    if (name == null || name == "")
    {
        name = "mainframe";
    }
    try
    {
        if (IE4)
            var oBody   = document.frames(name).document.body;
        else
            var oBody = document.getElementById(name).contentDocument.body;
        var oIFrame = document.getElementById(name);

        var frmWidth  = oBody.scrollWidth;
        var frmHeight = oBody.scrollHeight;

		//alert( frmHeight + "," + frmWidth);
		//alert( applyMinSize + "," + applyMaxSize);

        if (applyMinSize)
        {
            frmWidth  = Math.max(frmWidth, frmMinWidth);
            frmHeight = Math.max(frmHeight, frmMinHeight);
           // frmWidth  = frmMinWidth;
           // frmHeight = frmMinHeight;

		}
        if (applyMaxSize)
        {
            frmWidth  = Math.min(frmWidth, frmMaxWidth);
            frmHeight = Math.min(frmHeight, frmMaxHeight);
           // frmWidth  = frmMaxWidth;
           // frmHeight = frmMaxHeight;
        }

        if (oIFrame.src.indexOf("BoardList.do")>0&&frmWidth>600)
        {
            frmWidth = 600;
        }
		oIFrame.style.height = frmHeight;
        oIFrame.style.width = frmWidth;
		//alert( frmHeight + "," + frmWidth);
    }
    catch (e) {}
}

function parentResizeIframe(name)
{
    if (parent && parent != this && parent.resizeIframe != null)
    {
        parent.resizeIframe(name);
    }
}

function trapRefreshIE()
{
    if (event.keyCode == 116)
    {
        event.keyCode = 0; 
        event.cancelBubble = true; 
        event.returnValue = false;
        document.location.reload();
    }
}
// F5¸¦ ´­·¶À»¶§ iframe ³»ºÎ¸¸ refresh µÇµµ·Ï Ã³¸® end

function parentPlusIframe(name, height)
{
    if (parent && parent != this && parent.plusIframe != null)
    {
        parent.plusIframe(name, height);
    }
}

function plusIframe(name, height)     
{
    if (name == null || name == "")
    {
        name = "mainframe";
    }
    
    try
    {
        if (IE4)
            var oBody   = document.frames(name).document.body;
        else
            var oBody = document.getElementById(name).contentDocument.body;
        var oIFrame = document.getElementById(name);

        var frmWidth  = oBody.scrollWidth;
        var frmHeight  = oBody.scrollHeight;

        if (applyMinSize)
        {
            frmHeight = Math.max(frmHeight, frmMinHeight);
        }
        if (applyMaxSize)
        {
            frmHeight = Math.min(frmHeight, frmMaxHeight);
        }
        oIFrame.style.height = frmHeight + height;
    }
    catch (e)
    {
        window.status = "IFrame Size Plus Error";
    }
}


