FundDic = {
	keyword: "",
	getWord: function(event) {
		var word = "";
		if(document.getSelection) {
			word = document.getSelection();
		} else if(document.selection) {
			word = document.selection.createRange().text;
		} else if(window.getSelection) {
			word = window.getSelection();
		}

		if(word.length > 0) {
			this.keyword = word;
			this.showButton(word, event);
		} else {
			this.hideButton();
		}
	},

	showButton: function(word, event) {
		var button = $("btnSearchWord");
		var imgX = 73;
		var imgY = 25;
		var cX = event.clientX;
		var cY = event.clientY;
		var sLeft = document.documentElement.scrollLeft;
		var sTop = document.documentElement.scrollTop;
		var x = cX + sLeft;
		var y = cY + sTop + 7;
		button.style.left = x + "px";
		button.style.top = y + "px";
		button.style.display = "";
	},

	hideButton: function() {
		$("btnSearchWord").style.display = "none";
	},

	openDictionary: function() {
		this.hideButton();
		openWindow("/Public/FundDictionary.jsp?keyword=" + encodeURIComponent(this.keyword), "740", "594");
	}
}
