//compressed with dojo shrink safe, http://alex.dojotoolkit.org/shrinksafe/, use mm-readable.js for modification!!!
/** * mm_menu 20MAR2002 Version 6.0 * Andy Finnell, March 2002 * Copyright (c) 2000-2002 Macromedia, Inc. * * based on menu.js * by gary smith, July 1997 * Copyright (c) 1997-1999 Netscape Communications Corp. * * Netscape grants you a royalty free license to use or modify this * software provided that this copyright notice appears on all copies. * This software is provided "AS IS," without a warranty of any kind. */ 
var w=200,h=400,cw=w/2,ch=h/2,GABcw=w/2,GABch=h/2;if(window.screen){w=530;h=400;cw=Math.floor((screen.availWidth-w)/2);ch=Math.floor((screen.availHeight-h)/2);w=715;h=650;GABcw=Math.floor((screen.availWidth-w)/2);GABch=Math.floor((screen.availHeight-h)/2);}function openChaGAB(_1,_2,_3){window.open("/challenges/interactive/?fileName=xml/"+_1+".xml&courseID="+_2+"&anchor="+_3,"LongmanInteractive","scrollbars=no,width=715,height=650,top="+GABch+",left="+GABcw);}function openOppsGAB(_4,_5,_6){window.open("/newopportunities/interactive/?fileName=xml/"+_4+".xml&courseID="+_5+"&anchor="+_6,"LongmanInteractive","scrollbars=no,width=715,height=650,top="+GABch+",left="+GABcw);}function openGAB(_7,_8,_9){window.open("/interactive/?fileName=xml/"+_7+".xml&courseID="+_8+"&anchor="+_9,"LongmanInteractive","scrollbars=no,width=715,height=650,top="+GABch+",left="+GABcw);}function openEC(_a,_b,_c){window.open("/dictionaries/examcoach/?fileName=xml/"+_a+".xml&courseID="+_b+"&anchor="+_c,"LongmanInteractive","scrollbars=no,width=715,height=615,top="+GABch+",left="+GABcw);}function openLEA(_d,_e,_f){window.open("/dictionaries/examcoach/lea.html?fileName=xml/"+_d+".xml&courseID="+_e+"&anchor="+_f,"LongmanInteractive","scrollbars=no,width=715,height=615,top="+GABch+",left="+GABcw);}function openGTMail(){URL="/scripts/email_a_friend_gt.asp";URL=URL+"?page="+document.location;window.open(URL,"email_a_friend","scrollbars=yes,resizable=yes,width=360,height=425");}function go(_10){var _11;var _12=_10[_10.selectedIndex].value;if(_12=="#"){return;}_11=window.open(_12,"doPop","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=150,height=150");_11.focus();}function URLDecode(_13){var _14="0123456789ABCDEFabcdef";var _15="";var i=0;while(i<_13.length){var ch=_13.charAt(i);if(ch=="+"){_15+=" ";i++;}else{if(ch=="%"){if(i<(_13.length-2)&&_14.indexOf(_13.charAt(i+1))!=-1&&_14.indexOf(_13.charAt(i+2))!=-1){_15+=unescape(_13.substr(i,3));i+=3;}else{alert("Bad escape combination near ..."+_13.substr(i));_15+="%[ERROR]";i++;}}else{_15+=ch;i++;}}}return _15;}function getQueryVariable(_18){var _19=window.location.search.substring(1);var _1a=_19.split("&");for(var i=0;i<_1a.length;i++){var _1c=_1a[i].split("=");if(_1c[0]==_18){return _1c[1];}}return ("");}function AS_openBrWindow(_1d,_1e,_1f){window.open(_1d,_1e,"scrollbars=no,"+_1f+",top="+ch+",left="+cw);}function MM_openBrWindow(_20,_21,_22){window.open(_20,_21,_22);}if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}this.DETECT_KEY=_b?_b:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(c){this.addParam("bgcolor",c);}var q=_8?_8:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",_7);this.setAttribute("doExpressInstall",false);var _d=(_9)?_9:window.location;this.setAttribute("xiRedirectUrl",_d);this.setAttribute("redirectUrl","");if(_a){this.setAttribute("redirectUrl",_a);}};deconcept.SWFObject.prototype={setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16.push(key+"="+_18[key]);}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}return _23;};deconcept.PlayerVersion=function(_27){this.major=_27[0]!=null?parseInt(_27[0]):0;this.minor=_27[1]!=null?parseInt(_27[1]):0;this.rev=_27[2]!=null?parseInt(_27[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_29){var q=document.location.search||document.location.hash;if(q){var _2b=q.substring(1).split("&");for(var i=0;i<_2b.length;i++){if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){return _2b[i].substring((_2b[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}var _2d=document.getElementsByTagName("OBJECT");for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};if(typeof window.onunload=="function"){var _30=window.onunload;window.onunload=function(){deconcept.SWFObjectUtil.cleanupSWFs();_30();};}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};if(typeof window.onbeforeunload=="function"){var oldBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){deconcept.SWFObjectUtil.prepUnload();oldBeforeUnload();};}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}if(Array.prototype.push==null){Array.prototype.push=function(_31){this[this.length]=_31;return this.length;};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function MM_CheckFlashVersion(_54,msg){with(navigator){var _56=(appVersion.indexOf("MSIE")!=-1&&userAgent.indexOf("Opera")==-1);var _57=(appVersion.toLowerCase().indexOf("win")!=-1);if(!_56||!_57){var _58=-1;if(plugins&&plugins.length>0){var _59=plugins["Shockwave Flash"]?plugins["Shockwave Flash"].description:"";_59=plugins["Shockwave Flash 2.0"]?plugins["Shockwave Flash 2.0"].description:_59;if(_59==""){_58=-1;}else{var _5a=_59.split(" ");var _5b=_5a[2].split(".");var _5c=_5b[0];var _5d=(_5a[3]!="")?_5a[3].split("r"):_5a[4].split("r");var _5e=(_5d[1]>0)?_5d[1]:0;_58=parseFloat(_5c+"."+_5e);}}else{if(userAgent.toLowerCase().indexOf("webtv")!=-1){_58=4;}}var _5f=_54.split(",");var _60=parseFloat(_5f[0]+"."+_5f[2]);if(_58<_60){if(confirm(msg)){window.location="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";}}}}}function mmLoadMenus(){if(window.mm_menu_0627095538_0){return;}window.mm_menu_0627095538_0=new Menu("root",76,16,"Tahoma, Trebuchet MS, Arial",10,"#000066","#333333","#95B9FF","#CCCCCC","center","middle",3,0,1000,-5,7,true,false,true,0,true,true);mm_menu_0627095538_0.addMenuItem("UK&nbsp;Jobs","location='http://www.longman.com/ukjobs.html'");mm_menu_0627095538_0.hideOnMouseOut=true;mm_menu_0627095538_0.bgColor="#555555";mm_menu_0627095538_0.menuBorder=1;mm_menu_0627095538_0.menuLiteBgColor="#FFFFFF";mm_menu_0627095538_0.menuBorderBgColor="#FFFFFF";mm_menu_0627095538_0.writeMenus();}function mmLoadMenusCE(){if(window.mm_menu_0628122141_0){return;}window.mm_menu_0628122141_0=new Menu("root",78,17,"Arial, Helvetica, sans-serif",11,"#FF6600","#FFFFFF","#FFFFCC","#FFCB8B","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);mm_menu_0628122141_0.addMenuItem("UK&nbsp;Jobs","location='http://www.longman.com/ukjobs.html'");mm_menu_0628122141_0.hideOnMouseOut=true;mm_menu_0628122141_0.bgColor="#555555";mm_menu_0628122141_0.menuBorder=1;mm_menu_0628122141_0.menuLiteBgColor="#FFFFFF";mm_menu_0628122141_0.menuBorderBgColor="#777777";mm_menu_0628122141_0.writeMenus();}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p){d.MM_p=new Array();}var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}}function doClock(){var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";var _64=new Array("January","Jan","February","Feb","March","Mar","April","Apr","May","May","June","Jun","July","Jul","August","Aug","September","Sep","October","Oct","November","Nov","December","Dec");var _65=new Array("Sunday","Sun","Monday","Mon","Tuesday","Tue","Wednesday","Wed","Thursday","Thr","Friday","Fri","Saturday","Sat");for(i=0;i<a.length;i++){a1=a[i].charAt(1);switch(a[i].charAt(0)){case "M":if((Number(a1)==3)&&((t.getMonth()+1)<10)){str+="0";}str+=(Number(a1)>1)?t.getMonth()+1:_64[t.getMonth()*2+Number(a1)];break;case "D":if((Number(a1)==1)&&(t.getDate()<10)){str+="0";}str+=t.getDate();break;case "Y":str+=(a1=="0")?t.getFullYear():t.getFullYear().toString().substring(2);break;case "W":str+=_65[t.getDay()*2+Number(a1)];break;default:str+=unescape(a[i]);}}return str;}function MM_displayStatusMsg(_66){status=_66;document.MM_returnValue=true;}function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc;}}function MM_findObj(n,d){var p,i,x;if(!d){d=document;}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all){x=d.all[n];}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document);}if(!x&&d.getElementById){x=d.getElementById(n);}return x;}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src;}x.src=a[i+2];}}}function Menu(_6c,mw,mh,fnt,fs,_71,_72,bg,bgh,_75,_76,pad,_78,to,sx,sy,_7c,opq,_7e,idt,aw,ah){this.version="020320 [Menu; mm_menu.js]";this.type="Menu";this.menuWidth=mw;this.menuItemHeight=mh;this.fontSize=fs;this.fontWeight="plain";this.fontFamily=fnt;this.fontColor=_71;this.fontColorHilite=_72;this.bgColor="#555555";this.menuBorder=1;this.menuBgOpaque=opq;this.menuItemBorder=1;this.menuItemIndent=idt;this.menuItemBgColor=bg;this.menuItemVAlign=_76;this.menuItemHAlign=_75;this.menuItemPadding=pad;this.menuItemSpacing=_78;this.menuLiteBgColor="#ffffff";this.menuBorderBgColor="#777777";this.menuHiliteBgColor=bgh;this.menuContainerBgColor="#cccccc";this.childMenuIcon="arrows.gif";this.submenuXOffset=sx;this.submenuYOffset=sy;this.submenuRelativeToItem=_7c;this.vertical=_7e;this.items=new Array();this.actions=new Array();this.childMenus=new Array();this.hideOnMouseOut=true;this.hideTimeout=to;this.addMenuItem=addMenuItem;this.writeMenus=writeMenus;this.MM_showMenu=MM_showMenu;this.onMenuItemOver=onMenuItemOver;this.onMenuItemAction=onMenuItemAction;this.hideMenu=hideMenu;this.hideChildMenu=hideChildMenu;if(!window.menus){window.menus=new Array();}this.label=" "+_6c;window.menus[this.label]=this;window.menus[window.menus.length]=this;if(!window.activeMenus){window.activeMenus=new Array();}}function addMenuItem(_82,_83){this.items[this.items.length]=_82;this.actions[this.actions.length]=_83;}function FIND(_84){if(window.mmIsOpera){return (document.getElementById(_84));}if(document.all){return (document.all[_84]);}if(document.getElementById){return (document.getElementById(_84));}return (false);}function writeMenus(_85){if(window.triedToWriteMenus){return;}var agt=navigator.userAgent.toLowerCase();window.mmIsOpera=agt.indexOf("opera")!=-1;if(!_85&&document.layers){window.delayWriteMenus=this.writeMenus;var _87=setTimeout("delayWriteMenus()",500);_85=new Layer(100);clearTimeout(_87);}else{if(document.all||document.hasChildNodes||window.mmIsOpera){document.writeln("<span id=\"menuContainer\"></span>");_85=FIND("menuContainer");}}window.mmHideMenuTimer=null;if(!_85){return;}window.triedToWriteMenus=true;_85.isContainer=true;_85.menus=new Array();for(var i=0;i<window.menus.length;i++){_85.menus[i]=window.menus[i];}window.menus.length=0;var _89=0;var _8a=0;var top=0;var _8c="";var lrs=false;var _8e="";var tsc=0;if(document.layers){lrs=true;}for(var i=0;i<_85.menus.length;i++,_89++){var _91=_85.menus[i];if(_91.bgImageUp||!_91.menuBgOpaque){_91.menuBorder=0;_91.menuItemBorder=0;}if(lrs){var _92=new Layer(100,_85);var _93=new Layer(100,_92);_93.top=_91.menuBorder;_93.left=_91.menuBorder;var _94=new Layer(100,_93);_94.top=_91.menuBorder;_94.left=_91.menuBorder;}else{_8c+=""+"<div id=\"menuLayer"+_89+"\" style=\"position:absolute;z-index:1;left:10px;top:"+(i*100)+"px;visibility:hidden;color:"+_91.menuBorderBgColor+";\">\n"+"  <div id=\"menuLite"+_89+"\" style=\"position:absolute;z-index:1;left:"+_91.menuBorder+"px;top:"+_91.menuBorder+"px;visibility:hide;\" onmouseout=\"mouseoutMenu();\">\n"+"\t <div id=\"menuFg"+_89+"\" style=\"position:absolute;left:"+_91.menuBorder+"px;top:"+_91.menuBorder+"px;visibility:hide;\">\n"+"";}var x=i;for(var i=0;i<_91.items.length;i++){var _97=_91.items[i];var _98=false;var _99=_91.fontSize+2*_91.menuItemPadding;if(_97.label){_97=_97.label;_98=true;}_91.menuItemHeight=_91.menuItemHeight||_99;var _9a="";if(_91.fontFamily!=""){_9a+="font-family:"+_91.fontFamily+";";}_9a+="font-weight:"+_91.fontWeight+";fontSize:"+_91.fontSize+"px;";if(_91.fontStyle){_9a+="font-style:"+_91.fontStyle+";";}if(document.all||window.mmIsOpera){_9a+="font-size:"+_91.fontSize+"px;\" onmouseover=\"onMenuItemOver(null,this);\" onclick=\"onMenuItemAction(null,this);";}else{if(!document.layers){_9a+="font-size:"+_91.fontSize+"px;cursor:pointer";}}var l;if(lrs){var lw=_91.menuWidth;if(_91.menuItemHAlign=="right"){lw-=_91.menuItemPadding;}l=new Layer(lw,_94);}var _9d=0;var _9e=i*_91.menuItemHeight;if(!_91.vertical){_9d=i*_91.menuWidth;_9e=0;}var _9f="<div id=\"menuItem"+_8a+"\" style=\"position:absolute;left:"+_9d+"px;top:"+_9e+"px;"+_9a+"\">";var _a0="</div>";if(_91.bgImageUp){_9f="<div id=\"menuItem"+_8a+"\" style=\"background:url("+_91.bgImageUp+");position:absolute;left:"+_9d+"px;top:"+_9e+"px;"+_9a+"\">";}var _a1=0,top=0,right=0,bottom=0;_a1=1+_91.menuItemPadding+_91.menuItemIndent;right=_a1+_91.menuWidth-2*_91.menuItemPadding-_91.menuItemIndent;if(_91.menuItemVAlign=="top"){top=_91.menuItemPadding;}if(_91.menuItemVAlign=="bottom"){top=_91.menuItemHeight-_91.fontSize-1-_91.menuItemPadding;}if(_91.menuItemVAlign=="middle"){top=((_91.menuItemHeight/2)-(_91.fontSize/2)-1);}bottom=_91.menuItemHeight-2*_91.menuItemPadding;var _a2="position:absolute;left:"+_a1+"px;top:"+top+"px;";if(lrs){_a2+=_9a+"right:"+right+";bottom:"+bottom+";";_9f="";_a0="";}if(document.all&&!window.mmIsOpera){_97="<div align=\""+_91.menuItemHAlign+"\">"+_97+"</div>";}else{if(lrs){_97="<div style=\"text-align:"+_91.menuItemHAlign+";\">"+_97+"</div>";}else{var _a3=null;if(_91.menuItemHAlign!="left"){if(window.mmIsOpera){var _a4=_91.menuItemHAlign=="center"?-(_91.menuWidth-2*_91.menuItemPadding):(_91.menuWidth-6*_91.menuItemPadding);_a3="<div id=\"menuItemHilite"+_8a+"Shim\" style=\"position:absolute;top:1px;left:"+_91.menuItemPadding+"px;width:"+_a4+"px;text-align:"+_91.menuItemHAlign+";visibility:visible;\">"+_97+"</div>";_97="<div id=\"menuItemText"+_8a+"Shim\" style=\"position:absolute;top:1px;left:"+_91.menuItemPadding+"px;width:"+_a4+"px;text-align:"+_91.menuItemHAlign+";visibility:visible;\">"+_97+"</div>";}else{_a3="<div id=\"menuItemHilite"+_8a+"Shim\" style=\"position:absolute;top:1px;left:1px;right:-"+(_a1+_91.menuWidth-3*_91.menuItemPadding)+"px;text-align:"+_91.menuItemHAlign+";visibility:visible;\">"+_97+"</div>";_97="<div id=\"menuItemText"+_8a+"Shim\" style=\"position:absolute;top:1px;left:1px;right:-"+(_a1+_91.menuWidth-3*_91.menuItemPadding)+"px;text-align:"+_91.menuItemHAlign+";visibility:visible;\">"+_97+"</div>";}}else{_a3=null;}}}if(document.all&&!window.mmIsOpera){_97="<div id=\"menuItemShim"+_8a+"\" style=\"position:absolute;left:0px;top:0px;\">"+_97+"</div>";}var _a5="<div id=\"menuItemText"+_8a+"\" style=\""+_a2+"color:"+_91.fontColor+";\">"+_97+"&nbsp</div>\n"+"<div id=\"menuItemHilite"+_8a+"\" style=\""+_a2+"color:"+_91.fontColorHilite+";visibility:hidden;\">"+(_a3||_97)+"&nbsp</div>";if(_98){_8c+=(_9f+_a5+"<div id=\"childMenu"+_8a+"\" style=\"position:absolute;left:0px;top:3px;\"><img src=\""+_91.childMenuIcon+"\"></div>\n"+_a0);}else{_8c+=(_9f+_a5+_a0);}if(lrs){l.document.open("text/html");l.document.writeln(_8c);l.document.close();_8c="";_8e+="-";tsc++;if(tsc>50){tsc=0;_8e="";}status=_8e;}_8a++;}if(lrs){var _a6=new Layer(100,_94);_a6.visiblity="hidden";_a6.document.open("text/html");_a6.document.writeln("&nbsp;");_a6.document.close();}else{_8c+="\t  <div id=\"focusItem"+_89+"\" style=\"position:absolute;left:0px;top:0px;visibility:hide;\" onclick=\"onMenuItemAction(null,this);\">&nbsp;</div>\n";_8c+="   </div>\n  </div>\n</div>\n";}i=x;}if(document.layers){_85.clip.width=window.innerWidth;_85.clip.height=window.innerHeight;_85.onmouseout=mouseoutMenu;_85.menuContainerBgColor=this.menuContainerBgColor;for(var i=0;i<_85.document.layers.length;i++){proto=_85.menus[i];var _a8=_85.document.layers[i];_85.menus[i].menuLayer=_a8;_85.menus[i].menuLayer.Menu=_85.menus[i];_85.menus[i].menuLayer.Menu.container=_85;var _a9=_a8.document.layers[0].document.layers[0];_a9.clip.width=proto.menuWidth||_a9.clip.width;_a9.clip.height=proto.menuHeight||_a9.clip.height;for(var n=0;n<_a9.document.layers.length-1;n++){var l=_a9.document.layers[n];l.Menu=_85.menus[i];l.menuHiliteBgColor=proto.menuHiliteBgColor;l.document.bgColor=proto.menuItemBgColor;l.saveColor=proto.menuItemBgColor;l.onmouseover=proto.onMenuItemOver;l.onclick=proto.onMenuItemAction;l.mmaction=_85.menus[i].actions[n];l.focusItem=_a9.document.layers[_a9.document.layers.length-1];l.clip.width=proto.menuWidth||_a9.clip.width;l.clip.height=proto.menuItemHeight||l.clip.height;if(n>0){if(l.Menu.vertical){l.top=_a9.document.layers[n-1].top+_a9.document.layers[n-1].clip.height+proto.menuItemBorder+proto.menuItemSpacing;}else{l.left=_a9.document.layers[n-1].left+_a9.document.layers[n-1].clip.width+proto.menuItemBorder+proto.menuItemSpacing;}}l.hilite=l.document.layers[1];if(proto.bgImageUp){l.background.src=proto.bgImageUp;}l.document.layers[1].isHilite=true;if(l.document.layers.length>2){l.childMenu=_85.menus[i].items[n].menuLayer;l.document.layers[2].left=l.clip.width-13;l.document.layers[2].top=(l.clip.height/2)-4;l.document.layers[2].clip.left+=3;l.Menu.childMenus[l.Menu.childMenus.length]=l.childMenu;}}if(proto.menuBgOpaque){_a9.document.bgColor=proto.bgColor;}if(proto.vertical){_a9.clip.width=l.clip.width+proto.menuBorder;_a9.clip.height=l.top+l.clip.height+proto.menuBorder;}else{_a9.clip.height=l.clip.height+proto.menuBorder;_a9.clip.width=l.left+l.clip.width+proto.menuBorder;if(_a9.clip.width>window.innerWidth){_a9.clip.width=window.innerWidth;}}var _ac=_a9.document.layers[n];_ac.clip.width=_a9.clip.width;_ac.Menu=l.Menu;_ac.top=-30;_ac.captureEvents(Event.MOUSEDOWN);_ac.onmousedown=onMenuItemDown;if(proto.menuBgOpaque){_a8.document.bgColor=proto.menuBorderBgColor;}var _ad=_a8.document.layers[0];if(proto.menuBgOpaque){_ad.document.bgColor=proto.menuLiteBgColor;}_ad.clip.width=_a9.clip.width+1;_ad.clip.height=_a9.clip.height+1;_a8.clip.width=_a9.clip.width+(proto.menuBorder*3);_a8.clip.height=_a9.clip.height+(proto.menuBorder*3);}}else{if((!document.all)&&(_85.hasChildNodes)&&!window.mmIsOpera){_85.innerHTML=_8c;}else{_85.document.open("text/html");_85.document.writeln(_8c);_85.document.close();}if(!FIND("menuLayer0")){return;}var _ae=0;for(var x=0;x<_85.menus.length;x++){var _b0=FIND("menuLayer"+x);_85.menus[x].menuLayer="menuLayer"+x;_b0.Menu=_85.menus[x];_b0.Menu.container="menuLayer"+x;_b0.style.zindex=1;var s=_b0.style;s.pixeltop=-300;s.pixelleft=-300;s.top="-300px";s.left="-300px";var _b2=_85.menus[x];_b2.menuItemWidth=_b2.menuWidth||_b2.menuIEWidth||140;if(_b2.menuBgOpaque){_b0.style.backgroundColor=_b2.menuBorderBgColor;}var top=0;var _b4=0;_b2.menuItemLayers=new Array();for(var i=0;i<_85.menus[x].items.length;i++){var l=FIND("menuItem"+_ae);l.Menu=_85.menus[x];l.Menu.menuItemLayers[l.Menu.menuItemLayers.length]=l;if(l.addEventListener||window.mmIsOpera){l.style.width=_b2.menuItemWidth+"px";l.style.height=_b2.menuItemHeight+"px";l.style.pixelWidth=_b2.menuItemWidth;l.style.pixelHeight=_b2.menuItemHeight;l.style.top=top+"px";l.style.left=_b4+"px";if(l.addEventListener){l.addEventListener("mouseover",onMenuItemOver,false);l.addEventListener("click",onMenuItemAction,false);l.addEventListener("mouseout",mouseoutMenu,false);}if(_b2.menuItemHAlign!="left"){l.hiliteShim=FIND("menuItemHilite"+_ae+"Shim");l.hiliteShim.style.visibility="inherit";l.textShim=FIND("menuItemText"+_ae+"Shim");l.hiliteShim.style.pixelWidth=_b2.menuItemWidth-2*_b2.menuItemPadding-_b2.menuItemIndent;l.hiliteShim.style.width=l.hiliteShim.style.pixelWidth;l.textShim.style.pixelWidth=_b2.menuItemWidth-2*_b2.menuItemPadding-_b2.menuItemIndent;l.textShim.style.width=l.textShim.style.pixelWidth;}}else{l.style.pixelWidth=_b2.menuItemWidth;l.style.pixelHeight=_b2.menuItemHeight;l.style.pixelTop=top;l.style.pixelLeft=_b4;if(_b2.menuItemHAlign!="left"){var _b7=FIND("menuItemShim"+_ae);_b7[0].style.pixelWidth=_b2.menuItemWidth-2*_b2.menuItemPadding-_b2.menuItemIndent;_b7[1].style.pixelWidth=_b2.menuItemWidth-2*_b2.menuItemPadding-_b2.menuItemIndent;_b7[0].style.width=_b7[0].style.pixelWidth+"px";_b7[1].style.width=_b7[1].style.pixelWidth+"px";}}if(_b2.vertical){top=top+_b2.menuItemHeight+_b2.menuItemBorder+_b2.menuItemSpacing;}else{_b4=_b4+_b2.menuItemWidth+_b2.menuItemBorder+_b2.menuItemSpacing;}l.style.fontSize=_b2.fontSize+"px";l.style.backgroundColor=_b2.menuItemBgColor;l.style.visibility="inherit";l.saveColor=_b2.menuItemBgColor;l.menuHiliteBgColor=_b2.menuHiliteBgColor;l.mmaction=_85.menus[x].actions[i];l.hilite=FIND("menuItemHilite"+_ae);l.focusItem=FIND("focusItem"+x);l.focusItem.style.pixelTop=-30;l.focusItem.style.top="-30px";var _b8=FIND("childMenu"+_ae);if(_b8){l.childMenu=_85.menus[x].items[i].menuLayer;_b8.style.pixelLeft=_b2.menuItemWidth-11;_b8.style.left=_b8.style.pixelLeft+"px";_b8.style.pixelTop=(_b2.menuItemHeight/2)-4;_b8.style.top=_b8.style.pixelTop+"px";l.Menu.childMenus[l.Menu.childMenus.length]=l.childMenu;}l.style.cursor="hand";_ae++;}if(_b2.vertical){_b2.menuHeight=top-1-_b2.menuItemSpacing;_b2.menuWidth=_b2.menuItemWidth;}else{_b2.menuHeight=_b2.menuItemHeight;_b2.menuWidth=_b4-1-_b2.menuItemSpacing;}var _b9=FIND("menuLite"+x);var s=_b9.style;s.pixelHeight=_b2.menuHeight+(_b2.menuBorder*2);s.height=s.pixelHeight+"px";s.pixelWidth=_b2.menuWidth+(_b2.menuBorder*2);s.width=s.pixelWidth+"px";if(_b2.menuBgOpaque){s.backgroundColor=_b2.menuLiteBgColor;}var _bb=FIND("menuFg"+x);s=_bb.style;s.pixelHeight=_b2.menuHeight+_b2.menuBorder;s.height=s.pixelHeight+"px";s.pixelWidth=_b2.menuWidth+_b2.menuBorder;s.width=s.pixelWidth+"px";if(_b2.menuBgOpaque){s.backgroundColor=_b2.bgColor;}s=_b0.style;s.pixelWidth=_b2.menuWidth+(_b2.menuBorder*4);s.width=s.pixelWidth+"px";s.pixelHeight=_b2.menuHeight+(_b2.menuBorder*4);s.height=s.pixelHeight+"px";}}if(document.captureEvents){document.captureEvents(Event.MOUSEUP);}if(document.addEventListener){document.addEventListener("mouseup",onMenuItemOver,false);}if(document.layers&&window.innerWidth){window.onresize=NS4resize;window.NS4sIW=window.innerWidth;window.NS4sIH=window.innerHeight;setTimeout("NS4resize()",500);}document.onmouseup=mouseupMenu;window.mmWroteMenu=true;status="";}function NS4resize(){if(NS4sIW!=window.innerWidth||NS4sIH!=window.innerHeight){window.location.reload();}}function onMenuItemOver(e,l){MM_clearTimeout();l=l||this;a=window.ActiveMenuItem;if(document.layers){if(a){a.document.bgColor=a.saveColor;if(a.hilite){a.hilite.visibility="hidden";}if(a.Menu.bgImageOver){a.background.src=a.Menu.bgImageUp;}a.focusItem.top=-100;a.clicked=false;}if(l.hilite){l.document.bgColor=l.menuHiliteBgColor;l.zIndex=1;l.hilite.visibility="inherit";l.hilite.zIndex=2;l.document.layers[1].zIndex=1;l.focusItem.zIndex=this.zIndex+2;}if(l.Menu.bgImageOver){l.background.src=l.Menu.bgImageOver;}l.focusItem.top=this.top;l.focusItem.left=this.left;l.focusItem.clip.width=l.clip.width;l.focusItem.clip.height=l.clip.height;l.Menu.hideChildMenu(l);}else{if(l.style&&l.Menu){if(a){a.style.backgroundColor=a.saveColor;if(a.hilite){a.hilite.style.visibility="hidden";}if(a.hiliteShim){a.hiliteShim.style.visibility="inherit";}if(a.Menu.bgImageUp){a.style.background="url("+a.Menu.bgImageUp+")";}}l.style.backgroundColor=l.menuHiliteBgColor;l.zIndex=1;if(l.Menu.bgImageOver){l.style.background="url("+l.Menu.bgImageOver+")";}if(l.hilite){l.hilite.style.visibility="inherit";if(l.hiliteShim){l.hiliteShim.style.visibility="visible";}}l.focusItem.style.pixelTop=l.style.pixelTop;l.focusItem.style.top=l.focusItem.style.pixelTop+"px";l.focusItem.style.pixelLeft=l.style.pixelLeft;l.focusItem.style.left=l.focusItem.style.pixelLeft+"px";l.focusItem.style.zIndex=l.zIndex+1;l.Menu.hideChildMenu(l);}else{return;}}window.ActiveMenuItem=l;}function onMenuItemAction(e,l){l=window.ActiveMenuItem;if(!l){return;}hideActiveMenus();if(l.mmaction){eval(""+l.mmaction);}window.ActiveMenuItem=0;}function MM_clearTimeout(){if(mmHideMenuTimer){clearTimeout(mmHideMenuTimer);}mmHideMenuTimer=null;mmDHFlag=false;}function MM_startTimeout(){if(window.ActiveMenu){mmStart=new Date();mmDHFlag=true;mmHideMenuTimer=setTimeout("mmDoHide()",window.ActiveMenu.Menu.hideTimeout);}}function mmDoHide(){if(!mmDHFlag||!window.ActiveMenu){return;}var _c0=new Date()-mmStart;var _c1=window.ActiveMenu.Menu.hideTimeout;if(_c0<_c1){mmHideMenuTimer=setTimeout("mmDoHide()",_c1+100-_c0);return;}mmDHFlag=false;hideActiveMenus();window.ActiveMenuItem=0;}function MM_showMenu(_c2,x,y,_c5,_c6){if(!window.mmWroteMenu){return;}MM_clearTimeout();if(_c2){var obj=FIND(_c6)||document.images[_c6]||document.links[_c6]||document.anchors[_c6];x=moveXbySlicePos(x,obj);y=moveYbySlicePos(y,obj);}if(document.layers){if(_c2){var l=_c2.menuLayer||_c2;l.top=l.left=1;hideActiveMenus();if(this.visibility){l=this;}window.ActiveMenu=l;}else{var l=_c5;}if(!l){return;}for(var i=0;i<l.layers.length;i++){if(!l.layers[i].isHilite){l.layers[i].visibility="inherit";}if(l.layers[i].document.layers.length>0){MM_showMenu(null,"relative","relative",l.layers[i]);}}if(l.parentLayer){if(x!="relative"){l.parentLayer.left=x||window.pageX||0;}if(l.parentLayer.left+l.clip.width>window.innerWidth){l.parentLayer.left-=(l.parentLayer.left+l.clip.width-window.innerWidth);}if(y!="relative"){l.parentLayer.top=y||window.pageY||0;}if(l.parentLayer.isContainer){l.Menu.xOffset=window.pageXOffset;l.Menu.yOffset=window.pageYOffset;l.parentLayer.clip.width=window.ActiveMenu.clip.width+2;l.parentLayer.clip.height=window.ActiveMenu.clip.height+2;if(l.parentLayer.menuContainerBgColor&&l.Menu.menuBgOpaque){l.parentLayer.document.bgColor=l.parentLayer.menuContainerBgColor;}}}l.visibility="inherit";if(l.Menu){l.Menu.container.visibility="inherit";}}else{if(FIND("menuItem0")){var l=_c2.menuLayer||_c2;hideActiveMenus();if(typeof (l)=="string"){l=FIND(l);}window.ActiveMenu=l;var s=l.style;s.visibility="inherit";if(x!="relative"){s.pixelLeft=x||(window.pageX+document.body.scrollLeft)||0;s.left=s.pixelLeft+"px";}if(y!="relative"){s.pixelTop=y||(window.pageY+document.body.scrollTop)||0;s.top=s.pixelTop+"px";}l.Menu.xOffset=document.body.scrollLeft;l.Menu.yOffset=document.body.scrollTop;}}if(_c2){window.activeMenus[window.activeMenus.length]=l;}MM_clearTimeout();}function onMenuItemDown(e,l){var a=window.ActiveMenuItem;if(document.layers&&a){a.eX=e.pageX;a.eY=e.pageY;a.clicked=true;}}function mouseupMenu(e){hideMenu(true,e);hideActiveMenus();return true;}function getExplorerVersion(){var _d1=parseFloat(navigator.appVersion);if(navigator.appName!="Microsoft Internet Explorer"){return _d1;}var _d2=navigator.appVersion;var i=_d2.indexOf("MSIE ");if(i>=0){_d2=_d2.substring(i+5);_d1=parseFloat(_d2);}return _d1;}function mouseoutMenu(){if((navigator.appName=="Microsoft Internet Explorer")&&(getExplorerVersion()<4.5)){return true;}hideMenu(false,false);return true;}function hideMenu(_d4,e){var a=window.ActiveMenuItem;if(a&&document.layers){a.document.bgColor=a.saveColor;a.focusItem.top=-30;if(a.hilite){a.hilite.visibility="hidden";}if(_d4&&a.mmaction&&a.clicked&&window.ActiveMenu){if(a.eX<=e.pageX+15&&a.eX>=e.pageX-15&&a.eY<=e.pageY+10&&a.eY>=e.pageY-10){setTimeout("window.ActiveMenu.Menu.onMenuItemAction();",500);}}a.clicked=false;if(a.Menu.bgImageOver){a.background.src=a.Menu.bgImageUp;}}else{if(window.ActiveMenu&&FIND("menuItem0")){if(a){a.style.backgroundColor=a.saveColor;if(a.hilite){a.hilite.style.visibility="hidden";}if(a.hiliteShim){a.hiliteShim.style.visibility="inherit";}if(a.Menu.bgImageUp){a.style.background="url("+a.Menu.bgImageUp+")";}}}}if(!_d4&&window.ActiveMenu){if(window.ActiveMenu.Menu){if(window.ActiveMenu.Menu.hideOnMouseOut){MM_startTimeout();}return (true);}}return (true);}function hideChildMenu(_d7){MM_clearTimeout();var l=_d7;for(var i=0;i<l.Menu.childMenus.length;i++){var _da=l.Menu.childMenus[i];if(document.layers){_da.visibility="hidden";}else{_da=FIND(_da);_da.style.visibility="hidden";if(_da.Menu.menuItemHAlign!="left"){for(var j=0;j<_da.Menu.menuItemLayers.length;j++){var _dc=_da.Menu.menuItemLayers[j];if(_dc.textShim){_dc.textShim.style.visibility="inherit";}}}}_da.Menu.hideChildMenu(_da);}if(l.childMenu){var _dd=l.childMenu;if(document.layers){l.Menu.MM_showMenu(null,null,null,_dd.layers[0]);_dd.zIndex=l.parentLayer.zIndex+1;_dd.top=l.Menu.menuLayer.top+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){_dd.top+=l.top+l.parentLayer.top;}_dd.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}else{_dd.top+=l.top+l.parentLayer.top;if(l.Menu.submenuRelativeToItem){_dd.left=l.Menu.menuLayer.left+l.left+l.clip.width+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{_dd.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}}if(_dd.left<l.Menu.container.clip.left){l.Menu.container.clip.left=_dd.left;}var w=_dd.clip.width+_dd.left-l.Menu.container.clip.left;if(w>l.Menu.container.clip.width){l.Menu.container.clip.width=w;}var h=_dd.clip.height+_dd.top-l.Menu.container.clip.top;if(h>l.Menu.container.clip.height){l.Menu.container.clip.height=h;}l.document.layers[1].zIndex=0;_dd.visibility="inherit";}else{if(FIND("menuItem0")){_dd=FIND(l.childMenu);var _e0=FIND(l.Menu.menuLayer);var s=_dd.style;s.zIndex=_e0.style.zIndex+1;if(document.all||window.mmIsOpera){s.pixelTop=_e0.style.pixelTop+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){s.pixelTop+=l.style.pixelTop;}s.pixelLeft=l.style.pixelWidth+_e0.style.pixelLeft+l.Menu.submenuXOffset;s.left=s.pixelLeft+"px";}else{s.pixelTop+=l.style.pixelTop;if(l.Menu.submenuRelativeToItem){s.pixelLeft=_e0.style.pixelLeft+l.style.pixelLeft+l.style.pixelWidth+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{s.pixelLeft=(_e0.style.pixelWidth-4*l.Menu.menuBorder)+_e0.style.pixelLeft+l.Menu.submenuXOffset;}s.left=s.pixelLeft+"px";}}else{var top=parseInt(_e0.style.top)+l.Menu.submenuYOffset;var _e3=0;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){top+=parseInt(l.style.top);}_e3=(parseInt(_e0.style.width)-4*l.Menu.menuBorder)+parseInt(_e0.style.left)+l.Menu.submenuXOffset;}else{top+=parseInt(l.style.top);if(l.Menu.submenuRelativeToItem){_e3=parseInt(_e0.style.left)+parseInt(l.style.left)+parseInt(l.style.width)+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{_e3=(parseInt(_e0.style.width)-4*l.Menu.menuBorder)+parseInt(_e0.style.left)+l.Menu.submenuXOffset;}}s.top=top+"px";s.left=_e3+"px";}_dd.style.visibility="inherit";}else{return;}}window.activeMenus[window.activeMenus.length]=_dd;}}function hideActiveMenus(){if(!window.activeMenus){return;}for(var i=0;i<window.activeMenus.length;i++){if(!activeMenus[i]){continue;}if(activeMenus[i].visibility&&activeMenus[i].Menu&&!window.mmIsOpera){activeMenus[i].visibility="hidden";activeMenus[i].Menu.container.visibility="hidden";activeMenus[i].Menu.container.clip.left=0;}else{if(activeMenus[i].style){var s=activeMenus[i].style;s.visibility="hidden";s.left="-200px";s.top="-200px";}}}if(window.ActiveMenuItem){hideMenu(false,false);}window.activeMenus.length=0;}function moveXbySlicePos(x,img){if(!document.layers){var _e8=navigator.platform?navigator.platform=="Win32":false;var _e9=document.all&&!_e8&&getExplorerVersion()==4.5;var par=img;var _eb=0;while(par){if(par.leftMargin&&!_e8){x+=parseInt(par.leftMargin);}if((par.offsetLeft!=_eb)&&par.offsetLeft){x+=parseInt(par.offsetLeft);}if(par.offsetLeft!=0){_eb=par.offsetLeft;}par=_e9?par.parentElement:par.offsetParent;}}else{if(img.x){x+=img.x;}}return x;}function moveYbySlicePos(y,img){if(!document.layers){var _ee=navigator.platform?navigator.platform=="Win32":false;var _ef=document.all&&!_ee&&getExplorerVersion()==4.5;var par=img;var _f1=0;while(par){if(par.topMargin&&!_ee){y+=parseInt(par.topMargin);}if((par.offsetTop!=_f1)&&par.offsetTop){y+=parseInt(par.offsetTop);}if(par.offsetTop!=0){_f1=par.offsetTop;}par=_ef?par.parentElement:par.offsetParent;}}else{if(img.y>=0){y+=img.y;}}return y;}

//   vim:ft=javascript
//added by adr for double click functionality RFS 1182
var lwdtext = "";
var lwdviewerpop;
var timeid;
var sURL = document.location.href;
var idmUrl = 'http://pewebdic2.cw.idm.fr/display/wapopup.html';
// Dimensions of the dictionary popup
var iPopupWidth = 985;
var iPopupHeight = 600;

var browserName=navigator.appName; 
if (browserName=="Netscape")
{ 
	var nav4 = window.Event ? true : false;
	if (nav4) 
	{	
    		document.captureEvents(Event.DBLCLICK);
	}
}

document.ondblclick = lwdGetActiveText;

function asGetActive(e){
    var txt = '';
    var foundIn = '';
    if (window.getSelection)
    {
        txt = window.getSelection();
        foundIn = 'window.getSelection()';
    }
    else if (document.getSelection)
    {
        txt = document.getSelection();
        foundIn = 'document.getSelection()';
    }
    else if (document.selection)
    {
        txt = document.selection.createRange().text;
        foundIn = 'document.selection.createRange()';
    }
    else return;
    lwdtext = txt;

    if (lwdtext != null && lwdtext != "")
        lwdShowMain(idmUrl, lwdtext);
    
    return true;

}
// Called when double-clicking, displays the LDOCE popup
function lwdGetActiveText(e) { 
    asGetActive();
}

// Called from the LDOCE search forms 
function doSearch(lwdtext) {
    if (lwdtext != null && lwdtext != "")
        lwdShowMain(idmUrl, lwdtext);
}

function lwdShowMain(url, word) 
{
    var sURL = ''
    var sFeatures = 'dependent=no,z-lock=yes,titlebar=1,location=no,toolbar=yes,' +
        'directories=no,menubar=0,resizable=1,scrollbars=1,status=1,' +
        'width=' + iPopupWidth +',height=' + iPopupHeight;
    var winX = (screen.width/2-302);
    var winY = (screen.width/2-337);
    // Create centered window
    sFeatures +=  ",screenX=" + winX + ",left=" + winX + ",screenY=" + winY + ",top=" + winY ;
    // Put the search string in the URL, the form stuff won't work cross-domain
    // and does not significantly improve the security
    if (lwdviewerpop != null) {
        try    {
            lwdviewerpop.close();
        }
        catch (e) {}
        lwdviewerpop = null;

    }

    //    lwdviewerpop = window.open(url + "?search_str=" + word, 'ldoceonline', sFeatures);
    if (lwdviewerpop == null) {
        lwdviewerpop = window.open(url + "?search_str=" + word, 'ldoceonline', sFeatures);
    }

    //check if still null
    if (lwdviewerpop == null) {
        alert('We are sorry, popups seem to be disabled. Please enable popups and try again.') 
    }
    else {
        lwdviewerpop.focus();
    }
}

function addBookmark()
 {
 if (document.all)
 {
 if(window.external)
 {
 window.external.AddFavorite(window.location.href, document.title); 
 }
 }
 else if (window.sidebar)
 {
 window.sidebar.addPanel(document.title, location.href, "")
 }
 else if (window.opera && window.print) {
  return true; }
 else {
  alert("Sorry, your browser does not support this functionality. Please use your browsers' Help section for assistance.");
 }
 
 }
