Ask Ben: Javascript String Replace Method
alert( strText.replace(
"th"
, RandomString2 ) );
For Cut-and-Paste
alert( strText.replace( "th", RandomString2 ) );