if (document.all)
	{
		window.attachEvent('onload', new Function('var e = new TEditorElementLink(document,null,\'E-Mail-Link mit SPAM-Schutz\');e.unprotectDocument();'));
	}
else
	{
		window.addEventListener('load', new Function('var e = new TEditorElementLink(document,null,\'E-Mail-Link mit SPAM-Schutz\');e.unprotectDocument();'), false);
	}

function open_internerlink_nw(url,w,h)
	{
	l = Math.round(screen.width/2)-Math.round(w/2);
	t = Math.round(screen.height/2)-Math.round(h/2);
	window.open(url,'','left='+l+',top='+t+',dependent=no,width='+w+',height='+h+',scrollbars=yes,status=no,toolbar=no,menubar=no');
	}

function open_internerlink_nw(url,w,h)
	{
	l = Math.round(screen.width/2)-Math.round(w/2);
	t = Math.round(screen.height/2)-Math.round(h/2);
	window.open(url,'','left='+l+',top='+t+',dependent=no,width='+w+',height='+h+',scrollbars=yes,status=no,toolbar=no,menubar=no');
	}

function changeimg(bildname,dateiname)
	{
	document.images[bildname].src=dateiname;
	}

function showpic(id,picture,width,height)
	{
	if (parseInt(width) < 2)
		{
		width  = parseInt(width) + 25;
		height = parseInt(height) + 25;
		}
	else
		{
		width	= 980
		height	= 680
		}
	window.open('/file/'+id+'_'+picture,'cmspicture'+id,'width='+(width)+',height='+(height)+',scrollbars=yes');
	}

function showpic(id,picture,width,height,endung)
	{
	if (parseInt(width) < 2)
		{
		width  = parseInt(width) + 25;
		height = parseInt(height) + 25;
		}
	else
		{
		width	= 980
		height	= 680
		}
	window.open('/file/'+id+'_pic.'+endung,'cmspicture'+id,'width='+(width)+',height='+(height)+',scrollbars=yes');
	}
	
function CheckLen(Target,name) 
	{
	StrLen = Target.value.length
	if (StrLen == 1 && Target.value.substring(0,1) == " ")
		{
		Target.value = ""
		StrLen = 0
		}
	if (StrLen > 3000 )
		{
		Target.value = Target.value.substring(0,3000)
		CharsLeft = 0
		}
	else
		{
		CharsLeft = 3000 - StrLen
		}
	name.value = CharsLeft
	}
