function swap_input( id, swaper ) 
{
	if (document.getElementById( id ).value == swaper) 
	{ 
		newvalue = ''; 
		document.getElementById( id ).value = newvalue;
	}
}

function reswap_input( id, swaper ) 
{
	if (document.getElementById( id ).value == '') 
	{ 
		document.getElementById( id ).value = swaper;
	}												
	if (document.getElementById( id ).value != '' && document.getElementById( id ).value != swaper) 
	{ 
	}
}

function addsmilie( name ) 
{
	id = 'threadC';
	NewCode = ' :' + name + ': ';
	if (document.all.item(id).createTextRange && document.all.item(id).caretPos) 
	{
		var caretPos = document.all.item(id).caretPos;
		
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
	} 
	else 
	{
		document.all.item(id).value += NewCode;
	}
	
}

function zitat(autor, zitaten) 
{
	id = 'threadC';
	NewCode = ':startI:' + autor + ':br::startquote:' + zitaten + ':endquote::endI:';
	if (document.all.item(id).createTextRange && document.all.item(id).caretPos) 
	{
		var caretPos = document.all.item(id).caretPos;
		
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
	} 
	else 
	{
		document.all.item(id).value += NewCode;
	}
	
}