﻿//  Ext.Msg.show = Ext.Msg.show.createSequence(function () {Ext.Msg.getDialog().constraintoviewport = true;Ext.Msg.getDialog().body.setStyle("background", "Transparent");});
//    Ext.data.Connection.prototype.handleResponse = Ext.data.Connection.prototype.handleResponse.createInterceptor(function (response) {var r = response.responseText;if (r.indexOf("{\"value\":") == 0) {response.responseText = "(" + r.substring(9, r.length - 1) + ")";} else if (r.indexOf("{\"error\":") == 0) {response.responseText = "(" + r.substring(9, r.length - 1) + ")";this.handleFailure(response);return false;} else {response.responseText = "{\"Message\":\"Failed.\"}";this.handleFailure(response);return false;}});
//    Ext.data.Connection.prototype.handleFailure = Ext.data.Connection.prototype.handleFailure.createInterceptor(function (response) {var r = response.responseText;if (!r){}else{if (r.indexOf("{\"Message\":") != 0) {response.responseText = Ext.encode({Message:r, Type:"Connection"});}});
//    Ext.BasicDialog.prototype.startMove = function () {if (this.proxyDrag) {this.proxy.show();}if (this.constraintoviewport !== false) {this.dd.constrainTo(this.container || document.body, {right:this.shadowOffset, bottom:this.shadowOffset});}};

Ext.Msg.show = Ext.Msg.show.createSequence(function () {Ext.Msg.getDialog().constraintoviewport = true;Ext.Msg.getDialog().body.setStyle("background", "Transparent");});
  Ext.data.Connection.prototype.handleResponse = Ext.data.Connection.prototype.handleResponse.createInterceptor(function (response) {var r = response.responseText;if (r.indexOf("{\"value\":") == 0) {response.responseText = "(" + r.substring(9, r.length - 1) + ")";} else if (r.indexOf("{\"error\":") == 0) {response.responseText = "(" + r.substring(9, r.length - 1) + ")";this.handleFailure(response);return false;} else {response.responseText = "{\"Message\":\"Failed.\"}";this.handleFailure(response);return false;}});
  Ext.data.Connection.prototype.handleFailure = Ext.data.Connection.prototype.handleFailure.createInterceptor(function (response) {
	var r = response.responseText;
	if (!r){response.responseText = Ext.encode({Message:"Time out has occurred", Type:"Connection"});}
	else{
		if (r.indexOf("{\"Message\":") != 0) {response.responseText = Ext.encode({Message:r, Type:"Connection"});
		}
		}
});
  Ext.BasicDialog.prototype.startMove = function () {if (this.proxyDrag) {this.proxy.show();}if (this.constraintoviewport !== false) {this.dd.constrainTo(this.container || document.body, {right:this.shadowOffset, bottom:this.shadowOffset});}};