// JScript 文件
String.prototype.GetValue= function(para) {  
  var reg = new RegExp("(^|&)"+ para +"=([^&]*)(&|$)");  
  var r = this.substr(this.indexOf("\?")+1).match(reg);  
  if (r!=null) return unescape(r[2]); return null;  
} 

$(function(){
    $("#txt_SoftName").blur(function(){
        var id=location.href.GetValue("id");
        var softName=$("#txt_SoftName").val();
        $("#SoftExist").text("");
        $("#SoftExist").css({"background-image":"url(../images/indicator.gif)", "background-repeat":"no-repeat","width":"15px","height":"15px"});
        $.post("../Ajax/SoftExist.aspx?"+Math.random(),{"softName":softName,"id":id},function(data){
            if (data=="1")
            {
                $("#SoftExist").css({"width":"auto","height":"auto","background-image":"","color":"red"});
                $("#SoftExist").text("对不起，这个软件名已经存在！");
                $("#txt_SoftName").focus();
            }//End if
        });//End post
        $("#SoftExist").css({"width":"auto","height":"auto","background-image":"","color":"red"});
        $("#SoftExist").text("");
     })//End blur

})//end ready