<!--
var oEditSelection;

function BtnDown()
{
	text = window.event.srcElement.innerText;
	if (text != "ContentEditable")
		window.event.srcElement.style.borderStyle = "inset";
}

function BtnUp()
{	
	text = window.event.srcElement.innerText;
	if (text != "ContentEditable")
		window.event.srcElement.style.borderStyle = "outset";
}

function Toggle()
{
	try{
	text = window.event.srcElement.innerText;

	if (text == "ContentEditable")
	{
		if (document.all("edit").contentEditable == "true")
		{
			document.all("edit").contentEditable = "false";
			window.event.srcElement.style.borderStyle = "outset";
		}
		else
		{
			document.all("edit").contentEditable = "true";
			window.event.srcElement.style.borderStyle = "inset";
		}
	}

	if (text == "Bold")
	{
		oEditSelection.select();
		document.execCommand("Bold", false, null);
	}

	if (text == "Italic")
	{
		oEditSelection.select();
		document.execCommand("Italic", false, true);
	}	
	if (text == "FontColor")
	{
		var theColor = document.all.fontcolor.value;
		if (theColor == "") return;
		
		oEditSelection.select();
		document.execCommand("ForeColor", false, theColor);
	}	
	if (text == "FontSize")
	{
		var theSize = document.all.fontsize.value;
		if (theSize == "getsize") theSize = null;
		
		oEditSelection.select();
		document.execCommand("FontSize", false, theSize);
	}	
	if (text == "FontName")
	{
		var theName = document.all.fontname.value;
		if (theName == "getname") theName = null;
		
		oEditSelection.select();
		document.execCommand("FontName", false, theName);
	}
	if (text != "ContentEditable")
		window.event.srcElement.style.borderStyle = "outset";
	}
	catch(e){}	
}
function InsertImage(theImg)
{
	if (theImg == "") theImg = null;
	try
	{
		//oEditSelection.select();
		document.getElementById("edit").focus();
		document.execCommand("InsertImage", false, theImg);
	}
	catch(e){}	
}
function document.onselectionchange()
{
	var temp = document.selection.createRange();
	try{
	oElem = temp.parentElement();
	
	while (oElem != null)
	{
		if (oElem.id == "edit")
		{
			oEditSelection = temp;
			//window.status = "Stored Selection: " + oEditSelection.htmlText;
			return;
		}
		
		oElem = oElem.parentElement;
	}
	}
	catch(e){}
}

function addsmiles(){window.open("smiles.asp",null,"width=620, height=450, scrollbars=1");}

function send()
{
	document.msg.message.value=document.getElementById("edit").innerHTML;
	document.msg.submit();
}

function printflash(src, w, h)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'" VIEWASTEXT>');
	document.write('<param name="movie" value="'+src+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="opaque">');
	document.write('<embed src="'+src+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" wmode="opaque">');
	document.write('</object>');	
}
//-->


