I can't get the script to work that will replace old text with new text in specified th:

html content:
<table align="center" cellspacing="1" class="homepagemodule report" id="trade_bait">
		<span>Trade Bait</span>
		<th class="franchisename">Franchise</th>
		<th class="willgiveup">Will Give Up</th>
		<th class="inexchangefor">In Exchange For</th>
I would like to replace "Will Give Up" in second th with "Offered" and here's script I did that didn't worked:

function replaceText () {
	var offeredparent = document.getElementById('trade_bait').getElementsByTagName("tbody")[0].getElementsByTagName('tr').getElementsByTagName('th')[1];
	var str = offeredparent.textNode.nodeValue;
	tr = str.replace('Will Give Up','Offered');
	offeredparent.textNode.nodeValue = str;
Could use help to correct this or suggest different script that would work better.

appreciate the help!