
	
	/*
	JavaScript Include

	Name:	 	: ReadSpeaker
	Address		: http://www.bernhoven.nl	
	Copyright	: Your Company Name
	Author	 	: Site Administrator
	Created	 	: 2009-04-16T15:48:52

	About this JavaScript include:
	...
*/

function rsTextSelection()
{
        if (document.getSelection) // older Mozilla versions
        {
                var selectedString = document.getSelection();
        }
        else if (document.all) // MSIE 4+
        {
                var selectedString=document.selection.createRange().text;
        }
        else if (window.getSelection) // recent Mozilla versions
        {
                var selectedString=window.getSelection();
        }
        
		document.getElementById('rs_form').selectedhtml.value = selectedString;
        
		if (document.getElementById('rs_form').url) {
                if (!document.getElementById('rs_form').url.value) {
                        if (window.location.href)
                        {
                                document.getElementById('rs_form').url.value=window.location.href;
                        }
                        else if (document.location.href)
                        {
                                document.getElementById('rs_form').url.value=document.location.href;
                        }
                }
        }
}

function copyselected()
{
        setTimeout("rsTextSelection()",50);
        return true;
}

function openAndRead() {
        window.open('','rs','width=310,height=120,toolbar=0');
        setTimeout("document.getElementById('rs_form').submit();",500);
}

document.onmouseup = copyselected;
document.onkeyup = copyselected;


