//SayIt JavaScript

<!--

var r;



function sayit()

{

	if(navigator.appName=="Microsoft Internet Explorer")

	{

		if(window.getSelection) //recent Mozilla versions

		{

			var selectedString=window.getSelection();

		}

		else if(document.all) //MSIE4+

		{

			rng=document.selection.createRange();

			selectedString=rng.text;



			var currentcolor=document.body.style.backgroundColor;

			if(r)

			{

				r.execCommand('BackColor','','currentcolor');

			}



			r = document.selection.createRange();

			r.execCommand('BackColor','','pink');



		}

	}

	else

	{

		var selectedString=document.getSelection(); //works for all browsers except IE

	}


	if(!document.rs_form) return;

	if(window.location.href)

	{
		if(!document.rs_form.url) return;
		document.rs_form.url.value=window.location.href;

	}

	else if(document.location.href)

	{
		if(!document.rs_form.url) return;
		document.rs_form.url.value=document.location.href;

	}


	if(!document.rs_form.rstext) return;
	document.rs_form.rstext.value=selectedString;

}



function copyselected()

{

	setTimeout("sayit()",50);

	return true;

}



document.onmouseup=copyselected;

document.onkeyup=copyselected;

//-->
