context: function onTranslatePopup(){	// Get the selected text	var focusedWindow = document.commandDispatcher.focusedWindow;	var selection = focusedWindow.__proto__.getSelection.call(focusedWindow);          // if the selected text is blank then don't display the context menu, otherwise, display the first 14 characters + ...    if (selection!="")    {    	//text selected so display the context menu    	var selectedText = selection.toString()        if (selectedText.length > 15)  // crop selected text if necessary        {            selectedText = selectedText.substr(0,15) + "...";        }        var menuText;        var item;        var sep;   		item = document.getElementById("translate-context");            sep = document.getElementById("translateSeparator");                 sep.hidden = false;  //display separator        item.hidden = false; //display menu                        menuText = "Translate " + "\"" + selectedText + "\"";        item.setAttribute("label", menuText);                 }    else    {    	//no text selected so hide the context menu        item = document.getElementById("translate-context");        sep = document.getElementById("translateSeparator");                sep.hidden = true;        item.hidden = true;    }}
meta: 9817	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9817/92511fa4a281dc1b11c2960208b0078e716d4f82/translate.js/buggy/trunk/chrome/content/translate.js