// JavaScript Document
function ajax(url,secid){
	if(url.indexOf("?")>=0){url=url+"&alzCmsDefault="+Math.random();}else{url=url+"?alzCmsDefault="+Math.random();}

	var responseStr=J.ajax({url:url,async:false}).responseText;
	if(getId(secid)){getId(secid).innerHTML=responseStr;}
	//alert(responseStr);
	return responseStr;
}

function check_product(form){
	var valuestr=getFormValue(form);

	if(valuestr.indexOf("{false}")>=0||valuestr=="")return false;
	var user_password=form.password;
	if(!safenames(user_password.value)){alert("用户名格式错误：包含非法字符或长度在允许范围之外！");user_password.value="";user_password.focus();return false;}
	if(!posted){ajax_post(incpath+"setValue.php?action=check_product",valuestr,"_checkproduct");posted=true;}
	return false;
}
