		
		function ConvertBR(entry) {
		// Converts carriage returns 
		// to <br> for display in HTML	
			out = String.fromCharCode(10); // replace this
			add = "<br>"; // with this
			temp = "" + entry; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
			
			if (navigator.platform=="Win32") {
				out = String.fromCharCode(13); // replace this
				add = ""; // with this
				temp = "" + temp; // temporary holder
	
				while (temp.indexOf(out)>-1) {
					pos= temp.indexOf(out);
					temp = "" + (temp.substring(0, pos) + add + 
					temp.substring((pos + out.length), temp.length));
				}
			} else {
				out = String.fromCharCode(13); // replace this
				add = "<br>"; // with this
				temp = "" + temp; // temporary holder
	
				while (temp.indexOf(out)>-1) {
					pos= temp.indexOf(out);
					temp = "" + (temp.substring(0, pos) + add + 
					temp.substring((pos + out.length), temp.length));
				}
			}
		// Converts MAD emoticon
			out = ">("; // replace this
			add = "<img src=http://www.tastypopsicle.com/images/mood/mad.gif>"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SLY emoticon
			out = ";)"; // replace this
			add = "<img src=http://www.tastypopsicle.com/images/mood/sly.gif>"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SAD emoticon
			out = ":("; // replace this
			add = "<img src=http://www.tastypopsicle.com/images/mood/sad.gif>"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts HAPPY emoticon
			out = ":)"; // replace this
			add = "<img src=http://www.tastypopsicle.com/images/mood/happy.gif>"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SILLY emoticon
			out = ":P"; // replace this
			add = "<img src=http://www.tastypopsicle.com/images/mood/silly.gif>"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
			document.mainForm.content.value = temp;
			
			document.mainForm.submit();
		}
		
		function replaceChars(entry) {
		// Converts <br> back to carriage returns
		
			out = "<br>"; // replace this
			add = String.fromCharCode(10); // with this
			temp = "" + entry; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
				// Converts MAD emoticon
			out = "<img src=http://www.tastypopsicle.com/images/mood/mad.gif>"; // replace this
			add = ">("; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SLY emoticon
			out = "<img src=http://www.tastypopsicle.com/images/mood/sly.gif>"; // replace this
			add = ";)"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SAD emoticon
			out = "<img src=http://www.tastypopsicle.com/images/mood/sad.gif>"; // replace this
			add = ":("; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts HAPPY emoticon
			out = "<img src=http://www.tastypopsicle.com/images/mood/happy.gif>"; // replace this
			add = ":)"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
		// Converts SILLY emoticon
			out = "<img src=http://www.tastypopsicle.com/images/mood/silly.gif>"; // replace this
			add = ":P"; // with this
			temp = "" + temp; // temporary holder

			while (temp.indexOf(out)>-1) {
				pos= temp.indexOf(out);
				temp = "" + (temp.substring(0, pos) + add + 
				temp.substring((pos + out.length), temp.length));
			}
			document.mainForm.content.value = temp;
		}
