//通用登录表单--跳转
function Form_Send1(ToUrl,SuStr,GoUrl,FormName){
    var options = { 
		url:  ToUrl,
        beforeSubmit:function(formData, jqForm, options){
          eval("show_go.style.display=\"\";");
          return true; 
		},
        success:function(responseText, statusText){
          if(statusText=="success"){
            if(responseText.search("成功")>0){
	          alert(responseText);
	          location.href=GoUrl;
            }
            else{
	          var st=responseText.replace(/\|\|\|\|\|/gi,"\n");
	          alert(st);
            }
          }
          else{
            alert(statusText);
          }
          eval("show_go.style.display=\"none\";");
		}
    }; 
    $('#'+FormName+'').ajaxForm(options); 
}
function Form_Send2(ToUrl,SuStr,FormName){
    var options = { 
		url:  ToUrl,
        beforeSubmit:function(formData, jqForm, options){
          return true; 
		},
        success:function(responseText, statusText){
          if(statusText=="success"){
            if(responseText.search("验证")>0||responseText.search("IP")>0||responseText.search("输入")>0||responseText.search("过长")>0){
	          var st=responseText.replace(/\|\|\|\|\|/gi,"\n");
	          alert(st);
            }
            else{
			  alert(SuStr);
	          AddDiv("Comments","Comment_Do.asp?type=1&id="+responseText);
			  document.all.Comment_Content.innerHTML="";
			  document.all.Check_Code.value="";
			  document.all.Code.src="Inc/CheckCode.asp";
            }
          }
          else{
            alert(statusText);
          }
		}
    }; 
    $('#'+FormName+'').ajaxForm(options); 
}
//通用删除函数
function DelIt(Cstr,DUrl,GoUrl){
  if(confirm(Cstr))
  {
    eval("show_go.style.display=\"\";");
    $.get(DUrl,
      function(data){
         alert(data);
		 eval("show_go.style.display=\"none\";");
	     location.href=GoUrl;
	     return true;
      }
    );
  }
  return;
}
//评论函数
function AssessIt(DUrl,Furl){
    $.get(DUrl,
      function(data){
        $.get(Furl,
          function(data){
             document.getElementById("Assess").innerHTML=data;
          }
         );
         alert(data);
	     return true;
      }
    );
}
//通用不返回提交
function ASend(GoUrl,FUrl){
  $.get(FUrl,
    function(data){
		alert(data);
        location.href=GoUrl;
    }
  );
}
//增加DIV
function AddDiv(BeDiv,Urls){
  $.get(Urls,
    function(data){
		$("#"+BeDiv).before(data);
	   return true;
    }
  );
}
