
String.prototype.trim = function () {
	var A = this;
	A = A.replace(/^\s*(.*)/, "$1");
	A = A.replace(/(.*?)\s*$/, "$1");
	return A;
};
String.prototype.stripFirstChar = function () {
	var B = "";
	var A = this;
	for (i = 0; i < A.length; i++) {
		if (i > 0) {
			B = B + data[i];
		}
	}
	A = B;
	return A;
};
String.prototype.stripChars = function (E, D) {
	var C = "";
	var A = this;
	var B = ((D * 1) + (E * 1)) * 1 - 1;
	for (i = 0; i < A.length; i++) {
		if (i < D || i > B) {
			C = C + A.charAt(i);
		}
	}
	A = C;
	return A;
};
function isArray(A) {
	return isObject(A) && A.constructor == Array;
}
function isBoolean(A) {
	return typeof A == "boolean";
}
function isEmpty(C) {
	var B, A;
	if (isObject(C)) {
		for (B in C) {
			A = C[B];
			if (isUndefined(A) && isFunction(A)) {
				return false;
			}
		}
	}
	return true;
}
function isFunction(A) {
	return typeof A == "function";
}
function isNull(A) {
	return typeof A == "object" && !A;
}
function isNumber(A) {
	return typeof A == "number" && isFinite(A);
}
function isObject(A) {
	return (A && typeof A == "object") || isFunction(A);
}
function isString(A) {
	return typeof A == "string";
}
function isUndefined(A) {
	return typeof A == "undefined";
}
function setFieldOnArray(B, A) {
	B[getNextArrayLocation(B)] = A.name;
}
function showRequiredFields(B) {
	if (isArray(B) && B.length > 0) {
		var C = "\n";
		for (var A = 0; A < B.length; A++) {
			C = C + B[A] + "\n";
		}
		alert("Required Fields: " + C);
	}
}
function getNextArrayLocation(A) {
	if (isArray(A)) {
		if (A.length == 0) {
			return 0;
		}
		return (A.length * 1);
	}
}
function csvToArray(B) {
	if (isString(B)) {
		var A = B.split(",");
		return A;
	}
}
function getPageOffsetLeft(B) {
	var A;
	A = B.offsetLeft;
	if (B.offsetParent != null) {
		A += getPageOffsetLeft(B.offsetParent);
	}
	return A;
}
function getPageOffsetTop(A) {
	var B;
	B = A.offsetTop;
	if (A.offsetParent != null) {
		B += getPageOffsetTop(A.offsetParent);
	}
	return B;
}
function CustomElement() {
}
CustomElement.prototype.setAtributeOther = function (C, D) {
	if (bVer() >= 6) {
		var B = this;
		var A = document.createAttribute(C);
		A.value = D;
		B.setAttributeNode(A);
	} else {
		var B = this;
		B.setAttribute(C, D);
	}
};
function applyInherit(B, A) {
	for (method in A) {
		B[method] = A[method];
	}
	return B;
}
function setMaxLength() {
	var A = document.getElementsByTagName("textarea");
	var B = document.createElement("div");
	B.className = "counter";
	for (var C = 0; C < A.length; C++) {
		if (A[C].getAttribute("maxlength")) {
			var D = B.cloneNode(true);
			D.relatedElement = A[C];
			D.innerHTML = "<span>0</span>/" + A[C].getAttribute("maxlength");
			A[C].parentNode.insertBefore(D, A[C].nextSibling);
			A[C].relatedElement = D.getElementsByTagName("span")[0];
			A[C].onkeyup = A[C].onchange = checkMaxLength;
			A[C].onkeyup();
		}
	}
}
function checkMaxLength() {
	var A = this.getAttribute("maxlength");
	var B = this.value.length;
	if (B > A) {
		this.relatedElement.className = "toomuch";
		this.value = this.value.substring(0, this.value.length - 1);
		B = this.value.length;
	} else {
		this.relatedElement.className = "";
	}
	this.relatedElement.firstChild.nodeValue = B;
}

