// JavaScript Document
function makeCode(form,which,msg,code) {
	switch(which) {
		case 'Link':
			url = prompt("Enter the URL (http://foo.com/) of the link","http://trekweb.com/");
			if (url != null && url != "") {
				text = prompt("Enter the text for the link","link");
				}
			if ((url != null) && (url != "")) {
				if ((text != null) && (text != ""))
					form.message.value += "[l="+url+"]"+text+"[el] ";
				else
					form.message.value += "[l="+url+"]link[el] ";
				}
			break
		case 'style':
			text = prompt("Enter the text to "+msg);
			if ((text != null) && (text != "")) {
				 form.message.value += "["+code+"]"+text+"[e"+code+"] ";
				}
			break
		case 'Img':
			text = prompt("Enter the image file's URL","http://foo.com/image.jpg");
			if ((text != null) && (text != "")) {
			 form.message.value += "[img="+text+"] ";
				}
			break
		}
	form.message.focus();
}
