function chkForm(obj)
{
var pattern=/^[\u4e00-\u9fa5a-zA-Z0-9]+$/;
if(obj.ftblog.value == "")
{
alert("请输入分类名称");
obj.ftblog.focus();
return false;
}
if(!pattern.test(obj.ftblog.value))
{
alert("注意:只能是中文,英文或数字");
return false;
}
return true;
}
function chk(ftblog_old){
	if(ftblog_old!=""){
		document.all.t1.style.display="";
	}else{
		document.all.t1.style.display="none";
	}
var obj = document.form2;
obj.ftblog_old.value = ftblog_old;
obj.ftblog.value = ftblog_old;
document.getElementById("oldgroupname").innerHTML = ftblog_old;	
}
function closechk()
{
document.all.t1.style.display="none";
}

function hiddenGroup1(ftblog, obj)
{
	var flag = (obj.checked ? 1 : 0);
	var v = obj.value;
	if (flag == 0){
		if(confirm("如果公开，那么任何人都可以在您的主页查看该分类的内容！"))
		{
			window.location.href = "?act=hiddenGroup&ftblog=" + ftblog + "&flag=0";
		}else{
			location.reload();
		}
	}
	if (flag == 1)
	{
		if(confirm("如果隐藏，那么该分类将不出现在您主页里！"))
		{
			window.location.href = "op.asp?act=hiddenGroup&ftblog=" + ftblog + "&flag=1";
		}else{
			location.reload();
		}
	}
}
function pwd(id,userid,photo_name)
{
  var arr = showModalDialog("pwd.asp?id="+id+"&userid="+userid+"&photo_name="+photo_name, "", "dialogWidth:18em; dialogHeight:8em; status:0;help:0");
  if (arr != null){
   // window.location.href = "op.asp?id=" + id + "&sign=2";
   return true;
  }
  else
  {return false;}
}
function checkpwd(id,userid,photo_name)
{
  var arr = showModalDialog("pass.asp?id="+id+"&userid="+userid+"&photo_name="+photo_name, "", "dialogWidth:18em; dialogHeight:4.5em; status:0;help:0");
  if (arr != null){
   return true;
  }
  else
  {return false;}
}
function selectAll()  //全选
{
	var f=document.selectform
	var box=f.id
    var length=0
	if(box && !box[0]){length=1}
	if(box[0]){length=box.length}

    if (length == 0 ){return;}
    if (length ==1 ){box.checked=true;}
    if (length>1){
      for (var i = 0; i < length; i++){
        box[i].checked=true;
       }
    }
}
function selectRev()  //反选
{
	var f=document.selectform
	var box=f.id
    var length=0
	if(box && !box[0]){length=1}
	if(box[0]){length=box.length}

    if (length == 0 ){return;}
    if (length ==1 ){box.checked=!(box.checked);}
    if (length>1){
      for (var i = 0; i < length; i++){
        box[i].checked=!box[i].checked;
       }
    }
}
function play(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
	document.selectform.submit()
	}
	return false;
}