function high(which2)
{
  theobject=which2
  highlighting=setInterval("highlightit(theobject)",100)
}

function low(which2)
{
  clearInterval(highlighting)
  which2.filters.alpha.opacity=15
}

function highlightit(cur2)
{
  if (cur2.filters.alpha.opacity<200)
  {
    cur2.filters.alpha.opacity+=10
  }
  else if (window.highlighting)
  {
    clearInterval(highlighting)
  }
}

function getPos(el, sProp)
{
	var iPos=0;
	while (el!=null)
	{
		iPos+=el["offset"+sProp];
		el=el.offsetParent;
	}
	return iPos;
}

function show(el, m)
{
	var cm=null;
	el.className="buttonOver";
	if(m)
	{
//		el.style.background='#999999';
		m.style.display='';
		m.style.pixelLeft=getPos(el, "Left") - 2;;
		m.style.pixelTop=getPos(el, "Top") + el.offsetHeight - 1;
	}
	if ((m!=cm) && (cm)) 
	{
		cm.style.display='none';
	}
		cm=m;
}
function disshow(el, m)
{
	el.className="buttonUp";
	if(m)
	{
		m.style.display='none';
//		el.style.background='#666666';
	}
}
function showmenu(el,m)
{
	if(m)
	{
		m.style.display='';
//		el.style.background='#336699';
	}
}
function disshowmenu(el,m)
{
	if(m)
	{
		m.style.display='none';
//		el.style.background='#336699';
	}
}
function showitem(m)
{
	if(m)
	{
//		m.style.background='#000000';
		m.style.color="red"
	}
}
function disshowitem(m)
{
	if(m)
	{
//		m.style.background='#FFFFFF';
		m.style.color="#336699"
	}
}

function check1()
{
  if (document.keai.score.value.length<=0)
  { 
    alert("你需要输入一个介于0.00～5.00之间的分数！");
    document.keai.score.focus();
    return false;
  }
  else if (document.keai.score.value<0)
  {
    alert("你的评分不能小于0！");
    document.keai.score.focus();
    return false;
  }
  else if (document.keai.score.value>5)
  {
    alert("你的评分不能大于5分！");
    document.keai.score.focus();
    return false;
  }
  return true;
}

function check2()
{
  if (document.keai.username.value.length<=0)
  {
    alert("你的姓名不能为空！");
    document.keai.username.focus();
    return false;
  }
  else if (document.keai.comment.value.length<=0)
  {
    alert("你的评论不能为空！");
    document.keai.comment.focus();
    return false;
  }
  else if (document.keai.comment.value.length>255)
  { 
    alert("你的评论字数超过255个字符，请再精简一二，谢谢！");
    document.keai.comment.focus();
    return false;
  }
  else if (document.keai.validateImage.value.length<=0)
  { 
    alert("请填入验证码。谢谢！");
    document.keai.validateImage.focus();
    return false;
  }
  return true;
}

function check_article_upload()
{
  if (document.articlesc.title.value.length<=0)
  {
    alert("文章标题不能为空！");
    document.articlesc.title.focus();
    return false;
  }
  else if (document.articlesc.author.value.length<=0)
  {
    alert("文章作者不能为空！");
    document.articlesc.author.focus();
    return false;
  }
  else if (document.articlesc.btid.value==0)
  {
    alert("文章大分类不能为空！");
    document.articlesc.btid.focus();
    return false;
  }
  else if (document.articlesc.stid.value==0)
  {
    alert("文章小分类不能为空！");
    document.articlesc.stid.focus();
    return false;
  }
  else if (document.articlesc.article.value.length<=0)
  {
    alert("上传文件不能为空！");
    document.articlesc.article.focus();
    return false;
  }
  else if (document.articlesc.add_by.value.length<=0)
  { 
    alert("上传者姓名不能为空！");
    document.articlesc.add_by.focus();
    return false;
  }
  return true;
}

function check_photo_upload()
{
  if (document.keai.title.value.length<=0)
  {
    alert("图片标题不能为空！");
    document.keai.title.focus();
    return false;
  }
  else if (document.keai.name.value.length<=0)
  {
    alert("玩家姓名不能为空！");
    document.keai.name.focus();
    return false;
  }
  else if (document.keai.photo.value.length<=0)
  {
    alert("上传照片不能为空！");
    document.keai.photo.focus();
    return false;
  }
  else if (document.keai.comment.value.length<=0)
  {
    alert("自我吹嘘不能为空！");
    document.keai.comment.focus();
    return false;
  }
  return true;
}

function check_soft_upload()
{
  if (document.keai.name.value.length<=0)
  { 
    alert("上传者姓名不能为空！");
    document.keai.name.focus();
    return false;
  }
  else if (document.keai.softname.value.length<=0)
  {
    alert("软件名称不能为空！");
    document.keai.softname.focus();
    return false;
  }
  else if (document.keai.softtype.value.length<=0)
  {
    alert("软件类别不能为空！");
    document.keai.softtype.focus();
    return false;
  }
  else if (document.keai.soft.value.length<=0)
  {
    alert("软件文件不能为空！");
    document.keai.soft.focus();
    return false;
  }
  else if (document.keai.soft_comment.value.length<=0)
  {
    alert("软件介绍不能为空！");
    document.keai.soft_comment.focus();
    return false;
  }
  else if (document.keai.recommend.value.length<=0)
  {
    alert("推荐度不能为空！");
    document.keai.recommend.focus();
    return false;
  }
  return true;
}

function check_mudsite()
{
	if ((document.submitmudsite.mudlib.value.length<=0) && (document.submitmudsite.othermudlib.value.length<=0) && (document.submitmudsite.otherlibname.value.length<=0))
	{
		alert("类别不能为空！");
		document.submitmudsite.mudlib.focus();
		return false;
	}
	else if ((document.submitmudsite.othermudlib.value.length>0) && (document.submitmudsite.mudlib.value.length>0))
	{
		alert("只能选择一种类别！");
			document.submitmudsite.mudlib.focus();
		return false;
	}
	else if ((document.submitmudsite.otherlibname.value.length>0) && (document.submitmudsite.mudlib.value.length>0))
	{
		alert("只能选择一种类别！");
			document.submitmudsite.mudlib.focus();
		return false;
	}
	else if (document.submitmudsite.mudsitename.value.length<=0)
	{
		alert("泥巴名称不能为空！");
		document.submitmudsite.mudsitename.focus();
		return false;
	}
	else if (document.submitmudsite.address.value.length<=0)
	{
		alert("泥巴地址不能为空！");
		document.submitmudsite.address.focus();
		return false;
	}
	else if (document.submitmudsite.port.value.length<=0)
	{
		alert("游戏端口不能为空！");
		document.submitmudsite.port.focus();
		return false;
	}
  	else if (isNaN(document.submitmudsite.port.value))
  	{
  		alert("端口必须是数字！  ");
  		document.submitmudsite.port.focus();
  		return false;
  	}  
	else if (document.submitmudsite.validateImage.value.length<=0)
  	{ 
    	alert("请填入验证码。谢谢！");
    	document.submitmudsite.validateImage.focus();
	    return false;
	}
	return true;
}