
function CheckForm()
{
    if ($("DDL_ClassID").value == 0)
    {
        alert("请选择栏目！");
        try
        {
            $("DDL_ClassID").focus();
        }
        catch (Error)
		{ }
        return false;
    }
    if ($("TB_Title").value == "")
    {
        alert("标题不能为空！");
        $("TB_Title").focus();
        return false;
    }

    if ($('CE_CE_Content_ID').getHTML() == "")
    {
        alert("内容不能为空！");
        $('CE_CE_Content_ID').FocusDocument();
        return false;
    }
}
function Show1()//常规设置
{
    $("A").style.display = "block";
    $("t_Content").style.display = "block";
    $("B").style.display = "none";
    $("C").style.display = "none";
    $("D").style.display = "none";
    $("E").style.display = "none";
    $("F").style.display = "none";
}
function Show2()//高级设置
{
    $("A").style.display = "none";
    $("t_Content").style.display = "none";
    $("B").style.display = "block";
    $("C").style.display = "none";
    $("D").style.display = "none";
    $("E").style.display = "none";
    $("F").style.display = "none";
}

function Show3()//摘要
{
    $("A").style.display = "none";
    $("t_Content").style.display = "none";
    $("B").style.display = "none";
    $("C").style.display = "block";
    $("D").style.display = "none";
    $("E").style.display = "none";
    $("F").style.display = "none";
}

function Show4()//附件
{
    $("A").style.display = "none";
    $("t_Content").style.display = "none";
    $("B").style.display = "none";
    $("C").style.display = "none";
    $("D").style.display = "block";
    $("E").style.display = "none";
    $("F").style.display = "none";
}
function Show5()//权限设置
{
    $("A").style.display = "none";
    $("t_Content").style.display = "none";
    $("B").style.display = "none";
    $("C").style.display = "none";
    $("D").style.display = "none";
    $("E").style.display = "block";
    $("F").style.display = "none";
}
function Show6()//自定义
{
    $("A").style.display = "none";
    $("t_Content").style.display = "none";
    $("B").style.display = "none";
    $("C").style.display = "none";
    $("D").style.display = "none";
    $("E").style.display = "none";
    $("F").style.display = "block";
}


function HideAndDisplay(TabIndex, o)
{
    $("current").id = "";
    for (i = 0; i < 6; i++)
    {
        if (i == TabIndex)
        {
            o.id = "current";
        }
    }
    if (TabIndex == 0)
    {
        Show1();
    }
    else if (TabIndex == 1)
    {
        Show2();
    }
    else if (TabIndex == 2)
    {
        Show3();
    }
    else if (TabIndex == 3)
    {
        Show4();
    }
    else if (TabIndex == 4)
    {
        Show5();
    }
    else if (TabIndex == 5)
    {
        Show6();
    }
    return false;
}

function ColorPalette()
{
    var str = window.showModalDialog("../Images/JS拾色器/JS拾色器.htm", "dialogWidth=190px;dialogHeight=80px");
    if (typeof (str) != "undefined")
    {
        $('TB_ColorStyle').value = str;
        LoadStyle();
    }
}
function LoadStyle()
{
    if ($('TB_ColorStyle') == null)
    {
        return;
    }
    if ($('imgColorStyle') == null)
    {
        return;
    }
    var str = $('TB_ColorStyle').value;
    if (str == "")
    {
        $('imgColorStyle').style.backgroundColor = "#000000";
        //$('TB_Title').style.color = "#000000";
    }
    else
    {
        $('imgColorStyle').style.backgroundColor = str;
        //$('TB_Title').style.color = str;
    }
}

function GetImage()
{
    var str = window.showModalDialog("../window/GetImage.aspx", "up", "dialogWidth=540px;dialogHeight=540px;status=0;scroll=auto");

    if (typeof (str) != "undefined")
        $('TB_PicUrl').value = str;

}
function GetTemplate()
{
    var str = window.showModalDialog("../window/GetTemplate.aspx", "up", "dialogWidth=350px;dialogHeight=320px;status=0;scroll=auto");
    if (typeof (str) != "undefined")
        $('TB_TemplateFileName').value = str;
}