
function msgAdd(){
var required_n=new Array('姓名','留言标题','留言内容');
var required=new Array('txtName','txtTitle','txtContent');
for(i=0;i<required.length;i++){
if(g(required[i]).value.Trim()==''){
alert(required_n[i]+' 不能为空！');
g(required[i]).focus();
return;}}
if(g('txtEmail').value.Trim()!=''){
var reg=/^\s*([\w-]+(\.\w+)*@([\w-]+\.)+\w{2,3})\s*$/;
if(!reg.test(g('txtEmail').value.Trim())){
alert('邮件地址格式错误');
return;}}
var re=Controls_feedback_msg_add._msgAdd(getRadioValue('rbtType'),getTextValue('txtTitle'),getTextValue('txtContent'),getTextValue('txtName'),getTextValue('txtTel'),getTextValue('txtEmail'),'',getTextValue('channelID')).value;
if(re=="ok"){
alert('留言成功，感谢您的参与！');
location.href=location.href;}
else{
alert(re);
return;}}
