function mc(divnum,obj,divname,handlename,offpic,onpic)
{
//关于层切换的js
//定义显示层 数组，
  var target = new Array(divnum) ; 
  var d = new Array(divnum) ;
  for(var i=0;i<divnum;i++){
   target[i]=divname+eval(i+1); 
   //定义层的手柄（主要是更换背景用得）
   d[i]=handlename+eval(i+1);
  }  
// 循环操作div 
  for(var i=0;i<divnum;i++) 
  { 
  if(i==obj)
   { 
  var v=document.getElementById(target[i]); 
  var bg=document.getElementById(d[i]);
   v.style.display="block"; 
   //鼠标移动过后的图片  
    bg.background=offpic; 
    } 
   else 
   { 
   var bg=document.getElementById(d[i]);
   var v=document.getElementById(target[i]); 
   v.style.display="none"; 
   //鼠标放在手柄上的图片 
   bg.background=onpic; 
   } 
  } 
}

function soCheck(formct){
	if (formct.key.value=='' ){
		alert('关键词不能为空！');
		formct.key.focus();
		return false; 
	}
	formct.Submit.disabled=true;
	return true;
}

function reCheck(formct){
	if (formct.formid.value=='' ){
		alert('id不能为空,参数错误.');
		formct.formid.focus();
		return false; 
	}
	if (formct.username.value=='' ){
		alert('名称不能为空,请填写.');
		formct.username.focus();
		return false; 
	}
	if (formct.content.value=='' ){
		alert('内容不能为空,请填写.');
		formct.content.focus();
		return false; 
	}
	if (formct.yzm.value=='' ){
		alert('验证码不能为空,请填写.');
		formct.yzm.focus();
		return false; 
	}

	formct.Submit.disabled=true;
	return true;
}

function guestCheck(formct){
	if (formct.username.value=='' ){
		alert('用户名称不能为空.');
		formct.username.focus();
		return false; 
	}
	if (formct.title.value=='' ){
		alert('标题不能为空.');
		formct.title.focus();
		return false; 
	}
	if (formct.content.value=='' ){
		alert('留言内容不能为空.');
		formct.content.focus();
		return false; 
	}
	if (formct.email.value=='' ){
		alert('电子邮件不能为空.');
		formct.email.focus();
		return false; 
	}
	if (formct.yzm.value=='' ){
		alert('验证码不能为空.');
		formct.yzm.focus();
		return false; 
	}
	formct.Submit.disabled=true;
	return true;
}


