
var TabPages = null;
function IndexTabStartMethod()
{
    if (TabPages == null)
    {
        TabPages = new TopWinCMS_JsControl.TabControl.TabPages("TabPages", "IndexFrame");
    }
    TabPages.addItem(new TopWinCMS_JsControl.TabControl.TabPage("IndexPage", "IndexPage", "起始页", "Index_Main.aspx", true), "no");

    AutoIframeHeight();
}

function RefurbishTemplates()
{
    var Ajax = new AjaxClass();
    Ajax.RequestUrl = "../AjaxPostBack.ashx?Action=RefurbishTemplates";
    Ajax.Method = "get";
    Ajax.IsAsyn = true;
    Ajax.StateChangeEvent = function ()
    {
        if (Ajax.XmlHttp.readyState == 4 && Ajax.XmlHttp.status == 200)
        {
            if (Ajax.XmlHttp.responseText == "1")
                alert('刷新成功');
            else
                alert('刷新失败');
        }
    };
    Ajax.SendRequest();
}

function AutoIframeHeight()
{  

    IframeHeight("fID_" + TabPages.currentItem.id);

    window.setTimeout("AutoIframeHeight()", 500);
}

window.onload = IndexTabStartMethod;