function submitForm(myform)
{
	ua = navigator.userAgent;
	if(ua.indexOf("MSIE") >= 0)
	{
		// works fine in ie
		window.setTimeout('document.FrmEdit.submit('+myform+')',10);
	}
	else
	{
		// works fine in ff and others ;)
		document.FrmEdit.submit(myform);
	}
}

function FormSubmit(myform) {
	ua = navigator.userAgent;
	if(ua.indexOf("MSIE") >= 0)
	{
		// works fine in ie
		window.setTimeout('document.FrmEdit.submit('+myform+')',10);
	}
	else
	{
		// works fine in ff and others ;)
		document.FrmEdit.submit(myform);
	}
}

function showPic(url, pic_url) {
	open_win = url+'?pic='+html_entities(pic_url);
	MeinFenster = window.open(open_win, "Zweitfenster", "width=640,height=480,scrollbars=yes");
}

Array.prototype.array_cut = function(n) {
	if(n>=0 && n<this.length) {
		if(n<this.length) {
			var x = -1;
			while((++x)<this.length) {
				if(x>=n) {
					this[x] = this[x+1];
				}
			}
		}
		this.pop();
	}
};

Array.prototype.array_sort = function(n) {
	if(n>=0 && n<this.length) {
		if(n<this.length) {
			var x = -1;
			while((++x)<this.length) {
				if(x>=n) {
					this[x] = this[x+1];
				}
			}
		}
	}
};

Array.prototype.array_insert = function(a, b) {
	this.splice(a,"",b);
};

function ext_round(x, n) {
	if (n < 1 || n > 14) return false;
	var e = Math.pow(10, n);
	var k = (Math.round(x * e) / e).toString();
	if (k.indexOf('.') == -1) k += '.';
	k += e.toString().substring(1);
	return k.substring(0, k.indexOf('.') + n+1);
}

function html_entities(str)
{
     str = escape(str);
     str = str.replace(/\//g,"%2F");
     str = str.replace(/\?/g,"%3F");
     str = str.replace(/=/g,"%3D");
     str = str.replace(/&/g,"%26");
     str = str.replace(/@/g,"%40");
     return str;
}