/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Corneliu Lucian 'Kor' Rusu | corneliulucian[at]gmail[dot]com */
var words={
// Add words here to be changed. Format - 'original':'replacement'
'[(]R[)]':'®',
'[(]TM[)]':'™'
}
var regs=[];
for(arg in words){regs[regs.length]=new RegExp(arg,'g')}

function replaceText(){
var tags=document.getElementsByTagName('body')[0].getElementsByTagName('*');
var i=0,t;
	while(t=tags[i++]){
		if(t.childNodes[0]){
			var j=0, c;
			while(c=t.childNodes[j++]){
				if(c.nodeType==3){
					var k=0;
					for(arg in words){
						c.nodeValue=c.nodeValue.replace(regs[k],words[arg]);
						k++;
					}
				}
			}
		}
	}
}
