﻿//GridView全选操作
function selectAll(checked)
{
    var gv = document.getElementById("GridView1");
    var c = gv.rows[0].cells[0].firstChild.checked;
    for (i=1; i<gv.rows.length-1; i++)
        gv.rows[i].cells[0].firstChild.checked = checked;
}
function setHeight(id){
    var iframe = $(id);
    try{
        var bHeight = iframe.contentWindow.document.body.scrollHeight;
        var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
        var height = Math.max(bHeight, dHeight);
        iframe.height =  height;
    }catch (ex){}
}

// 获取编辑器中HTML内容
function getEditorHTMLContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return (oEditor.GetXHTML(true));
}

// 获取编辑器中文字内容
function getEditorTextContents(EditorName) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    return (oEditor.EditorDocument.body.innerText);
}

// 设置编辑器中内容
function SetEditorContents(EditorName, ContentStr) {
    var oEditor = FCKeditorAPI.GetInstance(EditorName);
    oEditor.SetHTML(ContentStr);
}

//访问统计
function hit(page) {
    $.ajax({
        type: "POST",
        url: "/Ajax.aspx?p=hit|" + encodeURI(page)
    });
}
