
var debugmode = false;
/*** solve cross domain security woes ***/
var dom = document.domain;
try {
	a = dom.split(".").reverse();
	if (a.length == 1) {
		dom = a[0];
	} else {
		if (a.length > 1) {
			dom = a[1] + "." + a[0];
		}
	}
}
catch (e) {
	throw e;
}
/*** prototypes ***/
if ("object" == typeof Prototype) {
	Object.extend(Object.prototype, {parseFinance:function () {
		var oString = this.toFixed(2).toString();
		var negativ = "";
		try {
			oString = oString.replace(".", ",");
			oString = oString.split(",");
			if (oString[0].indexOf('-') == 0) {
				negativ = "-";
				oString[0] = oString[0].substr(1);
			}
			if (oString[0].length > 3) {
				oString[0] = oString[0].substr(0, (oString[0].length - 3)) + "." + oString[0].substr((oString[0].length - 3), 3);
			}
			if (oString[1] != null) {
				oString = oString[0] + "," + oString[1];
			}
		}
		catch (e) {
			if (debugmode) {
				alert(e);
			}
		}
		return negativ + oString;
	}, parseFinanceFloat:function () {
		return parseFloat((this.toString().indexOf(",") > this.toString().indexOf(".")) ? this.toString().replace(".", "").replace(",", ".") : this.toString().replace(".", ""));
	}, isNull:function () {
		return (this == null);
	}});
	Object.extend(String.prototype, {isEmpty:function () {
		return (this.isNull() || this.length == 0);
	}, isNumeric:function () {
		if (this.isEmpty()) {
			return false;
		}
		for (i = 0; i < this.length; i++) {
			if ("0123456789,.-".indexOf(this.charAt(i)) == -1) {
				return false;
			}
		}
		return true;
	}});
}
/*** / prototypes ***/
/*** global functions ***/
function closeBox() {
	document.domain = dom;
	if (window.parent.Lightbox.deactivateBox) {
		window.parent.Lightbox.deactivateBox();
	}
}
function openWin(url, oW_width, oW_height, oW_menubar, oW_toolbar, oW_location, oW_status, oW_scrollbars, oW_resizable) {
	values = "width=" + oW_width + ",height=" + oW_height + ",menubar=" + oW_menubar + ",toolbar=" + oW_toolbar + ",location=" + oW_location + ",status=" + oW_status + ",scrollbars=" + oW_scrollbars + ",resizable=" + oW_resizable;
	window.open(url, "_blank", values);
}

// print page
function checkPrint() {
	if (window.print) {
		window.print();
	} else {
		window.alert("Die Seite wurde f\xfcr den Druck vorbereitet.\n\nKlicken Sie auf OK und benutzen Sie die Druckfunktion Ihres Browsers, um diese Seite auszudrucken.");
	}
}

