function addBold( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<b></b>';

  }
}

function addItalic( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<i></i>';

  }
}

function addUnderline( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<u></u>';

  }
}
function addStrike( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<strike></strike>';

  }
}
function addCenter( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<center></center>';

  }
}
function addBig( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<big></big>';

  }
}
function addSmall( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<small></small>';

  }
}
function addSub( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<sub></sub>';

  }
}
function addSup( textId ) {
  if (document.getElementById) {

	var container 	= document.getElementById( textId );

    container.value += '<sup></sup>';

  }
}
function preview( textId ) {
  if (document.getElementById) {
	var container = document.getElementById( textId );
	var preview = document.getElementById( "preview" );
	
	preview.innerHTML = container.value.replace(/\n/g, '<br />');


  }
}