function show_more(span)	<!-- read more link -->
{
	document.getElementById(span).style.display = (document.getElementById(span).style.display == 'none') ? 'block' : 'none';
}

function swap_image(base_image, new_image)	<!-- changes the source of an image -->
{
	base_image.src = new_image.src;
}

function openMail(email)	<!-- opens an new email message -->
{
	location.href = "mailto:"+decryptMail(email);
}

function decryptMail(cipher)	<!-- decrypts email address -->
{
	email = "";
	
	for(count = 0; count < cipher.length; ++count)
		email += String.fromCharCode(cipher.charCodeAt(count)+2);

	return email;
}

function insert(form, element, opentag, closetag)
{
	/*
	 *	BB-Code (c) by www.codevision.ch
	 *
	 *	Bytecode per Knopfdruck in ein Feld einfügen.
	 *	Funktioniert auch mit Markieren eines Textes.
	 */
	 
	document.forms[form].elements[element].focus();

	if (document.getSelection) // Mozilla & Netscape
	{
		var start_selection = document.forms[form].elements[element].selectionStart;
		var end_selection = document.forms[form].elements[element].selectionEnd;
		
		var start = (document.forms[form].elements[element].value).substring(0, start_selection);
		var middle = (document.forms[form].elements[element].value).substring(start_selection, end_selection);
		var end = (document.forms[form].elements[element].value).substring(end_selection, document.forms[form].elements[element].textLength);

		document.forms[form].elements[element].value = start + opentag + middle + closetag + end;
	}
	else if (window.getSelection) // W3C Standard & Firefox
	{
		var start_selection = document.forms[form].content.selectionStart;
		var end_selection = document.forms[form].content.selectionEnd;
		
		var start = (document.forms[form].content.value).substring(0, start_selection);
		var middle = (document.forms[form].content.value).substring(start_selection, end_selection);
		var end = (document.forms[form].content.value).substring(end_selection, document.forms[form].content.textLength);

		document.forms[form].content.value = start + opentag + middle + closetag + end;

	}
	else if (document.selection) // Internet Explorer
	{
		document.selection.createRange().text = opentag + document.selection.createRange().text + closetag;
	}
}