Help ME with script

hello im looking for a javascript, pretty simple but im nothing for making scripts, i just create and design web sites. Well i need a script that does this.
Searchs web site<> for a name. and if it finds the name it puts up this image, if it does not find a match it displays this

Eternal lands is an mmorpg i play with alot of my friends and have been wanting an online/offline status page for a while. That is simply all i ask a sample page of what im asking for here -->, please help me im no good at scripting.