// JavaScript Document
function show_newwk(obj)
{
	document.getElementById("wk1_T").style.backgroundImage="url(images/title_namebg.jpg)";
	document.getElementById("wk_T").style.backgroundImage="none";
	document.getElementById("wk").style.display="none";
	document.getElementById("wk1").style.display="block";
}
function show_newwk_1(obj)
{
	document.getElementById("wk_T").style.backgroundImage="url(images/title_namebg.jpg)";
	document.getElementById("wk1_T").style.backgroundImage="none";
	document.getElementById("wk").style.display="block";
	document.getElementById("wk1").style.display="none";
}
function check_commentform()
{ 
	if(document.rese_form.comment_name.value == "" || document.rese_form.comment_name.value.length > 10)
	{
	alert("不能提交评论，你的评论姓名为空或大于10个字符！");
	document.rese_form.comment_name.focus();
	document.rese_form.comment_name.select();
	return false;
	}
	if(isEmail(document.rese_form.comment_email.value) == false)
	{
		alert("E-MAIL地址输入错误！");
		document.rese_form.comment_email.focus();
		document.rese_form.comment_email.select();
		return false;
	}
	if(document.rese_form.comment_content.value.length < 20)
	{
	alert("评论内容不得少于20个字符！");
	document.rese_form.comment_content.focus();
	document.rese_form.comment_content.select();
	return false;
	}
	if(document.rese_form.v_code.value == "")
	{
	alert("请填写验证码！");
	document.rese_form.v_code.focus();
	document.rese_form.v_code.select();
	return false;
	} 
}

function check_commentform_user()
{
	if(document.ball_form.comment_name.value == "" || document.ball_form.comment_name.value.length > 10)
	{
	alert("不能提交投票，你的评论姓名为空或大于10个字符！");
	document.ball_form.comment_name.focus();
	document.ball_form.comment_name.select();
	return false;
	}
	if(isEmail(document.ball_form.comment_email.value) == false)
	{
		alert("E-MAIL地址输入错误！");
		document.ball_form.comment_email.focus();
		document.ball_form.comment_email.select();
		return false;
	}
	if(document.ball_form.comment_content.value.length < 100)
	{
	alert("评论内容不得少于100个字！");
	document.ball_form.comment_content.focus();
	document.ball_form.comment_content.select();
	return false;
	}
	if(document.ball_form.v_code.value == "")
	{
	alert("请填写验证码！");
	document.ball_form.v_code.focus();
	document.ball_form.v_code.select();
	return false;
	}
}
function isEmail( str ){  
    var myReg = /^[-_A-Za-z0-9]+@([_A-Za-z0-9]+\.)+[A-Za-z0-9]{2,3}$/; 
    if(myReg.test(str)) return true; 
    return false; 
}
function checkrecommend_pop()
{
	if(document.recommend_pop.UserPhoto.value == "")
	{
		alert("请上传照片！");
		return false;
	}
	if(document.recommend_pop.cat_id.value == 0)
	{
		alert("请选择类别")
		document.recommend_pop.cat_id.focus();
		return false;
	}
	if(document.recommend_pop.UserName.value == "" || document.recommend_pop.UserName.value.length >10)
	{
		alert("姓名不能为空，或大于十个字符！");
		 document.recommend_pop.UserName.focus();
		 return false;
	}
	if(document.recommend_pop.UserSign.value.length < 20)
	{
	alert("内容不得少于20个字符！");
	document.recommend_pop.UserSign.focus();
	document.recommend_pop.UserSign.select();
	return false;
	}
	if(document.recommend_pop.v_code.value == "")
	{
	alert("请填写验证码！");
	document.recommend_pop.v_code.focus();
	document.recommend_pop.v_code.select();
	return false;
	}
}
function clear_txt(obj)
{
	obj.select();
}