function re_load() { location.reload(); }
function click_return(cvar,ctype)
{
  var nvar='';
  switch (ctype)
  {
    case 1:
      nvar='提示信息！';
      break;
    case 2:
      nvar=cvar;
      break;
    default :
      nvar='是否确定'+cvar+'？\n操作后无法恢复！';
      break;
  }
  var ctype=window.confirm(nvar);
  if (ctype) { return true; }
  return false;
}
function admin_login_chk()
{
  var username=document.admin_frm.username.value;
  var password=document.admin_frm.password.value;
  if (username=="" || username==null)
  {
    alert("请填写用户名！");
    document.admin_frm.username.focus();
    return false;
  }
  if (password=="" || password==null)
  {
    alert("请填写密码！");
    document.admin_frm.password.focus();
    return false;
  }
}
function search_chk()
{
  var keywords=document.search_frm.keywords.value;
  if (keywords=="" || keywords==null || keywords=="请输入关键字")
  {
    alert("请输入搜索关键字！");
    document.search_frm.keywords.focus();
    return false;
  }
}
function chg_thebgcolor(obj,newVal)
{
    if(document.getElementById(obj))
    {
        var theNewObj=document.getElementById(obj);
        theNewObj.style.background=newVal;
    }
}
function sel_singletemp(editor_obj,html_obj,use_type)
{
    var the_html;
    var editorObj=window.frames[editor_obj];
    var htmlObj=document.getElementById(html_obj);
    if(htmlObj)
    {
        the_html=htmlObj.innerHTML;
    }
    else
    {
        the_html=html_obj;
    }
    editorObj.setMode('CODE');
    switch(use_type)
    {
        case 1:
            editorObj.appendHTML(the_html);
            break;
        case 2:
            editorObj.replaceHTML(the_html);
            break;
        default :
            editorObj.setHTML(the_html);
            break;
    }
    editorObj.setMode('EDIT');
}