// BEGIN reading currently selected text
function readText() {
	if ((domData.isOther) || (domData.isIE5Mac)) { return; }
	var text = "";
	if (domData.isNN4) { text = document.getSelection(); 
	} else if (domData.isIE4up) { text = document.selection.createRange().text; 
	} else if (domData.isNN6up) { text = document.getSelection(); }
	return text;
} // END readText()


// BEGIN run a search from the selected word
function defineWord() {
	if ((domData.isOther) || (domData.isIE5Mac)) { return; }
	var word = readText();
	if (word == "") { 
		alert("To use the cross-reference feature, use your mouse to select text, then click the cross-reference link or option.");
		return; 
	}
	var lookup = "/search/query?view=crossref&text="+word;
	popup(lookup,"definer",750,500);
} // END define

