// JavaScript Document
function check(){
	
	if (document.add.title.value==""){
		alert("请输入留言主题！");
		document.add.title.focus();
		return false;
		}

	if (document.add.user.value==""){
		alert("请输入您的姓名！");
		document.add.user.focus();
		return false;
		}
		
	if (document.add.qq.value==""){
		alert("请输入您的电话号码！");
		document.add.qq.focus();
		return false;
		}
		
	/*if (document.add.mail.value==""){
		alert("请输入您的电子邮件！");
		document.add.mail.focus();
		return false;
		}*/
	
	if (document.add.mail.value!=""){
		if ((document.add.mail.value.indexOf("@") == -1) || (document.add.mail.value.indexOf(".") == -1)){
			alert("您输入的Email可能有误！" );
			document.add.mail.value="";
			document.add.mail.focus();
			return false;
			}
		}
		
	if (document.add.content.value==""){
		alert("请输入留言内容！");
		document.add.content.focus();
		return false;
		}
	
	return true;
}


function check_order(){
	
	if (document.order.product.value==""){
		alert("请输入产品名称！");
		document.order.product.focus();
		return false;
		}

	if (document.order.user.value==""){
		alert("请输入您的姓名，以便我们和你联系！");
		document.order.user.focus();
		return false;
		}
		
	if (document.order.tel.value==""){
		alert("请输入您的电话号码，以便我们和你联系！");
		document.order.tel.focus();
		return false;
		}
	
		
	/*if (document.order.mail.value==""){
		alert("请输入您的电子邮件！");
		document.order.mail.focus();
		return false;
		}*/
	
	if (document.order.mail.value!=""){
		if ((document.order.mail.value.indexOf("@") == -1) || (document.order.mail.value.indexOf(".") == -1)){
			alert("您输入的Email可能有误！" );
			document.order.mail.value="";
			document.order.mail.focus();
			return false;
			}
		}
		
	if (document.order.addre.value==""){
		alert("请输入您的地址，以便我们和你联系！");
		document.order.addre.focus();
		return false;
		}
		
	if (document.order.post.value==""){
		alert("请输入您的邮政编码，以便我们和你联系！");
		document.order.post.focus();
		return false;
		}
		
	if (document.order.content.value==""){
		alert("请输入订单详细说明！");
		document.order.content.focus();
		return false;
		}
	
	return true;
	}
	
//字体改变大小函数
function ContentSize(size)
{
var obj=document.getElementById("size");obj.style.fontSize=size+"px";
}
