&#160;&#160;// endwhile
<br>

<br>
&#160;&#160;return str;
<br>
&#160;&#160;
<br>
}
<br>

<br>
/**

<br>
 *
<br>
 * setTextContentOfNode
<br>
 * 
<br>
 * @contructor
<br>
 */
<br>
 

<br>
function setTextContentOfNode( node, text ) {
<br>

<br>
&#160;&#160; // Generate a new text node with the text value
<br>
&#160;&#160;&#160;&#160;var text_node = document.createTextNode(text);
<br>
&#160;&#160;
<br>
&#160;&#160;&#160;&#160;// Remove child nodes to remove text
<br>
&#160;&#160;&#160;&#160;while (node.first