//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 openGAB(_1,_2,_3){window.open("/interactive/?fileName=xml/"+_1+".xml&courseID="+_2+"&anchor="+_3,"LongmanInteractive","scrollbars=no,width=715,height=650,top="+GABch+",left="+GABcw);}function openEC(_4,_5,_6){window.open("/dictionaries/examcoach/?fileName=xml/"+_4+".xml&courseID="+_5+"&anchor="+_6,"LongmanInteractive","scrollbars=no,width=715,height=615,top="+GABch+",left="+GABcw);}function openLEA(_7,_8,_9){window.open("/dictionaries/examcoach/lea.html?fileName=xml/"+_7+".xml&courseID="+_8+"&anchor="+_9,"LongmanInteractive","scrollbars=no,width=715,height=615,top="+GABch+",left="+GABcw);}function openChaGAB(exercise,courseID,anchorText) {window.open('/challenges/interactive/?fileName=xml/'+exercise+'.xml&courseID='+courseID+'&anchor='+anchorText,'LongmanInteractive','scrollbars=no,width=715,height=650,top='+GABch+',left='+GABcw);}function openOppsGAB(exercise,courseID,anchorText) {window.open('/newopportunities/interactive/?fileName=xml/'+exercise+'.xml&courseID='+courseID+'&anchor='+anchorText,'LongmanInteractive','scrollbars=no,width=715,height=650,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(_a){var _b;var _c=_a[_a.selectedIndex].value;if(_c=="#"){return;}_b=window.open(_c,"doPop","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=150,height=150");_b.focus();}function URLDecode(_d){var _e="0123456789ABCDEFabcdef";var _f="";var i=0;while(i<_d.length){var ch=_d.charAt(i);if(ch=="+"){_f+=" ";i++;}else{if(ch=="%"){if(i<(_d.length-2)&&_e.indexOf(_d.charAt(i+1))!=-1&&_e.indexOf(_d.charAt(i+2))!=-1){_f+=unescape(_d.substr(i,3));i+=3;}else{alert("Bad escape combination near ..."+_d.substr(i));_f+="%[ERROR]";i++;}}else{_f+=ch;i++;}}}return _f;}function getQueryVariable(_12){var _13=window.location.search.substring(1);var _14=_13.split("&");for(var i=0;i<_14.length;i++){var _16=_14[i].split("=");if(_16[0]==_12){return _16[1];}}return ("");}function AS_openBrWindow(_17,_18,_19){window.open(_17,_18,"scrollbars=no,"+_19+",top="+ch+",left="+cw);}function MM_openBrWindow(_1a,_1b,_1c){window.open(_1a,_1b,_1c);}function MM_CheckFlashVersion(_1d,msg){with(navigator){var _1f=(appVersion.indexOf("MSIE")!=-1&&userAgent.indexOf("Opera")==-1);var _20=(appVersion.toLowerCase().indexOf("win")!=-1);if(!_1f||!_20){var _21=-1;if(plugins&&plugins.length>0){var _22=plugins["Shockwave Flash"]?plugins["Shockwave Flash"].description:"";_22=plugins["Shockwave Flash 2.0"]?plugins["Shockwave Flash 2.0"].description:_22;if(_22==""){_21=-1;}else{var _23=_22.split(" ");var _24=_23[2].split(".");var _25=_24[0];var _26=(_23[3]!="")?_23[3].split("r"):_23[4].split("r");var _27=(_26[1]>0)?_26[1]:0;_21=parseFloat(_25+"."+_27);}}else{if(userAgent.toLowerCase().indexOf("webtv")!=-1){_21=4;}}var _28=_1d.split(",");var _29=parseFloat(_28[0]+"."+_28[2]);if(_21<_29){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 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 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 _2d=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 _2e=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:_2d[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+=_2e[t.getDay()*2+Number(a1)];break;default:str+=unescape(a[i]);}}return str;}function MM_displayStatusMsg(_2f){status=_2f;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(_35,mw,mh,fnt,fs,_3a,_3b,bg,bgh,_3e,_3f,pad,_41,to,sx,sy,_45,opq,_47,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=_3a;this.fontColorHilite=_3b;this.bgColor="#555555";this.menuBorder=1;this.menuBgOpaque=opq;this.menuItemBorder=1;this.menuItemIndent=idt;this.menuItemBgColor=bg;this.menuItemVAlign=_3f;this.menuItemHAlign=_3e;this.menuItemPadding=pad;this.menuItemSpacing=_41;this.menuLiteBgColor="#ffffff";this.menuBorderBgColor="#777777";this.menuHiliteBgColor=bgh;this.menuContainerBgColor="#cccccc";this.childMenuIcon="arrows.gif";this.submenuXOffset=sx;this.submenuYOffset=sy;this.submenuRelativeToItem=_45;this.vertical=_47;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=" "+_35;window.menus[this.label]=this;window.menus[window.menus.length]=this;if(!window.activeMenus){window.activeMenus=new Array();}}function addMenuItem(_4b,_4c){this.items[this.items.length]=_4b;this.actions[this.actions.length]=_4c;}function FIND(_4d){if(window.mmIsOpera){return (document.getElementById(_4d));}if(document.all){return (document.all[_4d]);}if(document.getElementById){return (document.getElementById(_4d));}return (false);}function writeMenus(_4e){if(window.triedToWriteMenus){return;}var agt=navigator.userAgent.toLowerCase();window.mmIsOpera=agt.indexOf("opera")!=-1;if(!_4e&&document.layers){window.delayWriteMenus=this.writeMenus;var _50=setTimeout("delayWriteMenus()",500);_4e=new Layer(100);clearTimeout(_50);}else{if(document.all||document.hasChildNodes||window.mmIsOpera){document.writeln("<span id=\"menuContainer\"></span>");_4e=FIND("menuContainer");}}window.mmHideMenuTimer=null;if(!_4e){return;}window.triedToWriteMenus=true;_4e.isContainer=true;_4e.menus=new Array();for(var i=0;i<window.menus.length;i++){_4e.menus[i]=window.menus[i];}window.menus.length=0;var _52=0;var _53=0;var top=0;var _55="";var lrs=false;var _57="";var tsc=0;if(document.layers){lrs=true;}for(var i=0;i<_4e.menus.length;i++,_52++){var _5a=_4e.menus[i];if(_5a.bgImageUp||!_5a.menuBgOpaque){_5a.menuBorder=0;_5a.menuItemBorder=0;}if(lrs){var _5b=new Layer(100,_4e);var _5c=new Layer(100,_5b);_5c.top=_5a.menuBorder;_5c.left=_5a.menuBorder;var _5d=new Layer(100,_5c);_5d.top=_5a.menuBorder;_5d.left=_5a.menuBorder;}else{_55+=""+"<div id=\"menuLayer"+_52+"\" style=\"position:absolute;z-index:1;left:10px;top:"+(i*100)+"px;visibility:hidden;color:"+_5a.menuBorderBgColor+";\">\n"+"  <div id=\"menuLite"+_52+"\" style=\"position:absolute;z-index:1;left:"+_5a.menuBorder+"px;top:"+_5a.menuBorder+"px;visibility:hide;\" onmouseout=\"mouseoutMenu();\">\n"+"\t <div id=\"menuFg"+_52+"\" style=\"position:absolute;left:"+_5a.menuBorder+"px;top:"+_5a.menuBorder+"px;visibility:hide;\">\n"+"";}var x=i;for(var i=0;i<_5a.items.length;i++){var _60=_5a.items[i];var _61=false;var _62=_5a.fontSize+2*_5a.menuItemPadding;if(_60.label){_60=_60.label;_61=true;}_5a.menuItemHeight=_5a.menuItemHeight||_62;var _63="";if(_5a.fontFamily!=""){_63+="font-family:"+_5a.fontFamily+";";}_63+="font-weight:"+_5a.fontWeight+";fontSize:"+_5a.fontSize+"px;";if(_5a.fontStyle){_63+="font-style:"+_5a.fontStyle+";";}if(document.all||window.mmIsOpera){_63+="font-size:"+_5a.fontSize+"px;\" onmouseover=\"onMenuItemOver(null,this);\" onclick=\"onMenuItemAction(null,this);";}else{if(!document.layers){_63+="font-size:"+_5a.fontSize+"px;cursor:pointer";}}var l;if(lrs){var lw=_5a.menuWidth;if(_5a.menuItemHAlign=="right"){lw-=_5a.menuItemPadding;}l=new Layer(lw,_5d);}var _66=0;var _67=i*_5a.menuItemHeight;if(!_5a.vertical){_66=i*_5a.menuWidth;_67=0;}var _68="<div id=\"menuItem"+_53+"\" style=\"position:absolute;left:"+_66+"px;top:"+_67+"px;"+_63+"\">";var _69="</div>";if(_5a.bgImageUp){_68="<div id=\"menuItem"+_53+"\" style=\"background:url(../../Longman/index_files/+_5a.bgImageUp+);position:absolute;left:"+_66+"px;top:"+_67+"px;"+_63+"\">";}var _6a=0,top=0,right=0,bottom=0;_6a=1+_5a.menuItemPadding+_5a.menuItemIndent;right=_6a+_5a.menuWidth-2*_5a.menuItemPadding-_5a.menuItemIndent;if(_5a.menuItemVAlign=="top"){top=_5a.menuItemPadding;}if(_5a.menuItemVAlign=="bottom"){top=_5a.menuItemHeight-_5a.fontSize-1-_5a.menuItemPadding;}if(_5a.menuItemVAlign=="middle"){top=((_5a.menuItemHeight/2)-(_5a.fontSize/2)-1);}bottom=_5a.menuItemHeight-2*_5a.menuItemPadding;var _6b="position:absolute;left:"+_6a+"px;top:"+top+"px;";if(lrs){_6b+=_63+"right:"+right+";bottom:"+bottom+";";_68="";_69="";}if(document.all&&!window.mmIsOpera){_60="<div align=\""+_5a.menuItemHAlign+"\">"+_60+"</div>";}else{if(lrs){_60="<div style=\"text-align:"+_5a.menuItemHAlign+";\">"+_60+"</div>";}else{var _6c=null;if(_5a.menuItemHAlign!="left"){if(window.mmIsOpera){var _6d=_5a.menuItemHAlign=="center"?-(_5a.menuWidth-2*_5a.menuItemPadding):(_5a.menuWidth-6*_5a.menuItemPadding);_6c="<div id=\"menuItemHilite"+_53+"Shim\" style=\"position:absolute;top:1px;left:"+_5a.menuItemPadding+"px;width:"+_6d+"px;text-align:"+_5a.menuItemHAlign+";visibility:visible;\">"+_60+"</div>";_60="<div id=\"menuItemText"+_53+"Shim\" style=\"position:absolute;top:1px;left:"+_5a.menuItemPadding+"px;width:"+_6d+"px;text-align:"+_5a.menuItemHAlign+";visibility:visible;\">"+_60+"</div>";}else{_6c="<div id=\"menuItemHilite"+_53+"Shim\" style=\"position:absolute;top:1px;left:1px;right:-"+(_6a+_5a.menuWidth-3*_5a.menuItemPadding)+"px;text-align:"+_5a.menuItemHAlign+";visibility:visible;\">"+_60+"</div>";_60="<div id=\"menuItemText"+_53+"Shim\" style=\"position:absolute;top:1px;left:1px;right:-"+(_6a+_5a.menuWidth-3*_5a.menuItemPadding)+"px;text-align:"+_5a.menuItemHAlign+";visibility:visible;\">"+_60+"</div>";}}else{_6c=null;}}}if(document.all&&!window.mmIsOpera){_60="<div id=\"menuItemShim"+_53+"\" style=\"position:absolute;left:0px;top:0px;\">"+_60+"</div>";}var _6e="<div id=\"menuItemText"+_53+"\" style=\""+_6b+"color:"+_5a.fontColor+";\">"+_60+"&nbsp</div>\n"+"<div id=\"menuItemHilite"+_53+"\" style=\""+_6b+"color:"+_5a.fontColorHilite+";visibility:hidden;\">"+(_6c||_60)+"&nbsp</div>";if(_61){_55+=(_68+_6e+"<div id=\"childMenu"+_53+"\" style=\"position:absolute;left:0px;top:3px;\"><img src=../../Longman/index_files//""+_5a.childMenuIcon+"/"></div>\n"+_69);}else{_55+=(_68+_6e+_69);}if(lrs){l.document.open("text/html");l.document.writeln(_55);l.document.close();_55="";_57+="-";tsc++;if(tsc>50){tsc=0;_57="";}status=_57;}_53++;}if(lrs){var _6f=new Layer(100,_5d);_6f.visiblity="hidden";_6f.document.open("text/html");_6f.document.writeln(" ");_6f.document.close();}else{_55+="\t  <div id=\"focusItem"+_52+"\" style=\"position:absolute;left:0px;top:0px;visibility:hide;\" onclick=\"onMenuItemAction(null,this);\"> </div>\n";_55+="   </div>\n  </div>\n</div>\n";}i=x;}if(document.layers){_4e.clip.width=window.innerWidth;_4e.clip.height=window.innerHeight;_4e.onmouseout=mouseoutMenu;_4e.menuContainerBgColor=this.menuContainerBgColor;for(var i=0;i<_4e.document.layers.length;i++){proto=_4e.menus[i];var _71=_4e.document.layers[i];_4e.menus[i].menuLayer=_71;_4e.menus[i].menuLayer.Menu=_4e.menus[i];_4e.menus[i].menuLayer.Menu.container=_4e;var _72=_71.document.layers[0].document.layers[0];_72.clip.width=proto.menuWidth||_72.clip.width;_72.clip.height=proto.menuHeight||_72.clip.height;for(var n=0;n<_72.document.layers.length-1;n++){var l=_72.document.layers[n];l.Menu=_4e.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=_4e.menus[i].actions[n];l.focusItem=_72.document.layers[_72.document.layers.length-1];l.clip.width=proto.menuWidth||_72.clip.width;l.clip.height=proto.menuItemHeight||l.clip.height;if(n>0){if(l.Menu.vertical){l.top=_72.document.layers[n-1].top+_72.document.layers[n-1].clip.height+proto.menuItemBorder+proto.menuItemSpacing;}else{l.left=_72.document.layers[n-1].left+_72.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=_4e.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){_72.document.bgColor=proto.bgColor;}if(proto.vertical){_72.clip.width=l.clip.width+proto.menuBorder;_72.clip.height=l.top+l.clip.height+proto.menuBorder;}else{_72.clip.height=l.clip.height+proto.menuBorder;_72.clip.width=l.left+l.clip.width+proto.menuBorder;if(_72.clip.width>window.innerWidth){_72.clip.width=window.innerWidth;}}var _75=_72.document.layers[n];_75.clip.width=_72.clip.width;_75.Menu=l.Menu;_75.top=-30;_75.captureEvents(Event.MOUSEDOWN);_75.onmousedown=onMenuItemDown;if(proto.menuBgOpaque){_71.document.bgColor=proto.menuBorderBgColor;}var _76=_71.document.layers[0];if(proto.menuBgOpaque){_76.document.bgColor=proto.menuLiteBgColor;}_76.clip.width=_72.clip.width+1;_76.clip.height=_72.clip.height+1;_71.clip.width=_72.clip.width+(proto.menuBorder*3);_71.clip.height=_72.clip.height+(proto.menuBorder*3);}}else{if((!document.all)&&(_4e.hasChildNodes)&&!window.mmIsOpera){_4e.innerHTML=_55;}else{_4e.document.open("text/html");_4e.document.writeln(_55);_4e.document.close();}if(!FIND("menuLayer0")){return;}var _77=0;for(var x=0;x<_4e.menus.length;x++){var _79=FIND("menuLayer"+x);_4e.menus[x].menuLayer="menuLayer"+x;_79.Menu=_4e.menus[x];_79.Menu.container="menuLayer"+x;_79.style.zindex=1;var s=_79.style;s.pixeltop=-300;s.pixelleft=-300;s.top="-300px";s.left="-300px";var _7b=_4e.menus[x];_7b.menuItemWidth=_7b.menuWidth||_7b.menuIEWidth||140;if(_7b.menuBgOpaque){_79.style.backgroundColor=_7b.menuBorderBgColor;}var top=0;var _7d=0;_7b.menuItemLayers=new Array();for(var i=0;i<_4e.menus[x].items.length;i++){var l=FIND("menuItem"+_77);l.Menu=_4e.menus[x];l.Menu.menuItemLayers[l.Menu.menuItemLayers.length]=l;if(l.addEventListener||window.mmIsOpera){l.style.width=_7b.menuItemWidth+"px";l.style.height=_7b.menuItemHeight+"px";l.style.pixelWidth=_7b.menuItemWidth;l.style.pixelHeight=_7b.menuItemHeight;l.style.top=top+"px";l.style.left=_7d+"px";if(l.addEventListener){l.addEventListener("mouseover",onMenuItemOver,false);l.addEventListener("click",onMenuItemAction,false);l.addEventListener("mouseout",mouseoutMenu,false);}if(_7b.menuItemHAlign!="left"){l.hiliteShim=FIND("menuItemHilite"+_77+"Shim");l.hiliteShim.style.visibility="inherit";l.textShim=FIND("menuItemText"+_77+"Shim");l.hiliteShim.style.pixelWidth=_7b.menuItemWidth-2*_7b.menuItemPadding-_7b.menuItemIndent;l.hiliteShim.style.width=l.hiliteShim.style.pixelWidth;l.textShim.style.pixelWidth=_7b.menuItemWidth-2*_7b.menuItemPadding-_7b.menuItemIndent;l.textShim.style.width=l.textShim.style.pixelWidth;}}else{l.style.pixelWidth=_7b.menuItemWidth;l.style.pixelHeight=_7b.menuItemHeight;l.style.pixelTop=top;l.style.pixelLeft=_7d;if(_7b.menuItemHAlign!="left"){var _80=FIND("menuItemShim"+_77);_80[0].style.pixelWidth=_7b.menuItemWidth-2*_7b.menuItemPadding-_7b.menuItemIndent;_80[1].style.pixelWidth=_7b.menuItemWidth-2*_7b.menuItemPadding-_7b.menuItemIndent;_80[0].style.width=_80[0].style.pixelWidth+"px";_80[1].style.width=_80[1].style.pixelWidth+"px";}}if(_7b.vertical){top=top+_7b.menuItemHeight+_7b.menuItemBorder+_7b.menuItemSpacing;}else{_7d=_7d+_7b.menuItemWidth+_7b.menuItemBorder+_7b.menuItemSpacing;}l.style.fontSize=_7b.fontSize+"px";l.style.backgroundColor=_7b.menuItemBgColor;l.style.visibility="inherit";l.saveColor=_7b.menuItemBgColor;l.menuHiliteBgColor=_7b.menuHiliteBgColor;l.mmaction=_4e.menus[x].actions[i];l.hilite=FIND("menuItemHilite"+_77);l.focusItem=FIND("focusItem"+x);l.focusItem.style.pixelTop=-30;l.focusItem.style.top="-30px";var _81=FIND("childMenu"+_77);if(_81){l.childMenu=_4e.menus[x].items[i].menuLayer;_81.style.pixelLeft=_7b.menuItemWidth-11;_81.style.left=_81.style.pixelLeft+"px";_81.style.pixelTop=(_7b.menuItemHeight/2)-4;_81.style.top=_81.style.pixelTop+"px";l.Menu.childMenus[l.Menu.childMenus.length]=l.childMenu;}l.style.cursor="hand";_77++;}if(_7b.vertical){_7b.menuHeight=top-1-_7b.menuItemSpacing;_7b.menuWidth=_7b.menuItemWidth;}else{_7b.menuHeight=_7b.menuItemHeight;_7b.menuWidth=_7d-1-_7b.menuItemSpacing;}var _82=FIND("menuLite"+x);var s=_82.style;s.pixelHeight=_7b.menuHeight+(_7b.menuBorder*2);s.height=s.pixelHeight+"px";s.pixelWidth=_7b.menuWidth+(_7b.menuBorder*2);s.width=s.pixelWidth+"px";if(_7b.menuBgOpaque){s.backgroundColor=_7b.menuLiteBgColor;}var _84=FIND("menuFg"+x);s=_84.style;s.pixelHeight=_7b.menuHeight+_7b.menuBorder;s.height=s.pixelHeight+"px";s.pixelWidth=_7b.menuWidth+_7b.menuBorder;s.width=s.pixelWidth+"px";if(_7b.menuBgOpaque){s.backgroundColor=_7b.bgColor;}s=_79.style;s.pixelWidth=_7b.menuWidth+(_7b.menuBorder*4);s.width=s.pixelWidth+"px";s.pixelHeight=_7b.menuHeight+(_7b.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 _89=new Date()-mmStart;var _8a=window.ActiveMenu.Menu.hideTimeout;if(_89<_8a){mmHideMenuTimer=setTimeout("mmDoHide()",_8a+100-_89);return;}mmDHFlag=false;hideActiveMenus();window.ActiveMenuItem=0;}function MM_showMenu(_8b,x,y,_8e,_8f){if(!window.mmWroteMenu){return;}MM_clearTimeout();if(_8b){var obj=FIND(_8f)||document.images[_8f]||document.links[_8f]||document.anchors[_8f];x=moveXbySlicePos(x,obj);y=moveYbySlicePos(y,obj);}if(document.layers){if(_8b){var l=_8b.menuLayer||_8b;l.top=l.left=1;hideActiveMenus();if(this.visibility){l=this;}window.ActiveMenu=l;}else{var l=_8e;}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=_8b.menuLayer||_8b;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(_8b){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 _9a=parseFloat(navigator.appVersion);if(navigator.appName!="Microsoft Internet Explorer"){return _9a;}var _9b=navigator.appVersion;var i=_9b.indexOf("MSIE ");if(i>=0){_9b=_9b.substring(i+5);_9a=parseFloat(_9b);}return _9a;}function mouseoutMenu(){if((navigator.appName=="Microsoft Internet Explorer")&&(getExplorerVersion()<4.5)){return true;}hideMenu(false,false);return true;}function hideMenu(_9d,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(_9d&&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(!_9d&&window.ActiveMenu){if(window.ActiveMenu.Menu){if(window.ActiveMenu.Menu.hideOnMouseOut){MM_startTimeout();}return (true);}}return (true);}function hideChildMenu(_a0){MM_clearTimeout();var l=_a0;for(var i=0;i<l.Menu.childMenus.length;i++){var _a3=l.Menu.childMenus[i];if(document.layers){_a3.visibility="hidden";}else{_a3=FIND(_a3);_a3.style.visibility="hidden";if(_a3.Menu.menuItemHAlign!="left"){for(var j=0;j<_a3.Menu.menuItemLayers.length;j++){var _a5=_a3.Menu.menuItemLayers[j];if(_a5.textShim){_a5.textShim.style.visibility="inherit";}}}}_a3.Menu.hideChildMenu(_a3);}if(l.childMenu){var _a6=l.childMenu;if(document.layers){l.Menu.MM_showMenu(null,null,null,_a6.layers[0]);_a6.zIndex=l.parentLayer.zIndex+1;_a6.top=l.Menu.menuLayer.top+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){_a6.top+=l.top+l.parentLayer.top;}_a6.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}else{_a6.top+=l.top+l.parentLayer.top;if(l.Menu.submenuRelativeToItem){_a6.left=l.Menu.menuLayer.left+l.left+l.clip.width+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{_a6.left=l.parentLayer.left+l.parentLayer.clip.width-(2*l.Menu.menuBorder)+l.Menu.menuLayer.left+l.Menu.submenuXOffset;}}if(_a6.left<l.Menu.container.clip.left){l.Menu.container.clip.left=_a6.left;}var w=_a6.clip.width+_a6.left-l.Menu.container.clip.left;if(w>l.Menu.container.clip.width){l.Menu.container.clip.width=w;}var h=_a6.clip.height+_a6.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;_a6.visibility="inherit";}else{if(FIND("menuItem0")){_a6=FIND(l.childMenu);var _a9=FIND(l.Menu.menuLayer);var s=_a6.style;s.zIndex=_a9.style.zIndex+1;if(document.all||window.mmIsOpera){s.pixelTop=_a9.style.pixelTop+l.Menu.submenuYOffset;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){s.pixelTop+=l.style.pixelTop;}s.pixelLeft=l.style.pixelWidth+_a9.style.pixelLeft+l.Menu.submenuXOffset;s.left=s.pixelLeft+"px";}else{s.pixelTop+=l.style.pixelTop;if(l.Menu.submenuRelativeToItem){s.pixelLeft=_a9.style.pixelLeft+l.style.pixelLeft+l.style.pixelWidth+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{s.pixelLeft=(_a9.style.pixelWidth-4*l.Menu.menuBorder)+_a9.style.pixelLeft+l.Menu.submenuXOffset;}s.left=s.pixelLeft+"px";}}else{var top=parseInt(_a9.style.top)+l.Menu.submenuYOffset;var _ac=0;if(l.Menu.vertical){if(l.Menu.submenuRelativeToItem){top+=parseInt(l.style.top);}_ac=(parseInt(_a9.style.width)-4*l.Menu.menuBorder)+parseInt(_a9.style.left)+l.Menu.submenuXOffset;}else{top+=parseInt(l.style.top);if(l.Menu.submenuRelativeToItem){_ac=parseInt(_a9.style.left)+parseInt(l.style.left)+parseInt(l.style.width)+(2*l.Menu.menuBorder)+l.Menu.submenuXOffset;}else{_ac=(parseInt(_a9.style.width)-4*l.Menu.menuBorder)+parseInt(_a9.style.left)+l.Menu.submenuXOffset;}}s.top=top+"px";s.left=_ac+"px";}_a6.style.visibility="inherit";}else{return;}}window.activeMenus[window.activeMenus.length]=_a6;}}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 _b1=navigator.platform?navigator.platform=="Win32":false;var _b2=document.all&&!_b1&&getExplorerVersion()==4.5;var par=img;var _b4=0;while(par){if(par.leftMargin&&!_b1){x+=parseInt(par.leftMargin);}if((par.offsetLeft!=_b4)&&par.offsetLeft){x+=parseInt(par.offsetLeft);}if(par.offsetLeft!=0){_b4=par.offsetLeft;}par=_b2?par.parentElement:par.offsetParent;}}else{if(img.x){x+=img.x;}}return x;}function moveYbySlicePos(y,img){if(!document.layers){var _b7=navigator.platform?navigator.platform=="Win32":false;var _b8=document.all&&!_b7&&getExplorerVersion()==4.5;var par=img;var _ba=0;while(par){if(par.topMargin&&!_b7){y+=parseInt(par.topMargin);}if((par.offsetTop!=_ba)&&par.offsetTop){y+=parseInt(par.offsetTop);}if(par.offsetTop!=0){_ba=par.offsetTop;}par=_b8?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 = 637;
var iPopupHeight = 475;
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();
    }
}
