<!--
/*function leavemessagecheck()
{
 //alert{"ss");
	re=new RegExp("[^0-9a-zA-Z]","gm");
	re1=new	RegExp("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+","gm");
	
	
	
	
		if(leavemessage.message.value=="")
	{
		alert("留言不不能为空");
		leavemessage.message.focus();
		return false;
	}
	
}*/
function isvalid(s,name) 
{ 
var a=s.value;
var name;
 
 if (!patrn.exec(a))
	 alert("请输入5-10位由数字和字母组成的"+name+"!");
	 s.focus();
	return false ;
 

} 


function check_profile(form){//http://www.ice8.com/index.php?action=blog&bid=19

	var patrn=/^[a-zA-Z0-9]{5,10}$/; 
	if(form.action.value=='insert'){//注册
		if (!patrn.exec(form.username.value)){
			alert("请输入5-10位由数字和字母组成的用户名!");
			form.username.focus();
			return false ;
		 }
		
	}

	/*if(form.action.value=='insert'){//注册
		if (!patrn.exec(form.nickname.value)){
			alert("请输入5-10位由数字和字母组成的用户昵称!");
			form.nickname.focus();
			return false ;
		 }
		
	}*/

	if(form.action.value=='update'){//修改个人资料
		if(form.pwd.value || form.repwd.value){
			 if (!patrn.exec(form.pwd.value)){
				alert("请输入5-10位由数字和字母组成的密码!");
				form.pwd.focus();
				return false ;
			 }
 
			if(form.pwd.value != form.repwd.value){
				alert("两次输入的密码不相同");
				form.repwd.focus();
				return false;
			}
		}
	}


	else{//注册

		if (!patrn.exec(form.pwd.value)){
				alert("请输入5-10位由数字和字母组成的密码!");
				form.pwd.focus();
				return false ;
		 }
 
		if(form.pwd.value != form.repwd.value){
			alert("两次输入的密码不相同");
			form.repwd.focus();
			return false;
		}
	}
	
	if(form.address.value=="")
	{
		alert("请输入详细地址");
		form.address.focus();
		return false;
	}
	var patrn1=/^[a-zA-Z0-9]{6}$/;
	
	if (!patrn1.exec(form.zipcode.value)){
			alert("请输入6位由数字和字母组成的邮政编码!");
			form.zipcode.focus();
			return false ;
	}

	var patrn1=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/; //校验普通电话、传真号码：可以“+”开头，除数字外，可含有“-” 

	if (!patrn1.exec(form.tel.value)){
		alert("请输入正确的电话号码!");
		form.tel.focus();
		return false ;
	 }
	var patrn2=/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/; //校验手机号码：必须以数字开头，除数字外，可含有“-” 

	if (!patrn2.exec(form.mobile.value)){
		alert("请输入正确的手机号码!");
		form.mobile.focus();
		return false ;
	 }
	re=new RegExp("[^0-9a-zA-Z]","gm");
	re1=new	RegExp("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+","gm");
	if(!form.email.value.match(re1)){
		alert("请填写正确的电子邮箱！");
		form.email.focus();
		return false;
	}
	return true;
	
}

function checkuserexist(form){

	var patrn=/^[a-zA-Z0-9]{5,10}$/; 
	if(form.action.value=='insert'){//注册
		if (!patrn.exec(form.username.value)){
			alert("请输入5-10位由数字和字母组成的用户名!");
			form.username.focus();
			return false ;
		 }
		
	}

	var num=form.usernum.value;
	
	//alert(form.username.value);
	var j=0;
	for(var k=0;k<num;k++){
		var bb='username'+k;
		//eval("document.form1."+aa[h]+".value=0;");
		var cc=eval("document.reg."+bb+".value");
		//alert(cc);
		if(form.username.value==cc){
			
			alert("很抱歉，此用户名已经存在,请更换其他用户名");
			 eval("document."+form.username.focus());
			  j++;
			 return false;
			
		}
		

	}
	
	if(j==0){
			alert('恭喜您，您可以使用该用户名！');
			eval("document."+form.pwd.focus());
	}
	// return true;
}
function check_address(form){
	if(form.address.value=="")
	{
		alert("请输入详细地址");
		form.address.focus();
		return false;
	}
	var patrn1=/^[a-zA-Z0-9]{6}$/;
	
	if (!patrn1.exec(form.zipcode.value)){
			alert("请输入6位由数字和字母组成的邮政编码!");
			form.zipcode.focus();
			return false ;
	}
	return true;

}

function check_feedback(form){
	if(form.topic.value=="")
	{
		alert("请输入求购主题");
		form.topic.focus();
		return false;
	}
	
	if(form.message.value=="")
	{
		alert("请输入详细内容");
		form.message.focus();
		return false;
	}
	return true;

}

function check_fetchpwd(form){//http://www.ice8.com/index.php?action=blog&bid=19

	var patrn=/^[a-zA-Z0-9]{5,10}$/; 
	if(form.action.value=='insert'){//注册
		if (!patrn.exec(form.username.value)){
			alert("请输入5-10位由数字和字母组成的用户名!");
			form.username.focus();
			return false ;
		 }
		
	}
	re=new RegExp("[^0-9a-zA-Z]","gm");
	re1=new	RegExp("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+","gm");
	if(!form.email.value.match(re1)){
		alert("请填写正确的电子邮箱！");
		form.email.focus();
		return false;
	}

return true;
	
}


function checkuser(username){
	var patrn=/^[a-zA-Z0-9]{5,10}$/; 

	 if (!patrn.exec(reg.username.value)){
		alert("请输入5-10位由数字和字母组成的用户名!");
		reg.username.focus();
		return false ;
	 }

	var aa=reg.username.value;
	//return true;
	window.open('checkuser.php?username='+aa,'checkuser',"toolbar=no,status=yes,location=no,width=2,height=2,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}
function checklogin(form){
	//alert('d');
	if(form.username.value=="")
	{
		alert("请输入用户名");
		form.username.focus();
		return false;
	}
	if(form.pwd.value=="")
	{
		alert("请输入密码");
		form.pwd.focus();
		return false;
	}
	return true;
}


function edit_address(){
	window.open('edit_address.php','edit_address',"toolbar=no,status=yes,location=no,width=600,height=180,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}

function update_address(id){
	window.open('edit_address.php?id='+id,'edit_address',"toolbar=no,status=yes,location=no,width=600,height=180,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}



function update_address(id,type){
	window.open('edit_address.php?id='+id,'edit_address',"toolbar=no,status=yes,location=no,width=600,height=180,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}





function checkisselected(form){

	var j=0;
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		var aa=e.name;
		//var bb=e.value;
		if(aa=="ischeckedtag[]" && e.checked){
			j++;
			//var id;
			///if(id
			
			var id=e.value;
			
		}
		
	}
	
	if(j==0){
			alert('您没有选中任何选项！');return false;
	}

	
	


	return true;
	
}

function changecart(form){
	for (var i=0;i<document.form.elements.length;i++){
		var aa=document.form.elements[i];
		var aaa=document.form.elements[i].name;
	}
}

function update_feedback(feedbacktype,parentid,id,idreplied){
	window.open('edit_feedback.php?feedbacktype='+feedbacktype+'&parentid='+parentid+'&id='+id+'&idreplied='+idreplied,'edit_feedback',"toolbar=no,status=yes,location=no,width=750,height=300,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}

function add_feedback(feedbacktype){
	window.open('edit_reply.php?CmdString=addfeedback&feedbacktype='+feedbacktype,'add_feedback',"toolbar=no,status=yes,location=no,width=600,height=300,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}

function edit_reply(feedbacktype,parentid,idreplied){
	window.open('edit_reply.php?feedbacktype='+feedbacktype+'&parentid='+parentid+'&idreplied='+idreplied,'edit_reply',"toolbar=no,status=yes,location=no,width=700,height=250,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}

function update_reply(feedbacktype,parentid,id,idreplied){
	window.open('edit_reply.php?feedbacktype='+feedbacktype+'&parentid='+parentid+'&id='+id+'&idreplied='+idreplied,'edit_reply',"toolbar=no,status=yes,location=no,width=700,height=250,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}


function check_feedback(form){
	if(form.topic.value=="")
	{
		alert("请输入主题");
		form.topic.focus();
		return false;
	}
	
	if(form.message.value=="")
	{
		alert("请输入详细内容");
		form.message.focus();
		return false;
	}
	return true;

}

function check_reply(form){
	if(form.topic.value=="")
	{
		alert("请输入主题");
		form.topic.focus();
		return false;
	}
	
	if(form.message.value=="")
	{
		alert("请输入详细内容");
		form.message.focus();
		return false;
	}
	return true;

}


function check_orderok(form){
	if(form.truename.value=="")
	{
		alert("请输入付款人姓名");
		form.truename.focus();
		return false;
	}
	
	var patrn1=/^[a-zA-Z0-9]{6}$/;
	
	if (!patrn1.exec(form.zipcode.value)){
			alert("请输入6位由数字和字母组成的邮政编码!");
			form.zipcode.focus();
			return false ;
	}
	

	if(form.telno.value=="")
	{
		alert("请输入联系电话");
		form.telno.focus();
		return false;
	}
	
	if(form.startdate.value=="")
	{
		alert("请选择送货日期");
		form.startdate.focus();
		return false;
	}

	if(form.whattime.value=="")
	{
		alert("请输入送货时间");
		form.whattime.focus();
		return false;
	}
	return true;

}

function leavemessagecheck()
{
 //alert{"ss");
	/*if(leavemessage.nickname.value=="")
	{
		alert("请填写昵称");
		leavemessage.nickname.focus();
		return false;
	}*/
	re=new RegExp("[^0-9a-zA-Z]","gm");
	re1=new	RegExp("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+","gm");
	
	
	/*if(leavemessage.email.value=="")
	{
		alert("电子邮箱没有填写");
		leavemessage.email.focus();
		return false;
	}
	
	if(!leavemessage.email.value.match(re1))
	{
    alert("电子邮箱不准确");
		leavemessage.email.focus();
		return false;
	}*/
	if(leavemessage.validation.value=="")
	{
		alert("请填写校验码");
		leavemessage.validation.focus();
		return false;
	}
	
		if(leavemessage.message.value=="")
	{
		alert("留言不不能为空");
		leavemessage.message.focus();
		return false;
	}
	return true;
}

function application(){
	window.open('application.php','release',"toolbar=no,status=yes,location=no,width=1000,height=400,left=0,top=0,RESIZABLE=yes,SCROLLBARS=yes");
}

function check_application(formname)
{
 
	if(formname.comnamec.value=="")
	{
		alert("请填写单位中文名称");
		formname.comnamec.focus();
		return false;
	}
	
		if(formname.comnamee.value=="")
	{
		alert("请填写单位英文名称");
		formname.comnamee.focus();
		return false;
	}
	return true;
}


function check_appforex(formname)
{
 
	if(formname.exname.value=="")
	{
		alert("请填写展(博)览会名称");
		formname.exname.focus();
		return false;
	}
	
		if(formname.exdate.value=="")
	{
		alert("请填写展出日期 ");
		formname.exdate.focus();
		return false;
	}

	
		if(formname.appcomnamec.value=="")
	{
		alert("请填写申请单位名称 ");
		formname.exdate.focus();
		return false;
	}


	
		if(formname.categoryc.value=="")
	{
		alert("请填写参展内容大类 ");
		formname.categoryc.focus();
		return false;
	}


	
		if(formname.liaison.value=="")
	{
		alert("请填写联系人 ");
		formname.liaison.focus();
		return false;
	}

	if(formname.tel.value=="")
	{
		alert("请填写电话 ");
		formname.tel.focus();
		return false;
	}

	return true;
}
-->