function submit(){
  var sid = $("#sid").html();
  var verifyCode = $("#verifyCode").val();
  var ncontent =$("#questionContent").val();
    var parmers ={aid:aid,sid:sid,content:ncontent,verifyCode:verifyCode}
    $.post("/baoliao/index.php?r=question/userreply"+"&sid="+sid,parmers,
	function (json){
                 if(json=="0")
                 {
                     alert("回复成功");
                     window.location.href = "newanswer.shtml?aid="+aid;
                 }
                 else
                 {
                     alert("回复失败");
                     window.location.href = "newanswer.shtml?aid="+aid;
                 }
    });
    }

function answerSubmit()
{
    var sid = $("#sid").html();
    var userName =  $("#userName").val();
    var userTeletphone = $("#userTeletphone").val();
    var userTitle = $("#userTitle").val();
    var userContent = $("#userContent").val();
    var verifyCode = $("#verifyCode").val();
    var userCheckBox;
    if($("#userCheckBox").attr("checked")==true)
       {
           userCheckBox ='1';
       }else
       {
           userCheckBox ='0';
       }
    var parmers =
	{userName:userName,userTeletphone:userTeletphone,userTitle:userTitle,userContent:userContent,userCheckBox:userCheckBox,sid:sid,verifyCode:verifyCode};
    $.post("/baoliao/index.php?r=answer/create"+"&sid="+sid,parmers,
             function (json){
             if(json=="0")
			 { 
			 	alert("添加成功");
				window.location.href ="index.shtml"; 
			 }
             else
			 { 
			 	alert("添加失败");
			 }
    });
}
