
var selectedTxt = '';

function sayit()
{
		if (navigator.appName=="Microsoft Internet Explorer")
		{
				if (window.getSelection) // recent Mozilla versions
				{
						var selectedString = window.getSelection();
				}
				else if (document.all) // MSIE 4+
				{
						rng = document.selection.createRange();
						selectedString = rng.text;
				}
		}
		else
		{
				var selectedString = document.getSelection(); // works for all browsers except IE
		}
 
		//document.rs_form.rstext.value = selectedString;
		selectedTxt = selectedString;
}

function copyselected()
{
		setTimeout("sayit()",50);
		return true;
}

document.onmouseup = copyselected;
document.onkeyup = copyselected;

function openUrl(appRoot, popupWindowUrl)
{
	var parString = '?url=' + escape(window.location.href) +
			/*'&approot=' + escape(appRoot) +*/
			'&title=' + escape(document.title);

	window.open(appRoot + popupWindowUrl + parString, 'ReadSpeaker', 'width=410,height=260');
}
