LMI.MinEvents=(function(){var C={63232:38,63233:40,63234:37,63235:39,63273:36,63275:35,63276:33,63277:34};function E(I,H,J){if(I.addEventListener){I.addEventListener(H,J,false)}else{if(I.attachEvent){I.attachEvent("on"+H,J)}else{throw new Error("addEvent: unsupported browser")}}}function G(I,H,J){if(I.removeEventListener){I.removeEventListener(H,J,false)}else{if(I.detachEvent){I.detachEvent("on"+H,J)}else{throw new Error("removeEvent: unsupported browser")}}}function B(H){var I;if(window.onload){I=window.onload}window.onload=function(){if(typeof I==="function"){I()}H()}}function D(H){if(H.stopPropagation){H.stopPropagation()}else{H.cancelBubble=true}if(H.preventDefault){H.preventDefault()}else{H.returnValue=false}}function A(I){var H=0,J=I.charCode;if(J>60000&&(J in C)){H=C[J]}else{if(!J){H=I.keyCode}}return H}function F(J,I){var H=J.target||J.srcElement;I=I.toUpperCase();while(H&&H.nodeName!==I){H=H.parentNode}return H}return{on:E,addEvent:E,addWindowLoadEvent:B,stopEvent:D,getKeyCode:A,findTarget:F,removeEvent:G}})();LMI.DropDown=(function(){var I=LMI.MinEvents,D=[],J=false,K=/\bhilite\b/,M={backspace:8,tab:9,enter:13,esc:27,pgup:33,pgdn:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46};function H(Q){var O,N,P;Q=Q||window.event;P=Q.target||Q.srcElement;for(O=0,N=D.length;O<N;++O){D[O].hideIfUnrelated(P)}}function G(){if(!J){J=true;LMI.MinEvents.addEvent(document.body,"click",H)}}function E(N,O){O.appendChild(N)}function C(N,P){var O=P.nextSibling;if(O){O.parentNode.insertBefore(N,O)}else{P.parentNode.appendChild(N)}}function B(Q,P,O,S,R){var N=document.createElement(P);R=R||E;if(O){N.className=O}if(S){N.appendChild(document.createTextNode(S))}R(N,Q);return N}function L(N,O){if(N.currentStyle){O=O.replace(/\-(\w)/g,function(P,Q){return Q.toUpperCase()});return N.currentStyle[O]}else{return getComputedStyle(N,"").getPropertyValue(O)}}function F(N){var P=N,O={x:0,y:0};do{O.x+=P.offsetLeft;O.y+=P.offsetTop;if(P!==N){O.x+=parseInt(L(P,"border-left-width"),10)||0;O.y+=parseInt(L(P,"border-top-width"),10)||0}P=P.offsetParent}while(P&&L(P,"position")==="static");return O}function A(O,N){this.init(O,N)}A.prototype={init:function(O,N){this.id=O;this.options=N||{};this.textbox=document.getElementById(O);if(!this.textbox||this.textbox.id!==O){throw new TypeError('DropDown: unable to find textbox with id "'+O+'"')}this.textbox.setAttribute("autocomplete","off");if(this.options.readOnly){this.textbox.setAttribute("readOnly",true)}this.lastSection="LMIDDNoSection";this.sections={};this.eventHandlers={};this.addArrow();this.createMenu();this.addEventListeners();D.push(this);G()},isShown:function(){return this.container.style.display==="block"},syncShim:function(){var O,N;if(this.shim){O=this.container;N=this.shim;N.style.top=O.style.top;N.style.left=O.style.left;N.style.display=O.style.display;N.style.width=O.offsetWidth+"px";N.style.height=O.offsetHeight+"px"}},showMenu:function(){var P=this.container,N=this.textbox,O=F(N);P.style.top=O.y+N.offsetHeight+"px";P.style.left=O.x+"px";P.style.display="block";this.shadow.style.overflow="auto";this.syncShim()},hideMenu:function(){this.container.style.display="none";this.syncShim()},hideIfUnrelated:function(N){if(N===this.textbox||N===this.arrow){return }while(N&&!(N.nodeName==="DIV"&&N.className.match(/\bLMIDropDown\b/))){N=N.parentNode}if(!N){this.hideMenu()}},toggleMenu:function(){if(this.isShown()){this.hideMenu()}else{this.showMenu()}},addArrow:function(){if("arrowSrc" in this.options){this.arrow=B(this.textbox.parentNode,"img","LMIDDArrow");this.arrow.src=this.options.arrowSrc;this.positionArrow()}},positionArrow:function(){this.arrow.style.top=F(this.textbox).y+"px"},createMenu:function(){this.container=B(this.textbox.parentNode,"div","LMIDropDown");this.container.id="LMIDD_"+this.id;this.shadow=B(this.container,"div","LMIDDShadow");this.menu=B(this.container,"div","LMIDDMenu");this.list=B(this.menu,"dl","LMIDDList");if(document.all&&!window.opera){this.shim=B(this.textbox.parentNode,"iframe","LMIDDShim");this.shim.src="about:blank"}},addSection:function(Q,P,N){var O;N=N||{};if(this.sections[Q]){throw new Error('section "'+Q+'" already exists')}this.lastSection=Q;if(P){if(typeof P==="string"){O=B(this.list,"dt",Q);B(O,"span","",P)}if("hint" in N){if(typeof N.hint==="string"){B(O,"span","hint",N.hint)}else{if(!N.hint.className.match(/\bhint\b/)){N.hint.className+=" hint"}O.appendChild(N.hint)}}}this.sections[Q]={header:O,items:[]}},clearSection:function(S,Q){var P,N,O,R=this.sections[S];if(R){O=R.items;for(P=0,N=O.length;P<N;++P){O[P].element.parentNode.removeChild(O[P].element);O[P]=null}R.items=[]}},addItem:function(T,S,N,U){var Q,O,R,P={display:T,options:N};S=S||this.lastSection;if(!this.sections[S]){this.addSection(S)}O=this.sections[S];if(O.items.length){Q=O.items[O.items.length-1].element;R=C}else{if(O.header){Q=O.header;R=C}else{Q=this.list}}P.type=S;P.element=B(Q,"dd",S,T,R);O.items.push(P);if(N&&"selected" in N&&N.selected){this.selectItem(S,O.items.length-1)}},selectItem:function(O,N){this.selected=this.sections[O].items[N];this.textbox.value=this.selected.display;this.hideMenu();this.textbox.focus();this.eventHandler("select",this.selected)},hiliteItem:function(P,N){var O=this.sections[P].items[N];this.hilited=[P,N];if(!K.test(O.element.className)){O.element.className+=" hilite"}},unhiliteItem:function(P,N){var O;if(this.hilited){if(!P||!N){P=this.hilited[0];N=this.hilited[1]}O=this.sections[P].items[N];this.hilited=null;O.element.className=O.element.className.replace(K,"")}},previous:function(){var O,P,N,Q=this.hilited;if(Q){this.unhiliteItem(Q[0],Q[1]);O=this.sections[Q[0]].items[Q[1]].element.previousSibling;while(O&&O.nodeName!=="DD"){O=O.previousSibling}}if(!O){N=this.list.getElementsByTagName("dd");if(N.length){O=N[N.length-1]}}if(O){P=this.getItemByElement(O);this.hiliteItem(P[0],P[1])}},next:function(){var N,O,P=this.hilited;if(P){this.unhiliteItem();N=this.sections[P[0]].items[P[1]].element.nextSibling;while(N&&N.nodeName!=="DD"){N=N.nextSibling}}if(!N){N=this.list.getElementsByTagName("dd")[0]}if(N){O=this.getItemByElement(N);this.hiliteItem(O[0],O[1])}},getItemByElement:function(R){var P,N,O,Q=R.className.split(" ")[0],S=this.sections[Q];if(S){O=S.items;for(P=0,N=O.length;P<N;++P){if(O[P].element===R){return[Q,P]}}}return null},mouseHandler:function(O){var N=I.findTarget(O,"dd");if(N){N=this.getItemByElement(N);if(N){if(O.type==="click"){this.selectItem(N[0],N[1])}else{if(O.type==="mouseover"){this.hiliteItem(N[0],N[1])}else{this.unhiliteItem(N[0],N[1])}}}}},keyHandler:function(O){var N=I.getKeyCode(O);if(N===M.enter||O.charCode===M.enter||N===M.right){if(this.isShown()&&this.hilited){I.stopEvent(O);this.selectItem(this.hilited[0],this.hilited[1])}}else{if(O.type==="keydown"){switch(N){case M.up:this.showMenu();this.previous();I.stopEvent(O);break;case M.down:this.showMenu();this.next();I.stopEvent(O);break;case M.tab:if(this.isShown()){if(this.hilited){this.selectItem(this.hilited[0],this.hilited[1])}this.hideMenu()}break}}else{if(this.selected&&this.selected.display!==this.textbox.value){this.selected=null}}}},addEventListeners:function(){var N=this;this._fieldClickHandler=function(){N.textbox.focus();N.toggleMenu()};this._keyHandler=function(O){N.keyHandler(O||window.event)};this._mouseHandler=function(O){N.mouseHandler(O||window.event)};if(this.arrow){I.addEvent(this.arrow,"click",this._fieldClickHandler)}if(!("openOnFieldClick" in this.options)||this.options.openOnFieldClick){I.addEvent(this.textbox,"click",this._fieldClickHandler)}I.addEvent(this.textbox,"keydown",this._keyHandler);I.addEvent(this.textbox,"keypress",this._keyHandler);I.addEvent(this.menu,"click",this._mouseHandler);I.addEvent(this.menu,"mouseover",this._mouseHandler);I.addEvent(this.menu,"mouseout",this._mouseHandler)},eventHandler:function(Q,R){var O,N,P;if(Q in this.eventHandlers){P=this.eventHandlers[Q];for(O=0,N=P.length;O<N;++O){P[O].call(this,R)}}},addEventHandler:function(N,P){var O=this;if(!this["_"+N+"Handler"]){this["_"+N+"Handler"]=function(Q){O.eventHandler(N,Q||window.event)};if(N!=="select"){I.addEvent(this.textbox,N,this["_"+N+"Handler"])}}if(!(N in this.eventHandlers)){this.eventHandlers[N]=[]}this.eventHandlers[N].push(P)},addSubmitHandler:function(O){var N=this;if(!this._submitHandler){this._submitHandler=function(P){N.eventHandler("submit",P||window.event)};I.addEvent(this.textbox.form,"submit",this._submitHandler)}if(!("submit" in this.eventHandlers)){this.eventHandlers.submit=[]}this.eventHandlers.submit.push(O)},addModule:function(P){var O,N,R,Q=["keyup","focus","blur","select"];for(O=0,N=Q.length;O<N;++O){R=Q[O]+"Handler";if(R in P){this.addEventHandler(Q[O],P[R])}}if("submitHandler" in P){this.addSubmitHandler(P.submitHandler)}if("methods" in P){for(O in P.methods){if(P.methods.hasOwnProperty(O)){this[O]=P.methods[O]}}}}};A.getById=function(P){var O=0,N=D.length;for(;O<N;++O){if(D[O].id===P){return D[O]}}return null};return A})();LMI.DropDown.Suggest=(function(){function B(){}B.prototype={minLength:2,suggestUrl:LMI.Data.Urls.suggest,focused:false,getSuggestions:function(D,E){var C=this.suggestUrl+"?query="+encodeURIComponent(D);LMI.XHR.makeXHRRequest(C,"get",E)},getSuggestCallback:function(D,E){var C=this;return function(H){if(!H){H=[]}var G,F;if(C.focused&&D.suggest_requestId===E){D.unhiliteItem();D.clearSection("suggest");for(G=0,F=H.length;G<F;++G){D.addItem(H[G].key,"suggest")}if(H.length>0&&(!D.selected||D.selected.display!=D.textbox.value)){D.showMenu()}}}},getModule:function(){var C=this;return{keyupHandler:function(){var D=this.textbox.value;if(D.length<C.minLength){this.clearSection("suggest");this.suggest_prevSearch=""}else{if(D!==this.suggest_prevSearch){this.suggest_requestId=new Date().getTime().toString().substring(4);this.suggest_prevSearch=this.textbox.value;C.getSuggestions(this.textbox.value,C.getSuggestCallback(this,this.suggest_requestId))}}},focusHandler:function(){C.focused=true},blurHandler:function(){C.focused=false}}}};var A=new B().getModule();B.keyupHandler=A.keyupHandler;B.focusHandler=A.focusHandler;B.blurHandler=A.blurHandler;return B})();LMI.XHR=(function(){var getXHRObject,msXHRClass,msxhr=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];if(window.XMLHttpRequest){getXHRObject=function(){return new XMLHttpRequest()}}else{if(window.ActiveXObject&&navigator.userAgent.indexOf("Mac")===-1){getXHRObject=function(){var i,len,xhr;if(msXHRClass){return new ActiveXObject(msXHRClass)}else{for(i=0,len=msxhr.length;i<len;++i){try{xhr=new ActiveXObject(msxhr[i]);msXHRClass=msxhr[i];return xhr}catch(ex){}}}return null}}else{getXHRObject=function(){return null}}}function getStateChangeFunc(req){return function(){var reply;if(req.xhr.readyState===4){reply=req.xhr.responseText;req.callback(eval(reply))}}}function makeXHRRequest(url,type,callback){var req={xhr:getXHRObject(),callback:callback};if(req.xhr){req.xhr.onreadystatechange=getStateChangeFunc(req);req.xhr.open(type,url,true);req.xhr.send(null)}}return{makeXHRRequest:makeXHRRequest}})();LMI.Strings=(function(){var A=LMI.Data.strings,B=LMI.Data.strings_debug;return{setString:function(C,D){A[C]=D},setStrings:function(C){A=C},setDebug:function(C){B=C},getString:function(E){var D,C,F="";if(E in A){F=A[E];C=arguments.length;for(D=1;D<C;++D){F=F.replace(new RegExp("{"+(D-1)+"\\}","g"),arguments[D])}}else{if(B){F="Unknown Message Key: '"+E+"'"}}return F}}})();LMI.SearchForm=(function(){radiusSearch=false;countrySearch=false;countryAsDropdown=false;var Q={arrowSrc:LMI.Data.Urls.ddArrow};function A(S){var R=document.getElementById(S);return R&&R.id===S}function G(){var S=document.createElement("div"),R=document.createElement("strong");S.className="LMIMessages tip";R.appendChild(document.createTextNode(LMI.Strings.getString("js.dropdown.tip")));S.appendChild(R);R=document.createElement("span");R.appendChild(document.createTextNode(LMI.Strings.getString("js.dropdown.tip.text")));S.appendChild(R);return S}function E(R,S,T){return function(U){var V=U||window.event;LMI.MinEvents.stopEvent(V);(document.createElement("img")).src=T+"?noresponse=1";R.clearSection("recent")}}function K(R,T){var S=document.createElement("a");S.href="#";LMI.MinEvents.addEvent(S,"click",E(R,S,T));S.appendChild(document.createTextNode(LMI.Strings.getString("js.dropdown.clear")));return S}function J(S,R){for(var T in R){if(!(T in S)){S[T]=R[T]}}}function M(W,U){var S,V,R,T;U=U||{};J(U,{suggest:true,recent:true,tip:true});J(U,Q);if(document.body.id.indexOf("home")>-1){Q.arrowSrc=LMI.Data.Urls.ddArrowHome}else{if(document.body.className.indexOf("YELLOW")>-1){Q.arrowSrc=LMI.Data.Urls.ddArrowYellow}else{if((document.body.id.indexOf("findOnMap")>-1)||(document.body.id.indexOf("directions")>-1)||(document.body.id.indexOf("browseMap")>-1)){Q.arrowSrc=LMI.Data.Urls.ddArrowGreen}else{if(document.body.className.indexOf("productSearch")>-1){Q.arrowSrc=LMI.Data.Urls.ddArrowBlue}}}}if(A(W)){V=new LMI.DropDown(W,Q);if(U.suggest){V.addSection("suggest",LMI.Strings.getString("js.dropdown.suggestions"));V.addModule((new LMI.DropDown.Suggest()).getModule())}if(U.recent){R=K(V,LMI.Data.Urls.removeSearches);T=LMI.Data.recentSearches;V.addSection("recent",LMI.Strings.getString("js.titles.recent"),{hint:R});if(T){for(S in T){if(T.hasOwnProperty(S)&&T[S].searchTerms){V.addItem(T[S].searchTerms,"recent")}}}}if(U.tip){V.menu.appendChild(G())}}}function D(T,S){var V,Y,W,X,Z,b,U,R=LMI.Data;S=S||{};J(S,{suggest:true,recent:true,saved:true,tip:false,suggestUrl:LMI.Data.Urls.whereSuggest});J(S,Q);if(A(T)){W=new LMI.DropDown(T,Q);if(S.suggest){X=new LMI.DropDown.Suggest();X.suggestUrl=S.suggestUrl;W.addSection("suggest",LMI.Strings.getString("js.dropdown.suggestions"));W.addModule(X.getModule())}if(S.recent){U=R.recentLocations;Z=K(W,R.Urls.removeLocations);W.addSection("recent",LMI.Strings.getString("js.titles.recentlocs"),{hint:Z});if(U){for(V in U){if(U.hasOwnProperty(V)&&U[V].locationValue!=""){W.addItem(U[V].locationValue,"recent")}}}}if(S.saved){b=R.state.visitorVO;if(b.savedLocations&&b.savedLocations.length){W.addSection("saved",LMI.Strings.getString("js.titles.saved"));for(V=0,Y=b.savedLocations.length;V<Y;++V){W.addItem(b.savedLocations[V].locationName,"saved")}}}if(S.tip){W.menu.appendChild(G())}}}function O(R,V,W){var U,X,S=[];W=W?W:document;if(!R){return null}if(V){X=new RegExp(V)}U=W.getElementsByTagName(R);for(var T=0;T<U.length;T++){if(!V||U[T].className.match(X)!=null){S.push(U[T])}}return S}function L(U){U=U||window.event;var S=LMI.MinEvents.findTarget(U,"a"),T=LMI.MinEvents.findTarget(U,"form"),R=O("div","radiusInput",T)[0],V;if(R.className.match(/hidden/)!=null){R.className=R.className.replace(/hidden/,"");V=LMI.Strings.getString("js.radius.remove");LMI.SearchForm.radiusSearch=true}else{R.className+=" hidden";V=LMI.Strings.getString("js.radius.search");T.distance.value=0;LMI.SearchForm.radiusSearch=false}S.firstChild.nodeValue=V;LMI.MinEvents.stopEvent(U)}function C(S){e=S||window.event;var U=document.getElementById("locationWithCountry"),T=document.getElementById("searchFields"),R=e.srcElement?e.srcElement:e.target;if(U.className.indexOf("hidden")>-1){U.className=U.className.replace(/hidden/g,"");T.className+=" hidden";R.innerHTML=LMI.Strings.getString("js.header.hide.country");countrySearch=true}else{U.className+=" hidden";T.className=T.className.replace(/hidden/g,"");R.innerHTML=LMI.Strings.getString("js.header.show.country");countrySearch=false}LMI.MinEvents.stopEvent(e)}var I=O("a","proximitySearch")[0];if(I){LMI.MinEvents.on(I,"click",L)}var P=O("a","showCountry")[0];if(P){LMI.MinEvents.on(P,"click",C)}function H(R){var T=LMI.Data.baseUrl.split(";"),S=T[0].replace(/\/$/,""),U=T[1];return S+R+(U?";"+U:"")}function F(S,T,R){var U=LMI.Strings.getString;switch(S){case"map":break;default:return H(U("js.url.search",T||"-",R||"-"))+"1/"}}function B(Z){var S=O("div","searchForm")[0],W,c=document.getElementById("activeMapTab").value,U="",b,T;if(S){var R=S.getElementsByTagName("form")[0];var Y="";if(typeof (R.where)!="undefined"){if(R.where.value.length>0){Y=R.where.value}}var X="";if(typeof (R.what)!="undefined"){if(R.what.value.length>0){X=R.what.value}}X=encodeURIComponent(X);Y=encodeURIComponent(Y);X=X.replace(/%20/g,"+");Y=Y.replace(/%20/g,"+");if(document.body.id=="findOnMap"&&c=="location"){var V=LMI.MapSearchSize.getDimensions();W=H("/mapalocation.ds");W+="?newSearch=true&tab=location";countrySearch=(document.getElementById("locationWithCountry").className.indexOf("hidden")>-1)?false:true;if(countrySearch){b=document.getElementById("countryWithCountry");W+="&countrySearch=true&whereCity="+encodeURIComponent(document.getElementById("cityWithCountry").value)+"&whereAddress="+encodeURIComponent(document.getElementById("streetWithCountry").value)+"&whereCountry="+encodeURIComponent(b.options[b.selectedIndex].value)}else{W+="&where="+Y}}else{if(document.body.id=="browseMap"||(document.body.id=="findOnMap"&&c=="business")){var V=LMI.MapSearchSize.getDimensions();W=H("/mapsearch.ds");W+="?what="+X+"&where="+Y+"&newSearch=true&mapWidth="+V.x+"&mapHeight="+V.y+"&tab=business";if(LMI.MapSearch){W+="&mapLevel="+LMI.MapSearch.getMap().zoomLevel}}else{if(R.action.indexOf("finddirections.ds")>-1){R.action+="?tab=directions";R.method="POST";LMI.MinEvents.stopEvent(Z);R.submit();return }else{var a=F("",Y,X);if(LMI.SearchForm.radiusSearch&&R.distance.value>0&&Y!=""){a+="?distance="+R.distance.value}W=a}}}location.href=W}LMI.MinEvents.stopEvent(Z)}function N(R){var S=R||window.event;if(S.keyCode==13){B(S)}}LMI.MinEvents.addWindowLoadEvent(function(){var R=typeof (document.getElementById("searchformSubmit"))!="undefined"?document.getElementById("searchformSubmit"):false;var S=typeof (document.getElementById("topSearchForm"))!="undefined"?document.getElementById("topSearchForm"):false;if(R){LMI.MinEvents.addEvent(R,"click",B)}if(S){LMI.MinEvents.addEvent(S,"submit",B)}});return{createWhatDropDown:M,createWhereDropDown:D}})();LMI.SearchForm.Popup=(function(){var B=LMI.MinEvents,F=[],H;function A(I,M,J){var L=document.createElement(I);if(M){for(var N in M){L[N]=M[N]}}if(J){for(var K=0;K<J.length;K++){L.appendChild(typeof J[K]=="string"?document.createTextNode(J[K]):J[K])}}return L}function G(J){if(!H){H=A("iframe",{className:"shimFrame"},[]);document.body.appendChild(H)}H.className=H.className.replace(/\bhidden\b/g,"");var I=H.style,K=E(J);I.position="absolute";I.background="#000000";I.border="0";I.left=(K.x+5)+"px";I.top=(K.y+5)+"px";I.width=(K.w-2)+"px";I.height=(K.h-2)+"px";I.zIndex="199"}function C(){if(H){H.className+=" hidden"}}function E(I){var J={x:0,y:0,w:I.offsetWidth,h:I.offsetHeight};while(I){J.x+=I.offsetLeft;J.y+=I.offsetTop;I=I.offsetParent}return J}function D(J,I){F.push(this);this.link=J;this.className=I;this.init()}D.prototype={init:function(){var I=this;B.on(this.link,"click",function(J){B.stopEvent(J);I.show()})},createElement:function(){var I=this.link.title;return A("div",{className:(this.className||"")+" searchPopup hidden"},[A("h2",null,[A("div",{className:"leftCorner"},[]),this.link.title||""]),A("div",{className:"searchPopupContent"},[this.iframe]),A("a",{className:"closer",href:"javascript:void(0)",onclick:D.hideAll},[])])},createIframe:function(){var J=A("iframe"),I=this;B.on(J,"load",function(K){I.iframeLoaded(K)});return J},show:function(){D.hideAll();if(!this.element){this.iframe=this.createIframe();this.element=this.createElement();document.body.appendChild(this.element)}this.iframe.src=this.link.href;this.element.className=this.element.className.replace(/\bhidden\b/g,"");G(this.element)},hide:function(){if(this.element){this.element.className+=" hidden"}C()},iframeLoaded:function(){var I=this,J=this.iframe.contentDocument||this.iframe.contentWindow.document;J.searchFormCallback=function(M){var K=I._callbacks;if(K){for(var L=0;L<K.length;L++){K[L](M)}}}},addCallback:function(J){var I=this._callbacks;if(!I){I=this._callbacks=[]}I.push(J)}};D.hideAll=function(){for(var I=0;I<F.length;I++){F[I].hide()}};return D})();(function(){LMI.SearchForm.createWhatDropDown("what");LMI.SearchForm.createWhereDropDown("where",{tip:true});var F,G=false;if(document.getElementsByTagName("body")[0].id=="details"){F=LMI.Data.baseDetailsUrl}else{F=LMI.Data.baseUrl}var H=document.getElementById("chooseRegionLink"),C;if(H){H.href=F.replace(/;.*/,"").replace(/\/$/,"")+"/searchformregions.ds";C=new LMI.SearchForm.Popup(H,"regionPopup");C.addCallback(function(P){var O=document.getElementById("where");if(O&&P==LMI.Strings.getString("js.category.country.name")){O.value=P}else{if(O){O.value=LMI.Strings.getString("js.where.region.prefix")+'"'+P+'"'}}C.hide()})}categoryLink=document.getElementById("chooseCategoryLink");if(categoryLink){productResultsType=document.getElementById("productResultsType");if(document.body.className.indexOf("PRODUCT")>-1){productResultsType={value:"product"}}href=LMI.Data.baseUrl.replace(/;.*/,"").replace(/\/$/,"");href+="/searchformcategories.ds?";href+="letter=A&locale="+LMI.Data.locale;categoryLink.href=href;categoryPopup=new LMI.SearchForm.Popup(categoryLink,"categoryPopup");categoryPopup.addCallback(function(P){var O=document.getElementById("what");if(O){O.value=LMI.Strings.getString("js.where.category.prefix")+'"'+P+'"'}categoryPopup.hide()})}function J(R){if(G){return }G=false;if(!R){R=window.event}var W=R.srcElement?R.srcElement:R.target;var P=document.getElementById("actionLinksMenu");if(P.className.indexOf("hidden")>-1){W.className+=" advertiseHover";M(P)}else{W.className=W.className.replace(/advertiseHover/g,"");L(P)}var T=W.offsetLeft;var S=W.offsetTop;var O=W.offsetParent;var U=W.offsetWidth;var V=P.offsetWidth;var Q=(U+10+1);while(O&&O.id!="lmi_hdr"){T=parseInt(T+O.offsetLeft,0);S=parseInt(S+O.offsetTop,0);O=O.offsetParent}P.style.left=parseInt(T-6,0)+"px";P.style.top=parseInt(S+W.offsetHeight-20,0)+"px";if(Q>=V){P.style.width=(Q+1)+"px"}}function L(O){O.className+=" hidden"}function M(O){O.className=O.className.replace(/hidden/g,"")}function N(Q){var P=Q.srcElement?Q.srcElement:Q.target;G=true;var O=document.getElementById("actionLinksMenu");O.className=O.className.replace(/hidden/g,"");P.className+=" advertiseHover"}function D(Q){var P=Q.srcElement?Q.srcElement:Q.target;G=false;var O=document.getElementById("actionLinksMenu");O.className+=" hidden";P.className=P.className.replace(/advertiseHover/g,"")}if(document.getElementById("actionLinks")){var B=document.getElementById("actionLinks").getElementsByTagName("a");var K=document.getElementById("advertiseLink");var A=document.getElementById("advertiseLink").offsetWidth;var I=document.getElementById("actionLinksMenu").offsetWidth;if(I>A){K.style.width=I+"px"}for(var E=0;E<B.length;E++){if(B[E].className.indexOf("advertise")>-1){LMI.MinEvents.on(B[E],"mouseover",J);LMI.MinEvents.on(B[E],"mouseout",J);LMI.MinEvents.on(document.getElementById("actionLinksMenu"),"mouseover",N);LMI.MinEvents.on(document.getElementById("actionLinksMenu"),"mouseout",D);break}}}})();