String.prototype.startsWith = function(inText) {return (this.indexOf(inText) == 0);};String.prototype.endsWith = function(text) {var index = this.indexOf(text);return index != -1 && index == (this.length - text.length);};function isEmail(text) {return new RegExp("^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[_A-Za-z0-9-]+)").test(text);}/** Returns the key pressed*/function getKey(inEvent) {if (!inEvent) {inEvent = window.event;}if (inEvent.which) {return inEvent.which;} else if (inEvent.keyCode) {return inEvent.keyCode;}return null;}function showSpinner() {document.getElementById("divSpinnerOverlay").style.display = "block";}function hideSpinner() {document.getElementById("divSpinnerOverlay").style.display = "none";}function ajax(action, callback, error) {dojo.xhrPost({url: "action/" + action,handleAs: "json",headers: { "Content-Type": "application/json"},load: function(data, args) {callback(data);},error: function() {if (error != null) {error();}}});}function ajaxJsonData(action, data, callback, error) {dojo.xhrPost({url: "action/" + action,handleAs: "json",headers: { "Content-Type": "application/json"},postData: dojo.toJson(data),load: function(data, args) {callback(data);},error: function() {if (error != null) {error();}}});}
