I found myself in need of a set of functions that could be sent to either the main window or a separate window. The problem with the original functions is that "main" can't be used as a window name to send to the main window, so I would have had to redo my whole script with a bunch of conditionals just for the echos, echoLinks, and the setFgColors. Not wanting to do this and realizing that I could make my own functions, I made these and simply changed the function names in my script to the ones I made.
The functions are on pastebin because I can't figure out how to use code tags here.
These go into a script and then can be used anywhere.