function(parent, text)
	{
		var doc = parent.ownerDocument;
		var node = doc.createTextNode(text);
		
		if (parent != null)
		{
			parent.appendChild(node);
		}
		
		return node;
	}
function(parent, text)
	{
		var doc = parent.ownerDocument;
		var node = doc.createTextNode(text);
		
		if (parent != null)
		{
			parent.appendChild(node);
		}
		
		return node;
	}
function ( parent , text ) { var doc = parent . ownerDocument ; var node = doc . createTextNode ( text ) ; if ( parent != null ) { parent . appendChild ( node ) ; } return node ; }
Function: write

Creates a text node for the given string and appends it to the given
parent. Returns the text node.

Parameters:

parent - DOM node to append the text node to.
text - String representing the text to be added.
Function : write
Creates a node in the specified parent