function GetSelected(What) {
var Value;
if (window.getSelection) {
Value=window.getSelection();
} else {
if (document.getSelection) {
Value=document.getSelection();
}...