
	function doSubmit(nameNodeId, phoneNodeId, formName) {
		var params;
		
		var name = $.trim($('#' + nameNodeId).val());
		var phone = $.trim($('#' + phoneNodeId).val());
		// var message = $('#message').val();
		if(validate(name, phone)) {
			
			with(document.getElementById(formName)) {
 				action = "http://msg.9666.cn/infoofuserleave/addUserLeaveMsg.action";
				//action = "http://cowboy.9666.cn/msg-1.0/infoofuserleave/addUserLeaveMsg.action";
//				action = "http://localhost:8080/msg/infoofuserleave/addUserLeaveMsg.action";
				method = "post";
				submit();
			}		
		}	
	}
	
	function validate(name, phone){
		if(name == null || name=='' || name.length > 5) {
			alert("请填写您的姓名, 长度在5个字符之内, 且只能是中文");
			return false;
		}
		
		if(phone == null || phone==''){
			alert("请填写您的电话");
			return false;
		}
		/*
		 * if(message == null || message==''){ alert("请填写您的留言"); return false; }
		 */
		
		for(var i=0; i<name.length; i++) {
			var eachC = name.charAt(i);
			if(!isCh(eachC)) {
				alert("您好，姓名只能填写中文");
				return false;
			} 
		}
		
		var phoneRegPattern = /^(13[0-9]|15[0|1|2|3|5|6||7|8|9]|18[0|5|6|7|8|9])\d{8}$/;
		// var phone1 = $.trim($('#phone').val());
		
		if(!phone.match(phoneRegPattern)) {
			alert('您填写的号码格式有错');
			return false;
		}		
		return true;
	}	
	
	function cancel(){
		// $('#button1').hide();
		// $('#button2').hide();
		var button1 = document.getElementById("button1");
		if(button1 != null) {
			//button1.disabled="disabled";
		}
		
		var button2 = document.getElementById("button2");
		if(button2 != null) {
			//button2.disabled="disabled";
		}
		
		//$.unblockUI();
	}		
	
	function isPhoenNo(phone) {
		
	}
	
	function setMsg(id, msg) {
		// alert('|' + $.trim($('#name1').val()) + '|');
		if($('#' + id).val() != null && $.trim($('#' + id).val()) == '') {
			document.getElementById(id).value = msg;
		}
	}
	
	function isCh(str){
        var testRegExp = new RegExp("[\u4E00-\uFA29]", "i")// 创建正则
       // 判断
        if (testRegExp.test(str)) {
            return true;
        }
        return false;
    }
	
	function clearContent(id, content) {
		var msgNode = document.getElementById(id);
		
		if($.trim(msgNode.value) != '' && $.trim(msgNode.value) == content) {
			msgNode.value = '';
		}
	}	
	
	//wirte successBox
	//document.write(" <div class='zztc' style='display: none;' id='successBox'>");
	//document.write("<dl>");
	//document.write("<dt><span><a href='#'><img src='http://msg.9666.cn/images/dxzz/zzx16.gif' align='absmiddle' onclick='cancel();' /></a></span><img src='http://msg.9666.cn/images/dxzz/cpzd_33.gif' align='absmiddle' />高手追踪，助您成功，轻轻一点，快速赚钱。</dt>");
	//document.write("<dd><br/>");
	//document.write("<P>您的姓名和电话已经被记录，我们的客服会及时和您联系</P><br/>");
	//document.write("<p><input style='cursor: pointer;' type='button' class='text_5' value='确  定' onclick='cancel();'/></p>");
	//document.write("</dd>");
	//document.write("<dd class='bottom'></dd>");
	//document.write("</dl>");
	//document.write("</div>");
	
	//document.write("<div class='zztc' style='display: none;' id='towTimesBox'>");
	//document.write("<dl>");
	//document.write("<dt><span><a href='#'><img src='http://msg.9666.cn/images/dxzz/zzx16.gif' align='absmiddle' onclick='cancel();' /></a></span><img src='http://msg.9666.cn/images/dxzz/cpzd_33.gif' align='absmiddle' />高手追踪，助您成功，轻轻一点，快速赚钱。</dt>");
	//document.write("<dd><br/>");
	//document.write("<P><div id='actionMsg'></div></P><br/>");
	//document.write("<p><input style='cursor: pointer;' type='button' class='text_5' value='确  定' onclick='cancel();'/></p>");
	//document.write("</dd>");
	//document.write("<dd class='bottom'></dd>");
	//document.write("</dl>");
	//document.write("</div>");
	
	//write towTimesBox
	
	/*
	 * function openSmsExpert() { $.blockUI({message: $('#smsPhoneBox'),
	 * overlayCSS: { backgroundColor: '#009', opacity:0.1}, centerY: 0,
	 * css:{cursor:'default', border: 'none', textAlign:'left', top:
	 * $(window).height()/3 + 'px' }});
	 * 
	 *  }
	 */