// This JavaScript was automatically generated by // Jayrock.JsonRpc.Web.JsonRpcProxyGenerator, Jayrock, Version=0.9.8316.0, Culture=neutral, PublicKeyToken=null // on 5 мая 2011 г. at 10:19:12 (Russian Daylight Time) function FeedbackService(url) { var self = this; var m = ["sendOnlineForm","sendSimpleOnlineForm","sendVacancyForm"]; var idems = [false,false,false]; this[m[0]] = function /* sendOnlineForm */ (name, position, phone, email, city, isCompany, companyName, ogrn, inn, companyPhone, companyAddress, directorName, debtorName, debtorPassport, debtorAddress, debtorPhone, debtSum, debtHistory, callback) { if (self.kwargs) return rpc(new Call(0, { name: name, position: position, phone: phone, email: email, city: city, isCompany: isCompany, companyName: companyName, ogrn: ogrn, inn: inn, companyPhone: companyPhone, companyAddress: companyAddress, directorName: directorName, debtorName: debtorName, debtorPassport: debtorPassport, debtorAddress: debtorAddress, debtorPhone: debtorPhone, debtSum: debtSum, debtHistory: debtHistory }, callback)); return rpc(new Call(0, [ name, position, phone, email, city, isCompany, companyName, ogrn, inn, companyPhone, companyAddress, directorName, debtorName, debtorPassport, debtorAddress, debtorPhone, debtSum, debtHistory ], callback)); } this[m[1]] = function /* sendSimpleOnlineForm */ (name, phone, email, message, callback) { if (self.kwargs) return rpc(new Call(1, { name: name, phone: phone, email: email, message: message }, callback)); return rpc(new Call(1, [ name, phone, email, message ], callback)); } this[m[2]] = function /* sendVacancyForm */ (name, phone, email, message, callback) { if (self.kwargs) return rpc(new Call(2, { name: name, phone: phone, email: email, message: message }, callback)); return rpc(new Call(2, [ name, phone, email, message ], callback)); } var url = typeof(url) === 'string' ? url : 'http://web.archive.orghttp://www.collectionagency.ru/svc/feedback.ashx'; var nextId = 0; function Call(method, params, callback) { this.url = url; this.callback = callback; this.proxy = self; this.idempotent = idems[method]; this.request = { id : ++nextId, method : m[method], params : params }; } function rpc(call) { return self.channel != null && typeof(self.channel.rpc) === 'function' ? self.channel.rpc(call) : call; } this.kwargs = false; this.channel = new JayrockChannel(); function JayrockChannel() { this.rpc = function(call) { var async = typeof(call.callback) === 'function'; var xhr = newXHR(); xhr.open('POST', call.url, async, this.httpUserName, this.httpPassword); xhr.setRequestHeader('Content-Type', this.contentType || 'application/json; charset=utf-8'); xhr.setRequestHeader('X-JSON-RPC', call.request.method); if (async) xhr.onreadystatechange = function() { xhr_onreadystatechange(xhr, call.callback); } xhr.send(JSON.stringify(call.request)); call.handler = xhr; if (async) return call; if (xhr.status != 200) throw new Error(xhr.status + ' ' + xhr.statusText); var response = JSON.eval(xhr.responseText); if (response.error != null) throw response.error; return response.result; } function xhr_onreadystatechange(sender, callback) { if (sender.readyState == /* complete */ 4) { var response = sender.status == 200 ? JSON.eval(sender.responseText) : {}; callback(response, sender); } } function newXHR() { if (typeof(window) !== 'undefined' && window.XMLHttpRequest) return new XMLHttpRequest(); /* IE7, Safari 1.2, Mozilla 1.0/Firefox, and Netscape 7 */ else return new ActiveXObject('Microsoft.XMLHTTP'); /* WSH and IE 5 to IE 6 */ } } } FeedbackService.rpcMethods = ["sendOnlineForm","sendSimpleOnlineForm","sendVacancyForm"]; /* FILE ARCHIVED ON 10:55:06 Feb 18, 2016 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 16:52:51 Nov 25, 2017. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */