
function dictionary() 
{
	var memberId = hidMemberID.value;
	
	var arrkeyword = new Array(
									new Array("»úÆ±Ô¤¶¨","http://travel.elong.com/flights/default.aspx"),
									new Array("»úÆ±Ô¤¶©","http://travel.elong.com/flights/default.aspx"),
									new Array("¾ÆµêÔ¤¶©","http://travel.elong.com/hotels/Default.aspx"),
									new Array("¾ÆµêÔ¤¶¨","http://travel.elong.com/hotels/Default.aspx")
									);
	t = document.selection.createRange();
	if(document.selection.type == 'Text')
	{
		for(i = 0; i < arrkeyword.length; i++)
		{
				if(t.text == arrkeyword[i][0])
				{
						document.selection.empty();
						opennewdictwin(arrkeyword[i][0],arrkeyword[i][1],memberId);
				}
		}
	}
	//document.selection.empty();
	//opennewdictwin(t.text);
}
function trimtext(text)
{
	while (text.substr(text.length-1,1)==' ') 
		text=text.substr(0,text.length-1)
	while (text.substr(0,1)==' ') 
		text=text.substr(1)	
	return text
}
function opennewdictwin(text,strurl,para) 
{
	if (text > '') 
	{
		var newwin = window.open(strurl + '?Campaign_ID=' + para, 'dictionary', 'width=700,height=500,resizable=yes,menubar=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes,location=yes,personalbar=yes');
	}
}

document.onclick=dictionary //works for IE only. For NS add <body ondblclick="dictionary()">