// JavaScript Document

//------------------------分页--------------------------------------------------
function goPage(goUrl,page)
{
  document.form1.action = goUrl+'?flog='+page;
  document.form1.submit();
}

function jumpPage(goUrl,page,tpage)
{
  if (page>tpage)
  {
    alert("无效的页面!");
    return;
  }
  document.form1.action = goUrl+'?flog='+page;
  document.form1.submit();
}
//------------------------分页--------------------------------------------------

//------------------------checkbox全选-------------------------------------------
function check(theForm)
{
      for (var i=0;i<theForm.elements.length;i++)
      {
         var e = theForm.elements[i];
         if (e.type == "checkbox") {
            e.checked = theForm.checkAll.checked;
         }
       }
}
//------------------------checkbox全选-------------------------------------------


//-------------------------删除选中的Checkbox------------------------------------
function DelCheck(theForm, act)
   {
        var i = 0;
        for (j=0;j<theForm.elements.length;j++)   {
            if (theForm.elements[j].checked==true && theForm.elements[j].name=="ch"){
                i++;
                break;
            }
        }
        if (i !=0){
            if (confirm("确定要删除吗？"))  {
                theForm.action = act;
                theForm.submit();
            }
        }
        else
        {   alert("请选择要删除的数据");  }
   }
//-------------------------删除选中的Checkbox------------------------------------

//-------------------------执行删除操作-------------------------------------------
function delAction(act)
{
  if (confirm("确定要删除吗？"))
  {
    document.location = act;
}
else
{
  return false;
}
}
//-------------------------执行删除操作-------------------------------------------


//-------------------------新闻内容控件（复制到需要页面）----------------------------
function getWebpad() {
     var obj = document.getElementById("HtmlEditor").contentWindow;
     obj = obj.contentDocument;
     if (typeof(obj) == "undefined") {
       obj = HtmlEditor.document;
     }
     return obj;
   }

function checkvalidate(){
  document.forms["form1"].menu.value = getWebpad().body.innerHTML;
  form1.content.value=form1.menu.value;
  return true;
  }
//-------------------------新闻内容控件（复制到需要页面）----------------------------
