using System;
using System.Data;
using System.Text;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Pages_Other_Default : System.Web.UI.Page
{
    protected void Register() {
        StringBuilder strTemp = new StringBuilder();
        strTemp.Append("<script language=javascript>function getCode(){");
        strTemp.Append("var url = 'http://www.net.cn/has_client/include/checkCode.asp';");
        strTemp.Append("var pars = '';");
        strTemp.Append("var myAjax = new Ajax.Request( url, { method: 'post',parameters: pars, onComplete: showResponse });");
        strTemp.Append("}");

        strTemp.Append("function showResponse(originalRequest)");
        strTemp.Append("{ var attid = originalRequest.responseText;");
        strTemp.Append("if (attid==\"(-)\"){");
        strTemp.Append("$('codeImg').src='http://www.net.cn/has_client/include/code.asp?'+(new Date().getTime());");
        strTemp.Append("}}");
        strTemp.Append("</script>");
        RegisterClientScriptBlock("Key",strTemp.ToString());
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Register();
        code.Attributes.Add("Value", "javascript:getCode();");

    }
}
