window.onerror = null;
document.ondblclick = dict;
var dictvar;
var DictLang;
var dictionaryon = true;
var mytext = "<IFRAME id='lexicon' frameBorder='0'  width=520px height=375px style='width:100%;height:375px;overflow:scroll;background-color:white;'></IFRAME>";
	
dictpopup = new LightFace({
   width: 540,
   height: 380,
   fadeDelay: 100,
   draggable: true,
   title: 'Dictionary',
   content: mytext,
   buttons: [
      { title: 'Close', event: function() { this.close(); }, color: 'blue' }
     ],
   resetOnScroll: true
 }); 

function dict()
 { 
 	if (dictionaryon) {
	  text = document.getSelection();
	  if (text > ' ') {
	      $("lexicon").src = "dictionary.asp?dict=" + DictLang + "&w=" + text;
	      dictpopup.open();
	  };
	};
 }
