	function doShowDialog(strURL, strWidth, strHeight){
		try {
			var strFullURL = strURL
			var strOptions = '';
			strOptions += 'unadorned:yes;status:no;center:yes;scroll:auto;resizable:no;help:no;menubar:no,toolbar:no;';
			strOptions += 'dialogHeight:' + strHeight + ';';
			strOptions += 'dialogWidth:' + strWidth + ';';
			return showModalDialog(strFullURL,'',strOptions);
		} 
		catch (error) {
			alert("doShowDialog() in ScreenFuncs.js caused the following error: " + error.description)
		}
	}


	function fenop(page, strWidth, strHeight) { 
		try {
			hwnd = open(page, "News", "location=no, toolbar=no, status=yes, menubar=no, scrollbar=yes, resizable=yes, width=" + strWidth + ", height=" + strHeight + ", top=100, left=50"); 
			hwnd.focus();
		} 
		catch (error) {
			alert("fenop() in ScreenFuncs.js caused the following error: " + error.description)
		}
	}


        function doAddEmoticons( strMessage)  {
		try {

			strMessage = doReplaceEmoticon(strMessage, ":)", "teeth_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":)",  "teeth_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":`(", "cry_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":()", "sad_smile.gif");
			strMessage = doReplaceEmoticon(strMessage, ":(", "angry_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(Y)", "thumbs_up.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(N)", "thumbs_down.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(B)", "beer_yum.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(D)", "martini_shaken.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(X)", "girl_handsacrossamerica.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(Z)", "guy_handsacrossamerica.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":-[)", "bat.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(})", "girl_hug.gif");
                        strMessage = doReplaceEmoticon(strMessage, "({)", "dude_hug.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":)", "regular_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":D", "teeth_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":O", "omg_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":P", "tounge_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ";)", "wink_smile.gif");

                        strMessage = doReplaceEmoticon(strMessage, "(P)", "confused_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":-|", "whatchutalkingabout_smile.gif");
			strMessage = doReplaceEmoticon(strMessage, ":|", "whatchutalkingabout_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":'()", "cry_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":$)", "embaressed_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(H)", "shades_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, ":-@", "angry_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(A)", "angel_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(6)", "devil_smile.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(L)", "heart.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(U)", "broken_heart.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(K)", "kiss.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(G)", "present.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(F)", "rose.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(W)", "wilted_rose.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(P)", "camera.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(~)", "film.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(T)", "phone.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(@)", "kittykay.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(&)", "bowwow.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(C)", "coffee.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(I)", "lightbulb.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(S)", "moon.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(*)", "star.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(8)", "musical_note.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(E)", "envelope.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(^)", "cake.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(P)", "clock.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(M)", "messenger.gif");
                        strMessage = doReplaceEmoticon(strMessage, "(markwilson)", "MarkWilsonEmot2.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(tac)", "TacEmoticon5.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(sherv)", "ShervEmot1.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(beer)", "ShervTableEmot2.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(kevin)", "KevEmot2.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(dave)", "DaveEmot2.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(jason)", "JasonEmot1.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(bullet)", "BulletEmot3.jpg");
			strMessage = doReplaceEmoticon(strMessage, "(shersher)", "SherSher.jpg");
                        strMessage = doReplaceEmoticon(strMessage, "(blue)", "BlueManEmot2.jpg");
			strMessage = doReplaceEmoticon(strMessage, "(partyon)", "partyon.gif");
			strMessage = doReplaceEmoticon(strMessage, "(darth)", "animated/darth.gif");
			strMessage = doReplaceEmoticon(strMessage, "(toast)", "animated/toast.gif");
			strMessage = doReplaceEmoticon(strMessage, "(toast)", "animated/angel.gif");
			strMessage = doReplaceEmoticon(strMessage, "(babe)", "animated/babe.gif");
			strMessage = doReplaceEmoticon(strMessage, "(argument)", "animated/argument.gif");
			strMessage = doReplaceEmoticon(strMessage, "(blah)", "animated/blahblah.gif");
			strMessage = doReplaceEmoticon(strMessage, "(callme)", "animated/callme.gif");
			strMessage = doReplaceEmoticon(strMessage, "(crying)", "animated/crying.gif");
			strMessage = doReplaceEmoticon(strMessage, "(darth)", "animated/darth.gif");
			strMessage = doReplaceEmoticon(strMessage, "(dollar)", "animated/dollar.gif");
			strMessage = doReplaceEmoticon(strMessage, "(drowning)", "animated/drowning.gif");
			strMessage = doReplaceEmoticon(strMessage, "(error)", "animated/error.gif");
			strMessage = doReplaceEmoticon(strMessage, "(furious)", "animated/furious.gif");
			strMessage = doReplaceEmoticon(strMessage, "(gbcw)", "animated/gbcw.gif");
			strMessage = doReplaceEmoticon(strMessage, "(getaroom)", "animated/getaroom.gif");
			strMessage = doReplaceEmoticon(strMessage, "(gramps)", "animated/gramps.gif");
			strMessage = doReplaceEmoticon(strMessage, "(love)", "animated/love.gif");
			strMessage = doReplaceEmoticon(strMessage, "(microwave)", "animated/microwave.gif");
			strMessage = doReplaceEmoticon(strMessage, "(pimp)", "animated/pimp.gif");
			strMessage = doReplaceEmoticon(strMessage, "(quarter)", "animated/quarter.gif");
			strMessage = doReplaceEmoticon(strMessage, "(reallymad)", "animated/reallymad.gif");
			strMessage = doReplaceEmoticon(strMessage, "(respect)", "animated/respect.gif");
			strMessage = doReplaceEmoticon(strMessage, "(sick)", "animated/sick.gif");
			strMessage = doReplaceEmoticon(strMessage, "(sleeper)", "animated/sleeper.gif");
			strMessage = doReplaceEmoticon(strMessage, "(snoozer)", "animated/snoozer.gif");
			strMessage = doReplaceEmoticon(strMessage, "(so)", "animated/so.gif");
			strMessage = doReplaceEmoticon(strMessage, "(soapbox)", "animated/soapbox.gif");
			strMessage = doReplaceEmoticon(strMessage, "(spam)", "animated/spam.gif");
			strMessage = doReplaceEmoticon(strMessage, "(talkstoomuch)", "animated/TalksTooMuch.gif");
			strMessage = doReplaceEmoticon(strMessage, "(toast)", "animated/toast.gif");
			strMessage = doReplaceEmoticon(strMessage, "(whyme)", "animated/whyme.gif");
			strMessage = doReplaceEmoticon(strMessage, "(worried)", "animated/worried.gif");
			strMessage = doReplaceEmoticon(strMessage, "(shersher)", "shersher.jpg");
			//added
			strMessage = doReplaceEmoticon(strMessage, "(banghead)", "animated/banghead.gif");
			strMessage = doReplaceEmoticon(strMessage, "(bs)", "animated/bs.gif");
			strMessage = doReplaceEmoticon(strMessage, "(coffee)", "animated/coffee.gif");
			strMessage = doReplaceEmoticon(strMessage, "(doh)", "animated/doh!.gif");
			strMessage = doReplaceEmoticon(strMessage, "(embarrassed)", "animated/embarrassed.gif");

			strMessage = doReplaceEmoticon(strMessage, "(funny_post)", "animated/funny_post.gif");
			strMessage = doReplaceEmoticon(strMessage, "(grumpy)", "animated/grumpy.gif");
			strMessage = doReplaceEmoticon(strMessage, "(imwithstupid)", "animated/imwithstupid.gif");
			strMessage = doReplaceEmoticon(strMessage, "(lol)", "animated/lol.gif");
			strMessage = doReplaceEmoticon(strMessage, "(neanderthal)", "animated/neanderthal.gif");
			strMessage = doReplaceEmoticon(strMessage, "(ranton)", "animated/ranton.gif");
			strMessage = doReplaceEmoticon(strMessage, "(rantoff)", "animated/rantoff.gif");


			strMessage = doReplaceEmoticon(strMessage, "(rtfm)", "animated/rtfm.gif");
			strMessage = doReplaceEmoticon(strMessage, "(sike)", "animated/sike.gif");
			strMessage = doReplaceEmoticon(strMessage, "(surrender)", "animated/surrender.gif");
			strMessage = doReplaceEmoticon(strMessage, "(why_this)", "animated/why_this.gif");
			strMessage = doReplaceEmoticon(strMessage, "(wizard)", "animated/wizard.gif");
			strMessage = doReplaceEmoticon(strMessage, "(wow)", "animated/wow.gif");
			strMessage = doReplaceEmoticon(strMessage, "(wtf)", "animated/wtf.gif");
			strMessage = doReplaceEmoticon(strMessage, "(nothingfunnytoadd)", "animated/nothingfunnytoadd.gif");
			strMessage = doReplaceEmoticon(strMessage, "(bewarespam)", "animated/bewarespam.gif");
			strMessage = doReplaceEmoticon(strMessage, "(bullycat)", "animated/bullyCat.jpg");

			return  strMessage;
		}
		catch (error) {
			alert("doReplaceEmoticon() in ChatFuncsIE.js caused the following error: " + error.description)
		}
	}
	function doReplaceEmoticon(strMessage, strEmoticon, strEmoticonFile) {
		try 
		{
			var strImagePath = '../images/emoticons/';
			var strNewMessage =  strMessage;
			strEmoticonFile = '<img src="' + strImagePath + strEmoticonFile + '">';
			strNewMessage = strNewMessage.replace(strEmoticon, strEmoticonFile );
			strNewMessage = strNewMessage.replace(strEmoticon, strEmoticonFile );
			strNewMessage = strNewMessage.replace(strEmoticon, strEmoticonFile );
			strNewMessage = strNewMessage.replace(strEmoticon, strEmoticonFile );
			
			return strNewMessage;
		}
		catch (error) 
		{
			alert("doReplaceEmoticon() in ChatFuncsIE.js caused the following error: " + error.description)
		}
		
	}


	function GetNodeValue(objNode, strXPath) {
		try 
		{
			return objNode.selectSingleNode(strXPath).text
		} 
		catch (error) 
		{
			return("");
		}
	}