var AjaxSSL = {
userLogin:function(Name,VCode,Token,callback,context){return new ajax_request(this.url + '?_method=userLogin&_session=rw','Name=' + enc(Name)+ '\r\nVCode=' + enc(VCode)+ '\r\nToken=' + enc(Token),callback, context);},
getVCode:function(Name,VCode,Token,callback,context){return new ajax_request(this.url + '?_method=getVCode&_session=rw','Name=' + enc(Name)+ '\r\nVCode=' + enc(VCode)+ '\r\nToken=' + enc(Token),callback, context);},
updateProfile:function(Name,MobilePhone,Email,callback,context){return new ajax_request(this.url + '?_method=updateProfile&_session=rw','Name=' + enc(Name)+ '\r\nMobilePhone=' + enc(MobilePhone)+ '\r\nEmail=' + enc(Email),callback, context);},
getProfile:function(callback,context){return new ajax_request(this.url + '?_method=getProfile&_session=rw','',callback, context);},
getContactList:function(callback,context){return new ajax_request(this.url + '?_method=getContactList&_session=rw','',callback, context);},
addContact:function(Name,MobilePhone,Email,CTType,ProvinceId,CityId,Address,callback,context){return new ajax_request(this.url + '?_method=addContact&_session=rw','Name=' + enc(Name)+ '\r\nMobilePhone=' + enc(MobilePhone)+ '\r\nEmail=' + enc(Email)+ '\r\nCTType=' + enc(CTType)+ '\r\nProvinceId=' + enc(ProvinceId)+ '\r\nCityId=' + enc(CityId)+ '\r\nAddress=' + enc(Address),callback, context);},
updateContact:function(Id,Name,MobilePhone,Email,CTType,ProvinceId,CityId,Address,callback,context){return new ajax_request(this.url + '?_method=updateContact&_session=rw','Id=' + enc(Id)+ '\r\nName=' + enc(Name)+ '\r\nMobilePhone=' + enc(MobilePhone)+ '\r\nEmail=' + enc(Email)+ '\r\nCTType=' + enc(CTType)+ '\r\nProvinceId=' + enc(ProvinceId)+ '\r\nCityId=' + enc(CityId)+ '\r\nAddress=' + enc(Address),callback, context);},
getContact:function(Id,callback,context){return new ajax_request(this.url + '?_method=getContact&_session=rw','Id=' + enc(Id),callback, context);},
getProvinceList:function(callback,context){return new ajax_request(this.url + '?_method=getProvinceList&_session=r','',callback, context);},
getCityList:function(ProvinceId,callback,context){return new ajax_request(this.url + '?_method=getCityList&_session=r','ProvinceId=' + enc(ProvinceId),callback, context);},
getCTType:function(callback,context){return new ajax_request(this.url + '?_method=getCTType&_session=r','',callback, context);},
getInvoiceTemplateList:function(callback,context){return new ajax_request(this.url + '?_method=getInvoiceTemplateList&_session=r','',callback, context);},
saveInvoiceTemplate:function(Id,CompanyName,TaxNo,InvoiceType,BankName,BankAccount,CompanyAddress,CompanyTel,callback,context){return new ajax_request(this.url + '?_method=saveInvoiceTemplate&_session=rw','Id=' + enc(Id)+ '\r\nCompanyName=' + enc(CompanyName)+ '\r\nTaxNo=' + enc(TaxNo)+ '\r\nInvoiceType=' + enc(InvoiceType)+ '\r\nBankName=' + enc(BankName)+ '\r\nBankAccount=' + enc(BankAccount)+ '\r\nCompanyAddress=' + enc(CompanyAddress)+ '\r\nCompanyTel=' + enc(CompanyTel),callback, context);},
getInvoiceTemplate:function(Id,callback,context){return new ajax_request(this.url + '?_method=getInvoiceTemplate&_session=rw','Id=' + enc(Id),callback, context);},
getOrderList:function(callback,context){return new ajax_request(this.url + '?_method=getOrderList&_session=r','',callback, context);},
WxLogin:function(OpenId,Token,callback,context){return new ajax_request(this.url + '?_method=WxLogin&_session=rw','OpenId=' + enc(OpenId)+ '\r\nToken=' + enc(Token),callback, context);},
getOrderById:function(OrderId,callback,context){return new ajax_request(this.url + '?_method=getOrderById&_session=r','OrderId=' + enc(OrderId),callback, context);},
url:'/ajax/AjaxSSL,App_Code.zcaz81jk.ashx'
}
function AjaxImage(url){var img=new Image();img.src=url;return img;}
function HtmlControl(id) {
	var ele = null;
	if(typeof(id) == 'object') ele = id; else ele = document.getElementById(id);
	if(ele == null) return null;
	var _o = ele.cloneNode(true);
	var _op = document.createElement('SPAN');
	_op.appendChild(_o);	
	this._source = _op.innerHTML;
}
HtmlControl.prototype.toString = function(){ return this._source; }

function HtmlControlUpdate(func, parentId) {
var f,i,ff,fa='';
var ele = document.getElementById(parentId);
if(ele == null) return;
var args = [];
for(i=0; i<HtmlControlUpdate.arguments.length; i++)
	args[args.length] = HtmlControlUpdate.arguments[i];
if(args.length > 2)
	for(i=2; i<args.length; i++){fa += 'args[' + i + ']';if(i < args.length -1){ fa += ','; }}
f = '{"invoke":function(args){return ' + func + '(' + fa + ');}}';
ff = null;eval('ff=' + f + ';');
if(ff != null && typeof(ff.invoke) == 'function')
{
	var res = ff.invoke(args);
	if(res.error != null){alert(res.error);return;}
	ele.innerHTML = res.value;
}
}
function TimeSpan(){this.Days=0;this.Hours=0;this.Minutes=0;this.Seconds=0;this.Milliseconds=0;}
TimeSpan.prototype.toString = function(){return this.Days+'.'+this.Hours+':'+this.Minutes+':'+this.Seconds+'.'+this.Milliseconds;}
function digi(v, c){v = v + "";var n = "0000";if(v.length < c) return n.substr(0, c-v.length) + v;return v;}
function DateTime(year,month,day,hours,minutes,seconds){if(year>9999||year<1970||month<1||month>12||day<0||day>31||hours<0||hours>23||minutes<0||minutes>59||seconds<0||seconds>59)throw("ArgumentException");this.Year = year;this.Month = month;this.Day = day;this.Hours = hours;this.Minutes = minutes;this.Seconds = seconds;}
DateTime.prototype.toString = function(){return digi(this.Year,4) + digi(this.Month,2) + digi(this.Day,2) + digi(this.Hours,2) + digi(this.Minutes,2) + digi(this.Seconds,2);}
function _getTable(n,e){for(var i=0; i<e.Tables.length; i++){if(e.Tables[i].Name == n)return e.Tables[i];}return null;}