function altimusClient() { var reg = new RegExp(/altimusResponse=([0-9]+)/); var mat = reg.exec(String(window.location)); if (mat) { if (mat[1] > 0) { this.showMessage(this.getMessageText(mat[1])); } } this.recall = String(window.location); this.recall = this.recall.replace('?', '|'); this.recall = this.recall.replace('&', '$'); var mat = reg.exec(this.recall); if (mat) { this.recall = this.recall.replace(mat[0], ''); } } altimusClient.prototype.getMessageText = function(code) { switch (Number(code)) { case 0: return "Array"; break; case 1: return "Array"; break; case 2: return "Array"; break; case 3: return "Array"; break; case 4: return "Array"; break; case 5: return "Array"; break; case 6: return "Array"; break; case 7: return "Array"; break; case 8: return "Array"; break; case 9: return "Array"; break; } } altimusClient.prototype.showMessage = function(text) { //alert(text); } altimusClient.prototype.inputAction = function(sender, keyCode, groups, name) { if (keyCode == 13) { window.location.replace('http://www.altimus.pl/client/index.php?a=address&u=251&c=9a8bf00b1b2d4d41a07bc54e6c9b5c30&insert='+sender.value+(groups ? '&g='+groups : '')+(name ? '&n='+name : '')+'&recall='+this.recall); } } altimusClient.prototype.inputActionPhone = function(sender, keyCode, groups, name) { if (keyCode == 13) { window.location.replace('http://www.altimus.pl/client/index.php?a=number&u=251&c=9a8bf00b1b2d4d41a07bc54e6c9b5c30&insert='+sender.value.replace('+', '*')+(groups ? '&g='+groups : '')+(name ? '&n='+name : '')+'&recall='+this.recall); } } var altimus = new altimusClient;