/* Function used by ReadSpeaker*/
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(); // FUNKAR FÖR ALLA UTOM EXPLORER
	}

	if (window.location.href)
	{ 
		document.rs_form.url.value = window.location.href; 
	} 
	else if (document.location.href) 
	{ 
		document.rs_form.url.value = document.location.href; 
	}
	document.rs_form.rstext.value = selectedString;
} 

function copyselected() 
{
	setTimeout("sayit()",50);
	return true; 
}

//Submits form declared in DefaultFramework to activate ReadSpeaker
function readPage()
{
	if(document.rs_form)
	{
		if(document.rs_form.url.value == "")
		{
			if (window.location.href)
			{ 
				document.rs_form.url.value = window.location.href; 
			} 
			else if (document.location.href) 
			{ 
				document.rs_form.url.value = document.location.href; 
			}
		}
		document.rs_form.submit();
	}
}
