LMI.MinEvents=(function(){var safariKeys={63232:38,63233:40,63234:37,63235:39,63273:36,63275:35,63276:33,63277:34};function addEvent(el,type,func){if(el.addEventListener){el.addEventListener(type,func,false);}else if(el.attachEvent){el.attachEvent("on"+type,func);}else{throw new Error('addEvent: unsupported browser');}}
function removeEvent(el,type,func){if(el.removeEventListener){el.removeEventListener(type,func,false);}else if(el.detachEvent){el.detachEvent("on"+type,func);}else{throw new Error('removeEvent: unsupported browser');}}
function addWindowLoadEvent(func){var oldFunc;if(window.onload){oldFunc=window.onload;}
window.onload=function(){if(typeof oldFunc==="function"){oldFunc();}
func();};}
function stopEvent(e){if(e.stopPropagation){e.stopPropagation();}else{e.cancelBubble=true;}
if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}}
function getKeyCode(e){var key=0,c=e.charCode;if(c>60000&&(c in safariKeys)){key=safariKeys[c];}else if(!c){key=e.keyCode;}
return key;}
function findTarget(e,type){var el=e.target||e.srcElement;type=type.toUpperCase();while(el&&el.nodeName!==type){el=el.parentNode;}
return el;}
return{on:addEvent,addEvent:addEvent,addWindowLoadEvent:addWindowLoadEvent,stopEvent:stopEvent,getKeyCode:getKeyCode,findTarget:findTarget,removeEvent:removeEvent};})();LMI.Event=function(){this.events={};};LMI.Event.prototype=(function(){var L={registerEvent:function(type){if(typeof this.events[type]!=='undefined'){throw('Attempt to re-register event type: '+type);}else{this.events[type]=[];}},triggerEvent:function(type,evt,obj){if(typeof this.events[type]==='undefined'){throw('Unknown event: '+type);}
if(typeof evt!=='object'||evt===null){evt={};}
evt.eventType=type;for(var i=0;i<this.events[type].length;++i){if(this.events[type][i](evt,obj)===false){return false;}}
return true;},addListener:function(type,callback){if(typeof this.events[type]==='undefined'){throw('attempt to listen to unknown event type: '+type);}else{this.events[type].push(callback);}
return new LMI.Event.Token(null,type,callback);},bind:function(type,obj,func,arg){var f=function(e,o){func.call(obj,e,o,arg);};return this.addListener(type,f);},removeListener:function(type,callback){var t=type,f=callback;if(typeof type.type!=='undefined'&&typeof type.func!=='undefined'){t=type.type;f=type.func;}
if(this.events[t]){for(var i=0;i<this.events[t].length;++i){if(this.events[t][i]===f){this.events[t].splice(i,1);break;}}}},getListeners:function(type){return this.events[type]||[];}};return L;})();LMI.Event.ExportFunctions=(function(){var memberName='__LMIEvents__';return{initEvents:function(){if(!this[memberName]){this[memberName]=new LMI.Event();}
for(var i=0;i<arguments.length;++i){this[memberName].registerEvent(arguments[i]);}},addEventListener:function(type,callback){return this[memberName].addListener(type,callback);},removeEventListener:function(type,callback){return this[memberName].removeListener(type,callback);},bindEvent:function(type,obj,func,arg){return this[memberName].bind(type,obj,func,arg);},triggerEvent:function(type,evt,obj){this[memberName].triggerEvent(type,evt,obj);},getListeners:function(type){return this[memberName].getListeners(type);}};})();LMI.Event.Token=function(e,t,f){this.elem=e;this.type=t;this.func=f;};LMI.LinkBehavior=(function(){var types={};function add(type,func,setup){if(typeof types[type]!='undefined'){throw('attempted to redefine link type "'+type+'"');}else{types[type]=[setup,func];}}
function remove(type){delete types[type];}
function applyTo(node){var tag=node.tagName,a,i,iLen;if(tag&&tag.toUpperCase()=='A'){applyToLink(node);}else{a=node.getElementsByTagName('a');iLen=a.length;for(i=0;i<iLen;i++){applyToLink(a[i]);}}}
function applyToLink(link){var t,r=String(link.getAttribute('rel')).split(' '),i=0,len=r.length;for(;i<len;++i){t=types[r[i]];if(t){if(typeof t[0]==='function'){t[0](link);}
if(typeof t[1]==='function'){YAHOO.util.Event.on(link,'click',t[1]);}}}}
LMI.Init.addFunction(function(){applyTo(document);},70);return{add:add,remove:remove,applyTo:applyTo};})();(function(){var U=LMI.Lang.getObject('LMI.Utils',true);U.stringToObject=function(str){var obj={},sep=(str.match(/^\{(.+?)\}/)?RegExp.$1:"|"),pairs=str.split(sep);for(var i=0;i<pairs.length;++i){var d=pairs[i].indexOf('=');d=(d>=0?d:pairs[i].length-1);var key=pairs[i].substring(0,d);var val=pairs[i].substring(d+1);switch(val){case"true":obj[key]=true;break;case"false":obj[key]=false;break;default:if(val==''+parseFloat(val)){obj[key]=parseFloat(val);}else{obj[key]=val;}}}
return obj;};U.getIcon=function(idx,iconSet,badge){var i=parseInt(idx,10);var s=iconSet;var lets=LMI.Strings.getString('js.letters');var l=(i>=0&&i<lets.length?lets.charAt(i):(badge?'star':'blank'));switch(iconSet){case'blue':s='blue';break;case'green':s='green';break;case'POI':case'special':l=idx;break;default:s='red';}
return LMI.Urls.getImg('map_nodes/'+s+'/map_icon_'+l+'.png');};U.quoteMeta=function(string){return string.replace(/(\W)/g,"\\$1");};})();if(typeof(Ext)==='undefined'){Ext={};}
Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/\S/;var trimRe=/^\s*(.*?)\s*$/;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>]\s?|\s|$)/;var tagTokenRe=/^(#)?([\w-\*\|]+)/;function child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n;}}
n=n.nextSibling;}
return null;};function next(n){while((n=n.nextSibling)&&n.nodeType!=1);return n;};function prev(n){while((n=n.previousSibling)&&n.nodeType!=1);return n;};function clean(d){var n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n);}else{n.nodeIndex=++ni;}
n=nx;}
return this;};function byClassName(c,a,v,re,cn){if(!v){return c;}
var r=[];for(var i=0,ci;ci=c[i];i++){cn=ci.className;if(cn&&(' '+cn+' ').indexOf(v)!=-1){r[r.length]=ci;}}
return r;};function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0];}
if(!n){return null;}
if(attr=="for"){return n.htmlFor;}
if(attr=="class"||attr=="className"){return n.className;}
return n.getAttribute(attr)||n[attr];};function getNodes(ns,mode,tagName){var result=[],cs;if(!ns){return result;}
mode=mode?mode.replace(trimRe,"$1"):"";tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns];}
if(mode!="/"&&mode!=">"){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[result.length]=ci;}}}else{for(var i=0,ni;ni=ns[i];i++){var cn=ni.getElementsByTagName(tagName);for(var j=0,cj;cj=cn[j];j++){if(cj.parentNode==ni){result[result.length]=cj;}}}}
return result;};function concat(a,b){if(b.slice){return a.concat(b);}
for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i];}
return a;}
function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs];}
if(!tagName){return cs;}
var r=[];tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[r.length]=ci;}}
return r;};function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs];}
if(!id){return cs;}
var r=[];for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[r.length]=ci;return r;}}
return r;};function byAttribute(cs,attr,value,op,custom){var r=[],st=custom=="{";var f=Ext.DomQuery.operators[op];for(var i=0;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle(ci,attr);}
else if(attr=="class"||attr=="className"){a=ci.className;}else if(attr=="for"){a=ci.htmlFor;}else if(attr=="href"){a=ci.getAttribute("href",2);}else{a=ci.getAttribute(attr);}
if((f&&f(a,value))||(!f&&a)){r[r.length]=ci;}}
return r;};function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value);};var isIE=window.ActiveXObject?true:false;var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c;}}
for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup");}
return r;}
function nodup(cs){var len,c,i,r=cs,cj;if(cs===null){return[];}
len=cs.length;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs;}
if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs);}
var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d;}else{r=[];for(var j=0;j<i;j++){r[r.length]=cs[j];}
for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[r.length]=cj;}}
return r;}}
return r;}
function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d);}
var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i];}}
for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff");}
return r;}
function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2;}
if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2);}
var d=++key;for(var i=0;i<len1;i++){c1[i]._qdiff=d;}
var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i];}}
return r;}
function gebi(parent,id){var r=parent.getElementById(id);return r&&r.id===id?r:null;}
function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return gebi(d,id);}
ns=getNodes(ns,mode,"*");return byId(ns,null,id);}
return{getStyle:function(el,name){return Ext.fly(el).getStyle(name);},compile:function(path,type){while(path.substr(0,1)=="/"){path=path.substr(1);}
type=type||"select";var fn=["var f = function(root){\n var mode; var n = root || document;\n"];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");';}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");';}
q=q.replace(tm[0],"");}else if(q.substr(0,1)!='@'){fn[fn.length]='n = getNodes(n, mode, "*");';}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");';}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");';}
q=q.replace(tm[0],"");}}
while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i];});q=q.replace(m[0],"");matched=true;break;}}
if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"';}}
if(mm[1]){fn[fn.length]='mode="'+mm[1]+'";';q=q.replace(mm[1],"");}}
fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f;},select:function(path,root,type){if(!root||root==document){root=document;}
if(typeof root=="string"){root=gebi(document,root);}
var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"$1");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector";}}
var result=cache[p](root);if(result&&result!=document){results=results.concat(result);}}
return results;},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0];},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"$1");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select");}
var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.firstChild?n.firstChild.nodeValue:null);return(v===null?defaultValue:v);},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v);},is:function(el,ss){if(typeof el=="string"){el=gebi(document,el);}
var isArray=(el instanceof Array);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0);},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"$1");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple");}
var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result;},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v;},"!=":function(a,v){return a!=v;},"^=":function(a,v){return a&&a.substr(0,v.length)==v;},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v;},"*=":function(a,v){return a&&a.indexOf(v)!==-1;},"%=":function(a,v){return(a%v)==0;}},pseudos:{"first-child":function(c){var r=[],n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1);if(!n){r[r.length]=ci;}}
return r;},"last-child":function(c){var r=[];for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1);if(!n){r[r.length]=ci;}}
return r;},"nth-child":function(c,a){var r=[];if(a!="odd"&&a!="even"){for(var i=0,ci;ci=c[i];i++){var m=child(ci.parentNode,a);if(m==ci){r[r.length]=m;}}
return r;}
var p;for(var i=0,l=c.length;i<l;i++){var cp=c[i].parentNode;if(cp!=p){clean(cp);p=cp;}}
for(var i=0,ci;ci=c[i];i++){var m=false;if(a=="odd"){m=((ci.nodeIndex+1)%2==1);}else if(a=="even"){m=((ci.nodeIndex+1)%2==0);}
if(m){r[r.length]=ci;}}
return r;},"only-child":function(c){var r=[];for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[r.length]=ci;}}
return r;},"empty":function(c){var r=[];for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break;}}
if(empty){r[r.length]=ci;}}
return r;},"contains":function(c,v){var r=[];for(var i=0,ci;ci=c[i];i++){if(ci.innerHTML.indexOf(v)!==-1){r[r.length]=ci;}}
return r;},"nodeValue":function(c,v){var r=[];for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[r.length]=ci;}}
return r;},"checked":function(c){var r=[];for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[r.length]=ci;}}
return r;},"not":function(c,ss){return Ext.DomQuery.filter(c,ss,true);},"odd":function(c){return this["nth-child"](c,"odd");},"even":function(c){return this["nth-child"](c,"even");},"nth":function(c,a){return c[a-1];},"first":function(c){return c[0];},"last":function(c){return c[c.length-1];},"has":function(c,ss){var s=Ext.DomQuery.select;var r=[];for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[r.length]=ci;}}
return r;},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[];for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[r.length]=ci;}}
return r;},"prev":function(c,ss){var is=Ext.DomQuery.is;var r=[];for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[r.length]=ci;}}
return r;}}};}();Ext.query=Ext.DomQuery.select;LMI.Element=function(){var Y=YAHOO.util,$D=Y.Dom,$E=Y.Event;var L={setAttribute:function(el,name,value){switch(name){case'class':case'className':LMI.Lang.forEach(value.split(' '),function(c){$D.addClass(el,c);});break;case'colspan':el.colSpan=value;break;case'src':L.setImageSrc(el,value);break;case'maxlength':el.setAttribute('maxLength',value);break;case'style':if(document.all&&!window.opera){el.style.cssText=value;}else{el.setAttribute(name,value);}
break;default:el.setAttribute(name,value);}},create:function(type,parent,argsObj){var el,evt,prop,o,val,src;argsObj=argsObj||{};type=type||argsObj.tag||argsObj.elType;delete argsObj.elType;delete argsObj.tag;if(type==="text"){el=document.createTextNode(argsObj.textValue||argsObj.text);}else{if(type==='input'&&argsObj.name){try{el=document.createElement("<input type='"+argsObj.type+"' name='"+argsObj.name+"'>");}catch(ex){}}
if(!el){el=type?document.createElement(type):document.createDocumentFragment();}
for(o in argsObj){if(argsObj.hasOwnProperty(o)){switch(o){case'children':LMI.Lang.forEach(argsObj[o],function(o){L.create(null,el,o);});break;case'text':case'textValue':el.appendChild(document.createTextNode(argsObj[o]));break;case'src':src=argsObj[o];break;case'events':case'browserEvents':for(evt in argsObj[o]){if(argsObj[o].hasOwnProperty(evt)){val=argsObj[o][evt];if(YAHOO.lang.isFunction(val)){$E.on(el,evt,val);}else if('fn'in val){prop=[el,evt,val.fn];if('obj'in val){prop.push(val.obj);if('scope'in val){prop.push(val.scope);}}
$E.on.apply($E,prop);}}}
break;default:L.setAttribute(el,o,argsObj[o]);}}}}
if(src){L.setAttribute(el,'src',src);}
if(parent){parent.appendChild(el);}
return el;},getAll:function(){if(YAHOO&&YAHOO.env.getVersion('selector')){return function(selector,root){try{return Y.Selector.query(selector,root);}catch(e){return[];}};}else if(typeof Ext!=='undefined'&&("DomQuery"in Ext)){return function(selector,root){return Ext.DomQuery.select(selector,root);};}
return function(){throw new Error('No selector lib has been loaded');};}(),getOne:function(){if(YAHOO&&YAHOO.env.getVersion('selector')){return function(el,root){if(YAHOO.lang.isString(el)){try{return Y.Selector.query(el,root,true);}catch(e){return null;}}
return el;};}else if(typeof Ext!=='undefined'&&("DomQuery"in Ext)){return function(el,root){if(typeof el==='string'){return Ext.DomQuery.selectNode(el,root);}else{return el;}};}
return function(){throw new Error('No selector lib has been loaded');};}(),findAncestor:function(node,elType,className){var n=elType.toUpperCase(),checkClass=!!className;while((node=node.parentNode)&&(node.nodeName!==n||(checkClass&&!$D.hasClass(node,className)))){}
return node;},getImageSrc:function(img){var loader,filter,ie=YAHOO.env.ua.ie;if(ie&&ie<7){loader="DXImageTransform.Microsoft.AlphaImageLoader";filter=img.filters[loader];if(filter){return filter.src;}else if(img){return img.src;}}else if(img){return img.src;}
return'';},setAlphaImageLoader:function(img,src,sizing){var s=sizing?', sizingMethod="'+sizing+'"':'';img.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+src+'"'+s+')';img.src=LMI.Urls.getImg('pixel_trans.gif');},setImageSrc:function(img,src,sizing){var ie=YAHOO.env.ua.ie;if(ie&&ie<7){if(src.match(/\.png(;|$|\?)/)&&!$D.hasClass(img,'notTransparent')){L.setAlphaImageLoader(img,src,sizing);}else if(img.src!=src){img.src=src;}}else if(img){img.src=src;}},getOffsets:function(el){var xy={x:0,y:0,w:el.offsetWidth,h:el.offsetHeight};while(el){xy.x+=el.offsetLeft;xy.y+=el.offsetTop;el=el.offsetParent;}
return xy;},createImage:function(src,parent,left,top,zIndex,width,height,alt,title){var i,style='position: absolute;';if(typeof left!=='undefined'){style+='left:    '+left+'px;';}
if(typeof top!=='undefined'){style+='top:     '+top+'px;';}
if(typeof zIndex!=='undefined'){style+='z-index: '+zIndex+';';}
i=L.create('img',parent,{galleryImg:'no',style:style,title:(title?title:''),alt:(alt?alt:'')});L.setImageSrc(i,src);if(width!==undefined){i.width=width;}
if(height!==undefined){i.height=height;}
return i;},destroy:function(el){$E.purgeElement(el,true);if(el.parentNode){el.parentNode.removeChild(el);}},truncate:function(el){while(el&&el.firstChild){L.destroy(el.firstChild);}},changeLinkText:function(el,text){if(el&&el.firstChild&&el.firstChild.nodeValue){el.firstChild.nodeValue=text;}},blink:function(el,delay){if(el){if(typeof(el)!=='object'){el=L.getAll(el);}
if(typeof(el)==='object'&&el!==null){if(!el instanceof Array){el=[el];}
LMI.Lang.forEach(el,function(o){var oDisplay=YAHOO.util.Dom.getStyle(o,'display');if(oDisplay){o.style.display='none';if(typeof(delay)!=='undefined'){window.setTimeout(function(){o.style.display=oDisplay;},delay);}else{o.style.display=oDisplay;}}});}}}};return L;}();LMI.StyleSheet=(function(){var L={getStyle:(function(){if(document.defaultView&&document.defaultView.getComputedStyle){return function(el,style){return document.defaultView.getComputedStyle(el,"").getPropertyValue(style);};}else if(document.documentElement.currentStyle){return function(el,style){style=style.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});return el.currentStyle[style];};}else{return function(el,style){style=style.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});return el.style[style];};}})(),setOpacity:function(el,opacity){if(typeof el.style.filter!=='undefined'){el.style.filter='alpha(opacity:'+opacity+')';}else{el.style.opacity=opacity/100;}},setCursor:function(el,cursor){try{el.style.cursor=cursor;}catch(e){if(cursor==='pointer'){el.style.cursor='hand';}}},isClass:function(elem,clazz){if(!elem){return false;}
var attr=elem.className;return(attr&&attr.match('\\b'+clazz+'\\b')==clazz);},addClass:function(elem,clazz){for(var i=1;i<arguments.length;i++){if(!L.isClass(elem,arguments[i])){elem.className=(elem.className?elem.className+' '+arguments[i]:arguments[i]);}}
return elem;},removeClass:function(elem,clazz){elem.className=elem.className.replace(new RegExp('\\b'+clazz+'\\b'),'');},editStyleValue:function(elem,style,value){switch(style){case'cursor':try{elem.style.cursor=value;}catch(e){if(value==='pointer'){elem.style.cursor='hand';}}
break;default:elem.style[style]=value;}}};return L;})();LMI.Strings=(function(){var strings=LMI.Data.strings,debug=LMI.Data.strings_debug;return{setString:function(key,msg){strings[key]=msg;},setStrings:function(msgs){strings=msgs;},setDebug:function(mode){debug=mode;},getString:function(key){var i,l,str='';if(key in strings){str=strings[key];l=arguments.length;for(i=1;i<l;++i){str=str.replace('{'+(i-1)+'}',arguments[i]);}}else if(debug){str="Unknown Message Key: '"+key+"'";}
return str;}};})();function DOMNode(){}
DOMNode.findPrevSibling=function(node,siblingName){var n=siblingName.toUpperCase();for(node=node.previousSibling;node&&node.nodeName!=n;node=node.previousSibling){}
return node;};DOMNode.findNextSibling=function(node,siblingName){var n=siblingName.toUpperCase();for(node=node.nextSibling;node&&node.nodeName!=n;node=node.nextSibling){}
return node;};DOMNode.findAncestor=function(node,ancestorName){var n=ancestorName.toUpperCase();for(node=node.parentNode;node&&node.nodeName!=n;node=node.parentNode){}
return node;};DOMNode.findAncestorByClass=function(node,ancestorName,clazz){var n=ancestorName.toUpperCase();for(node=node.parentNode;node&&(node.nodeName!=n||!YAHOO.util.Dom.hasClass(node,clazz));node=node.parentNode){}
return node;};DOMNode.findFirstTextChild=function(elem){var t,n;if(!elem){return null;}
if(elem.nodeType===3){return elem;}else{for(n=elem.firstChild;n;n=n.nextSibling){t=DOMNode.findFirstTextChild(n);if(t){return t;}}}
return null;};DOMNode.checkAttribute=function(elem,attribute,value){var attr;if(!elem){return false;}
switch(attribute){case'class':attr=elem.className;break;default:attr=elem.getAttribute(attribute);}
return(attr&&attr.match('\\b'+value+'\\b')==value);};DOMNode.appendAfter=function(newEl,sib){if(sib.nextSibling){sib.parentNode.insertBefore(newEl,sib.nextSibling);}else{sib.parentNode.appendChild(newEl);}};DOMNode.getByTagAndClass=function(base,tagname,className){if(arguments.length<3){throw('DOMNode.getByTagAndClass: insufficient number of arguments');}
return LMI.Lang.filter(base.getElementsByTagName(tagname),(className?function(o){return YAHOO.util.Dom.hasClass(o,className);}:function(){return true;}));};LMI.DropDown=(function(){var Y=YAHOO.util,$E=Y.Event;var dropdowns=[],globalEventsInited=false,hilited=/\bhilite\b/,keys={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 bodyClickHandler(e){var i,len,el;el=$E.getTarget(e);for(i=0,len=dropdowns.length;i<len;++i){dropdowns[i].hideIfUnrelated(el);}}
function initGlobalEvents(){if(!globalEventsInited){globalEventsInited=true;$E.on(document.body,'click',bodyClickHandler);}}
function appendChild(newNode,relatedNode){relatedNode.appendChild(newNode);}
function appendAfter(newNode,relatedNode){var el=relatedNode.nextSibling;if(el){el.parentNode.insertBefore(newNode,el);}else{relatedNode.parentNode.appendChild(newNode);}}
function addElement(relatedNode,type,className,text,strat){var el=document.createElement(type);strat=strat||appendChild;if(className){el.className=className;}
if(text){el.appendChild(document.createTextNode(text));}
strat(el,relatedNode);return el;}
function DropDown(id,options){this.init(id,options);}
DropDown.prototype={init:function(id,options){this.id=id;this.options=options||{};this.textbox=document.getElementById(id);if(!this.textbox||this.textbox.id!==id){throw new TypeError('DropDown: unable to find textbox with id "'+id+'"');}
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();dropdowns.push(this);initGlobalEvents();},isShown:function(){return this.container.style.display==='block';},syncShim:function(){var c,s;if(this.shim){c=this.container;s=this.shim;s.style.top=c.style.top;s.style.left=c.style.left;s.style.display=c.style.display;s.style.width=c.offsetWidth+'px';s.style.height=c.offsetHeight+'px';}},showMenu:function(){var c=this.container,t=this.textbox;c.style.top=t.offsetTop+t.offsetHeight+'px';c.style.left='0px';c.style.display='block';this.syncShim();},hideMenu:function(){this.container.style.display='none';this.syncShim();},hideIfUnrelated:function(el){if(el===this.textbox||el===this.arrow){return;}
while(el&&!(el.nodeName==='DIV'&&el.className.match(/\bLMIDropDown\b/))){el=el.parentNode;}
if(!el){this.hideMenu();}},toggleMenu:function(){if(this.isShown()){this.hideMenu();}else{this.showMenu();}},addArrow:function(){if('arrowSrc'in this.options){this.arrow=addElement(this.textbox.parentNode,'img','LMIDDArrow');this.arrow.src=this.options.arrowSrc;this.arrow.style.top='0px';}},createMenu:function(){this.container=addElement(this.textbox.parentNode,'div','LMIDropDown');this.container.id='LMIDD_'+this.id;this.shadow=addElement(this.container,'div','LMIDDShadow');this.menu=addElement(this.container,'div','LMIDDMenu');this.list=addElement(this.menu,'dl','LMIDDList');if(document.all&&!window.opera){this.shim=addElement(this.textbox.parentNode,'iframe','LMIDDShim');this.shim.src='javascript:false';}},addSection:function(id,heading,options){var dt;options=options||{};if(this.sections[id]){throw new Error('section "'+id+'" already exists');}
this.lastSection=id;if(heading){if(typeof heading==='string'){dt=addElement(this.list,'dt',id);addElement(dt,'span','',heading);}
if('hint'in options){if(typeof options.hint==='string'){addElement(dt,'span','hint',options.hint);}else{if(!options.hint.className.match(/\bhint\b/)){options.hint.className+=' hint';}
dt.appendChild(options.hint);}}}
this.sections[id]={header:dt,items:[]};},addLink:function(el){var dd;dd=addElement(this.list,'dd');dd.appendChild(el);},clearSection:function(id,removeHeading){var i,len,items,section=this.sections[id];if(section){items=section.items;for(i=0,len=items.length;i<len;++i){items[i].element.parentNode.removeChild(items[i].element);items[i]=null;}
section.items=[];}},addItem:function(display,section,options,hint){var node,sec,strat,item={display:display,options:options};if(display){section=section||this.lastSection;if(!this.sections[section]){this.addSection(section);}
sec=this.sections[section];if(sec.items.length){node=sec.items[sec.items.length-1].element;strat=appendAfter;}else if(sec.header){node=sec.header;strat=appendAfter;}else{node=this.list;}
item.type=section;item.element=addElement(node,'dd',section,display,strat);sec.items.push(item);if(options&&'selected'in options&&options.selected){this.selectItem(section,sec.items.length-1);}}},selectItem:function(section,index){this.selected=this.sections[section].items[index];this.textbox.value=this.selected.display;this.hideMenu();this.textbox.focus();this.eventHandler('select',this.selected);},hiliteItem:function(section,index){var item=this.sections[section].items[index];this.hilited=[section,index];if(!hilited.test(item.element.className)){item.element.className+=' hilite';}},unhiliteItem:function(section,index){var item;if(this.hilited){if(!section||!index){section=this.hilited[0];index=this.hilited[1];}
item=this.sections[section].items[index];this.hilited=null;if(item){item.element.className=item.element.className.replace(hilited,'');}}},previous:function(){var element,item,dds,hilited=this.hilited;if(hilited){this.unhiliteItem(hilited[0],hilited[1]);element=this.sections[hilited[0]].items[hilited[1]].element.previousSibling;while(element&&element.nodeName!=='DD'){element=element.previousSibling;}}
if(!element){dds=this.list.getElementsByTagName('dd');if(dds.length){element=dds[dds.length-1];}}
if(element){item=this.getItemByElement(element);if(item){this.hiliteItem(item[0],item[1]);}}},next:function(){var element,item,hilited=this.hilited;if(hilited){this.unhiliteItem();element=this.sections[hilited[0]].items[hilited[1]].element.nextSibling;while(element&&element.nodeName!=='DD'){element=element.nextSibling;}}
if(!element){element=this.list.getElementsByTagName('dd')[0];}
if(element){item=this.getItemByElement(element);if(item){this.hiliteItem(item[0],item[1]);}}},getItemByElement:function(el){var i,len,items,sec=el.className.split(' ')[0],section=this.sections[sec];if(section){items=section.items;for(i=0,len=items.length;i<len;++i){if(items[i].element===el){return[sec,i];}}}
return null;},mouseHandler:function(e){var target=$E.getTarget(e);if(target){target=this.getItemByElement(target);if(target){if(e.type==='click'){this.selectItem(target[0],target[1]);}else if(e.type==='mouseover'){this.hiliteItem(target[0],target[1]);}else{this.unhiliteItem(target[0],target[1]);}}}},keyHandler:function(e){var k=$E.getCharCode(e);if(k===keys.enter||e.charCode===keys.enter||k===keys.right||k===keys.tab){if(this.isShown()&&this.hilited){this.selectItem(this.hilited[0],this.hilited[1]);if(k===keys.enter||e.charCode===keys.enter){LMI.DropDown.highlightEnter=true;}
$E.stopEvent(e);}else{this.hideMenu();LMI.DropDown.highlightEnter=false;}}else if(e.type==='keydown'){switch(k){case keys.up:this.showMenu();this.previous();$E.stopEvent(e);break;case keys.down:this.showMenu();this.next();$E.stopEvent(e);break;case keys.tab:this.hideMenu();break;}}else if(this.selected&&this.selected.display!=this.textbox.value){this.selected=null;}},addEventListeners:function(){var that=this;this._fieldClickHandler=function(){that.textbox.focus();that.toggleMenu();};this._keyHandler=function(e){that.keyHandler(e||window.event);};this._mouseHandler=function(e){that.mouseHandler(e||window.event);};if(this.arrow){$E.on(this.arrow,'click',this._fieldClickHandler);}
$E.on(this.textbox,'click',this._fieldClickHandler);$E.on(this.textbox,'keydown',this._keyHandler);$E.on(this.textbox,'keypress',this._keyHandler);$E.on(this.menu,'click',this._mouseHandler);$E.on(this.menu,'mouseover',this._mouseHandler);$E.on(this.menu,'mouseout',this._mouseHandler);},eventHandler:function(type,e){var i,len,h;if(type in this.eventHandlers){h=this.eventHandlers[type];for(i=0,len=h.length;i<len;++i){h[i].call(this,e);}}},addEventHandler:function(type,func){var that=this;if(!this['_'+type+'Handler']){this['_'+type+'Handler']=function(e){that.eventHandler(type,e||window.event);};if(type!=='select'){$E.on(this.textbox,type,this['_'+type+'Handler']);}}
if(!(type in this.eventHandlers)){this.eventHandlers[type]=[];}
this.eventHandlers[type].push(func);},addSubmitHandler:function(func){var that=this;if(!this._submitHandler){this._submitHandler=function(e){that.eventHandler('submit',e||window.event);};$E.on(this.textbox.form,'submit',this._submitHandler);}
if(!('submit'in this.eventHandlers)){this.eventHandlers.submit=[];}
this.eventHandlers.submit.push(func);},addModule:function(module){var i,len,ev,eventTypes=['keyup','focus','blur','select'];for(i=0,len=eventTypes.length;i<len;++i){ev=eventTypes[i]+'Handler';if(ev in module){this.addEventHandler(eventTypes[i],module[ev]);}}
if('submitHandler'in module){this.addSubmitHandler(module.submitHandler);}
if('methods'in module){for(i in module.methods){if(module.methods.hasOwnProperty(i)){this[i]=module.methods[i];}}}}};DropDown.getById=function(id){var i=0,len=dropdowns.length;for(;i<len;++i){if(dropdowns[i].id===id){return dropdowns[i];}}
return null;};DropDown.highlightEnter=false;return DropDown;})();LMI.DropDown.Suggest=(function(){function S(){};S.prototype={minLength:2,suggestUrl:LMI.Data.Urls.suggest,openOnSuggest:true,focused:false,getSuggestions:function(inp,callback){var url=this.suggestUrl+'?query='+encodeURIComponent(inp);LMI.XHR.makeXHRRequest(url,'get',callback);},getSuggestCallback:function(obj,id){var that=this;return function(data){var i,len;if(that.focused&&obj.suggest_requestId===id){obj.unhiliteItem();obj.clearSection('suggest');for(i=0,len=data.length;i<len;++i){obj.addItem(data[i].key,'suggest');}
if(that.openOnSuggest&&data.length>0&&(!obj.selected||obj.selected.display!=obj.textbox.value)){obj.showMenu();}}};},getModule:function(){var that=this;return{keyupHandler:function(){var inp=this.textbox.value;if(inp.length<that.minLength){this.clearSection('suggest');this.suggest_prevSearch='';}else if(inp!==this.suggest_prevSearch){this.suggest_requestId=new Date().getTime().toString().substring(4);this.suggest_prevSearch=this.textbox.value;that.getSuggestions(this.textbox.value,that.getSuggestCallback(this,this.suggest_requestId));}},focusHandler:function(){that.focused=true;},blurHandler:function(){that.focused=false;}};}};var o=new S();S.keyupHandler=o.getModule().keyupHandler;S.focusHandler=o.getModule().focusHandler;S.blurHandler=o.getModule().blurHandler;return S;})();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.Form=function(){this.action='';this.params={};this.method='post';this.postCallback=null;this.noRefreshUrl='';};LMI.Form.prototype=(function(){return{getAction:function(){return this.action;},setAction:function(a){this.action=this.parseUrl(a);},getMethod:function(){return this.method;},setMethod:function(m){this.method=m;},setPostCallback:function(callback){this.postCallback=callback;},removeVar:function(name){if(this.params[name]){delete this.params[name];}},setVar:function(name,val,append,remove){var added=0;if(!this.params[name]){this.params[name]=[];}
if(val===null){val='';}
var cur=-1;for(var i=0;i<this.params[name].length;++i){if(this.params[name][i]==val){cur=i;}}
if(cur>-1){if(remove){this.params[name].splice(cur,1);if(this.params[name].length===0){delete this.params[name];}
return;}}
if(!append){this.params[name]=[];this.params[name].push(val);}
added++;if(append||!added){this.params[name].push(val);}},getVar:function(name){return(this.params[name]?this.params[name]:[]);},SUBMIT_NORMAL:0,SUBMIT_NOREFRESH:1,SUBMIT_SESSION:2,createForm:function(submitType){var body=document.getElementsByTagName('body')[0],f=LMI.Element.create('form',body,{action:this.action,method:this.method,style:'display:none;position:absolute;top:-4000px;width:0;height:0'});for(var i in this.params){if(this.params.hasOwnProperty(i)){for(var j=0;j<this.params[i].length;++j){if(submitType===this.SUBMIT_NOREFRESH){this.noRefreshUrl+=i+"="+this.params[i][j]+"&";}else{LMI.Element.create('input',f,{name:i,value:this.params[i][j],style:'display:none;'});}}}}
return f;},submit:function(submitType){var f=this.createForm(submitType);if(submitType==this.SUBMIT_NOREFRESH){var img=document.createElement('img');img.src=this.action+";jsessionid="+LMI.Lang.getObject("LMI.Data.state.sessionId")+"?"+this.noRefreshUrl+"noresponse=1";return img.src;}else if(submitType==this.SUBMIT_SESSION){f.action=this.action+";jsessionid="+LMI.Lang.getObject("LMI.Data.state.sessionId");f.submit();}else{f.submit();}
return f;},go:function(action,submitType){var frag;for(var i=2;i<arguments.length;i++){if(arguments[i]=='#'){frag=arguments[++i];continue;}
this.setVar(arguments[i],arguments[++i]);}
if(action){this.setAction(frag?action+'#'+frag:action);}
this.submit(submitType);return false;},postUrl:function(url,allowDups){var location=this.parseUrl(url,allowDups);if(this.postCallback){location=this.postCallback(location);}
this.go(location);},parseUrl:function(url,allowDups){var u=new LMI.Url(url);var location=u.getLocation();var ps=u.getParamString();if(ps){location+=';'+ps;}
var keys=u.getQueryNames();for(var i=0;i<keys.length;++i){var v=u.getQueryValues(keys[i]);for(var j=0;j<v.length;++j){this.setVar(keys[i],v[j],allowDups,false);}}
return location;},postLink:function(link,allowDups){this.postUrl(link.href,allowDups);},copy:function(form){if(form.action){this.setAction(form.action);}
var dsform=this;LMI.Lang.forEach(form.elements,function(o){dsform.setVar(o.name,o.value);});}};})();function PostLink(evt){return LMI.Data.form.postLink(YAHOO.util.Event.getTarget(evt));}
LMI.LinkBehavior.add('post',PostLink);LMI.LinkBehavior.add('langSwitch',function(e){var mf="mfinfo.linktype=switchlanguage-"+LMI.Data.state.locale+"-"+this.className+"&mfinfo.linkplace=topscreen.text";PostLink(e);});LMI.PrettyUrlEncoder=function(url){url=url.replace(/\\/g,'');url=url.replace(/%/g,'%25');url=url.replace(/-/g,'--');url=url.replace(/_/g,'-_');url=url.replace(/#/g,'%23');url=url.replace(/ /g,'_');url=url.replace(/\//g,'%2f');url=url.replace(/\?/g,'%3f');url=url.replace(/\&/g,'%26');return url;};LMI.Urls.switchSite=function(path){var base=(LMI.Lang.getObject('LMI.Data.pageType')==='white'?LMI.Data.yellowUrl:LMI.Data.whiteUrl)+'/'+path+'?visitorUid='+LMI.Lang.getObject("LMI.Data.state.visitorVO.uid")+'&passwordToken='+LMI.Lang.getObject("LMI.Data.state.visitorVO.passwordToken")+'&newSession=true';return LMI.Urls.get('switchsite.ds?url='+base);};LMI.Init.addFunction(function(){var key,D=LMI.Data,H=D.requestHiddens;function addHidden(key,hidden){if(hidden instanceof Array){for(var i=0;i<hidden.length;++i){D.form.setVar(key,hidden[i],true);}}else{D.form.setVar(key,hidden,true);}}
D.form=new LMI.Form();for(key in H){addHidden(key,H[key]);}
H=LMI.Data.sessionHiddens;for(key in H){addHidden(key,H[key]);}});function HelpOpenWindow(evt){var e=YAHOO.util.Event.getTarget(evt),url=e.href,body=LMI.Element.getOne('body'),w=body.offsetWidth*.75,h=window.open(url,'helpWindow','location=no,scrollbars=yes,toolbar=yes,resizable=yes,width='+w);h.moveTo(self.screen.width/4,0);YAHOO.util.Event.stopEvent(evt);return false;}
LMI.LinkBehavior.add('help_popup',HelpOpenWindow);LMI.SearchForm=(function(){var Y=YAHOO.util,$D=Y.Dom,$E=Y.Event,_E=LMI.Element,$=_E.getOne,$$=_E.getAll,options={arrowSrc:LMI.Data.Urls.ddArrow};L={elemExists:function(id){var d=document.getElementById(id);return d&&d.id===id;},merge:function(o1,o2){for(var p in o2){if(!(p in o1)){o1[p]=o2[p];}}},createWhatDropdown:function(id,opts){var a;opts=opts||{};L.merge(opts,{suggest:true,recent:true});if(L.elemExists(id)){var what=new LMI.DropDown(id,options);a=L.getClearLink(what,LMI.Data.Urls.removeSearches,LMI.Strings.getString('js.links.removerecentsearches'));if(opts.suggest){what.addSection('suggest',LMI.Strings.getString('js.dropdown.suggestions'));what.addModule((new LMI.DropDown.Suggest()).getModule());}
if(opts.recent){what.addSection('recent',LMI.Strings.getString('js.titles.recent'));LMI.Lang.forEach(LMI.Data.recentSearches,function(r){what.addItem(r.searchTerms,'recent');});}
what.addLink(a);}},createWhereDropdown:function(id,opts){var i,len,where,a,suggest,D=LMI.Data,v=D.state.visitorVO,l=D.recentLocations;opts=opts||{};L.merge(opts,{suggest:false,recent:true,saved:true});if(L.elemExists(id)){var where=new LMI.DropDown(id,options);if(opts.suggest){suggest=new LMI.DropDown.Suggest();suggest.suggestUrl=opts.suggestUrl;where.addSection('suggest',LMI.Strings.getString('js.dropdown.suggestions'));where.addModule(suggest.getModule());}
if(opts.recent){a=L.getClearLink(where,D.Urls.removeLocations,LMI.Strings.getString('js.links.removerecentlocs'));where.addSection('recent',LMI.Strings.getString('js.titles.recentlocs'));if(l){for(i in l){if(l.hasOwnProperty(i)){where.addItem(l[i].locationValue,'recent');}}}
where.addLink(a);}}},getClearFunc:function(dd,a,url){return function(evt){var e=evt||window.event;LMI.MinEvents.stopEvent(e);(document.createElement('img')).src=url+";jsessionid="+LMI.Data.state.sessionId+"?"+"noresponse=1";dd.clearSection('recent');};},getClearLink:function(dd,url,textValue){var a=document.createElement('a');a.href='#';a.className='link';LMI.MinEvents.addEvent(a,'click',L.getClearFunc(dd,a,url));a.appendChild(document.createTextNode(textValue));return a;},prettifyWWUrl:function(evt){var what,where,what2,where2;if(!LMI.DropDown.highlightEnter){var advs=$('#advancedSearch');if(advs.value!='true'){$E.stopEvent(evt);if(!this.where&&!this.what&&$('#wwForm2')){this.where=$('#where2');this.what=$('#what2');}
where=this.where.value?LMI.PrettyUrlEncoder(this.where.value)+'/':'';what=this.what.value?LMI.PrettyUrlEncoder(this.what.value+'.html'):'';this.action=this.action.replace('search.ds',LMI.Strings.getString('js.search.category.prefix')+'/'+where+what);window.location=this.action;}}
else{LMI.DropDown.highlightEnter=false;$E.stopEvent(evt);}},initForm:function(form){var a,w;if(!form){return;}
a=$('#advSearch');if(a&&!arguments.callee.advInited){$E.on(a,'click',L.toggleAdvancedSearch);arguments.callee.advInited=true;}},showSearchPopup:function(e){if(!arguments.callee.alpha){arguments.callee.alpha="abcdefghijklmnopqrstuvwxyz".split('');}
L.hideAllSearch();var type,src,hdrKey;if($D.hasClass(this,'catLink')){type='what';src=LMI.Urls.get('displaystatic.ds?page=categories')+'&key='+($D.hasClass(this,'catDl')?'categoryTxt':'what');hdrKey='js.selectcat';}else if($D.hasClass(this,'countyLink')){type='where';src=LMI.Urls.get('displaystatic.ds')+'?page=mapRegion'+($D.hasClass(this,'catDl')?'&key=provinceTxt':'&key='+$('input',this.parentNode).id);hdrKey='js.selectreg';}else if($D.hasClass(this,'communityLink')){type='community';src=LMI.Urls.get('displaystatic.ds')+'?page=communityList'+($D.hasClass(this,'catDl')?'&key=catCommunityTxt':'');hdrKey='js.selectcomm';}else{return;}
var form=DOMNode.findAncestor(this,'form');var d=$('div.'+type+'Input',form);if(d&&!$D.hasClass(d,type+'TabOn')){$D.addClass(d,type+'TabOn');d=$('div.search',form);if(!!YAHOO.env.ua.ie){_E.create('iframe',d,{id:type+'Shim',src:'javascript:void(0)','class':'ifrShim',style:'filter:alpha(opacity=0);padding:0;margin:0;'});}
d=_E.create('div',_E.create('div',d,{id:type+'Tab'}),{id:type+'TabContent'});_E.create('a',d,{text:LMI.Strings.getString('js.close'),className:'close','href':'javascript:void(0)',events:{click:L.hideAllSearch}});_E.create('h3',d,{text:LMI.Strings.getString(hdrKey)});var ul=_E.create('ul',d);if(d.insertAdjacentHTML){d.insertAdjacentHTML('beforeEnd','<iframe name="ifr" id="ifr" src="'+src+'" marginwidth="0" marginheight="0" frameborder="0" border="0"></iframe>');}else{_E.create('iframe',d,{name:'ifr',id:'ifr',src:src,frameborder:0,marginwidth:0,marginheight:0});}
if(type==='what'||type==='community'){for(var i=0;i<arguments.callee.alpha.length;++i){var a=_E.create('a',_E.create('li',ul),{text:arguments.callee.alpha[i].toUpperCase(),target:'ifr',href:src+'&letter='+arguments.callee.alpha[i],events:{click:L.catLinkActivate}});if(i===0){$D.addClass(a,'on');$D.addClass(a.parentNode,'firstChild');}}}}
$E.stopEvent(e);},hideAllSearch:function(){var types=['what','where','community'],d,form,f;LMI.Lang.forEach(types,function(t){d=$("#"+t+'Tab');if(d){form=DOMNode.findAncestor(d,'form');f=_E.getAll('iframe.ifrShim',form);LMI.Lang.forEach(f,function(o){o.parentNode.removeChild(o);});d.parentNode.removeChild(d);$D.removeClass($('div.'+t+'Input',form),t+'TabOn');}});},catLinkActivate:function(evt){var ul=DOMNode.findAncestor(this,'ul');if(ul){LMI.Lang.forEach(_E.getAll('a.on',ul),function(o){$D.removeClass(o,'on');});}
$D.addClass(this,'on');},toggleAdvancedSearch:function(e){var advs,img=new Image(),imgUrl=LMI.Urls.get('/updatepreference.ds'),cont=$D.getAncestorByClassName(this,'advSearchFormCont');if(cont){advs=$('#advancedSearch');L.hideAllSearch();if($D.hasClass(cont,'advSearchOpen')){L.showSimpleSearch(this,cont);advs.value='false';imgUrl+="?advancedSearch=false&r="+Math.round(Math.random()*1000);img.src=imgUrl;}else{L.showAdvancedSearch(this,cont);advs.value='true';imgUrl+="?advancedSearch=true&r="+Math.round(Math.random()*1000);img.src=imgUrl;}}},showAdvancedSearch:function(target,cont){target.firstChild.nodeValue=LMI.Strings.getString('js.search.simple');if((d=$('#mapImage'))&&d.currentStyle){var o=d.currentStyle.display;d.style.display='none';d.style.display=o;}
window.setTimeout(function(){$D.addClass(cont,'advSearchOpen');},0);},showSimpleSearch:function(target,cont){target.firstChild.nodeValue=LMI.Strings.getString('js.search.advanced');window.setTimeout(function(){$D.removeClass(cont,'advSearchOpen');},0);},alwaysSubmitOnEnter:function(e){if(e.keyCode==DSDropDown.KEY_ENTER){return false;}}};LMI.Init.addFunction(function(){var d,f,whereSuggestUrl=LMI.Data.Urls.whereSuggest;if(!(LMI.Data.pageName==='home'&&LMI.Data.pageType==='white')){L.createWhatDropdown("what");}else{L.createWhatDropdown("what",{suggest:false});}
L.createWhereDropdown("where",{suggest:true,suggestUrl:whereSuggestUrl});d=$('#wwForm');if(d){$E.on(d,'submit',L.prettifyWWUrl);}
f=$('#wwForm2');if(f){$E.on(f,'submit',L.prettifyWWUrl);}
L.initForm($('#searchFormTop'));LMI.Lang.forEach(_E.getAll('form.withPopups'),function(o){L.initForm(o);});if(LMI.Data.pageName==='home'){d=$('#what');if(d){d.focus();}}});return L;})();function DSCollection(){this.init();}
DSCollection.prototype.init=function(){this.collection=[];};DSCollection.prototype.getLength=function(){return this.collection.length;};DSCollection.prototype.getByIndex=function(i){return this.collection[i];};DSCollection.prototype.push=function(){for(var i=0;i<arguments.length;++i){this.collection.push(arguments[i]);}};DSCollection.prototype.remove=function(index){this.collection.splice(index,1);};function DSIterator(collection){this.pos=0;this.collection=collection;}
DSIterator.prototype.hasNext=function(){return this.pos<this.collection.getLength();};DSIterator.prototype.next=function(){if(this.hasNext()){return this.collection.getByIndex(this.pos++);}
var undef;return undef;};function DSInteraction(){}
DSInteraction.Drag=function(el,options){this.init(el,options);};LMI.Lang.importFunctions(DSInteraction.Drag,LMI.Event);DSInteraction.Drag.prototype.init=function(el,options){this.element=el;this.options=options||{};if(YAHOO.env.ua.ie){document.body.ondrag=function(){return false;};}
this.handle=this.options.handle||this.element;this.initEvents('startDrag','drag','endDrag');this.elStartLeft=this.elStartTop=null;this.startX=0;this.startY=0;if(!this.options.disable){this.enable();}};DSInteraction.Drag.prototype.enable=function(){if(!this.enabled){this.enabled=true;YAHOO.util.Event.on(this.handle,'mousedown',this.startDrag,this,true);}};DSInteraction.Drag.prototype.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(this.handle,'mousedown',this.startDrag,this,true);this.enabled=false;}};DSInteraction.Drag.prototype.getEventObject=function(){return{clickStartPosition:{x:this.startX,y:this.startY},elementCurrentPosition:{x:this.getElementLeft(),y:this.getElementTop()},elementStartPosition:{x:this.elStartLeft,y:this.elStartTop}};};DSInteraction.Drag.prototype.getElementLeft=function(){return parseInt(YAHOO.util.Dom.getStyle(this.element,'left'),10);};DSInteraction.Drag.prototype.getElementTop=function(){return parseInt(YAHOO.util.Dom.getStyle(this.element,'top'),10);};DSInteraction.Drag.prototype.startDrag=function(e){var button=e.which||e.button;if(button===1){this.startX=YAHOO.util.Event.getPageX(e);this.startY=YAHOO.util.Event.getPageY(e);this.originalPos=YAHOO.util.Dom.getStyle(this.element,'position');if(this.originalPos!='absolute'){var offsets=LMI.Element.getOffsets(this.element);this.element.style.position='absolute';this.element.style.top=offsets.y+'px';this.element.style.left=offsets.x+'px';}
this.elStartLeft=this.getElementLeft();this.elStartTop=this.getElementTop();YAHOO.util.Event.removeListener(document,'mousemove',this.drag,this,true);YAHOO.util.Event.removeListener(document,'mouseup',this.endDrag,this,true);YAHOO.util.Event.on(document,'mousemove',this.drag,this,true);YAHOO.util.Event.on(document,'mouseup',this.endDrag,this,true);YAHOO.util.Event.on(window,'mouseout',this.endDrag,this,true);this.triggerEvent('startDrag',this.getEventObject(),this);YAHOO.util.Event.stopEvent(e);}};DSInteraction.Drag.prototype.endDrag=function(e){if(e.type!='mouseout'||!YAHOO.util.Event.getRelatedTarget(e)){YAHOO.util.Event.removeListener(document,'mousemove',this.drag);YAHOO.util.Event.removeListener(document,'mouseup',this.endDrag);YAHOO.util.Event.removeListener(window,'mouseout',this.endDrag);var o=this.getEventObject();o.clickEndPosition={x:YAHOO.util.Event.getPageX(e),y:YAHOO.util.Event.getPageY(e)};o.elementEndPosition={x:this.getElementLeft(),y:this.getElementTop()};this.startX=0;this.startY=0;if(this.originalPos!='absolute'){this.element.style.position=this.originalPos;}
this.triggerEvent('endDrag',o,this);}};DSInteraction.Drag.prototype.drag=function(e){if(!this.options.lockX){var x=YAHOO.util.Event.getPageX(e);var newx=this.elStartLeft-(this.startX-x);if(this.options.maxX&&newx>this.options.maxX){newx=this.options.maxX;}else if(this.options.minX&&newx<this.options.minX){newx=this.options.minX;}
this.element.style.left=newx+'px';}
if(!this.options.lockY){var y=YAHOO.util.Event.getPageY(e);var newy=this.elStartTop-(this.startY-y);if(this.options.maxY&&newy>this.options.maxY){newy=this.options.maxY;}else if(this.options.minY&&newy<this.options.minY){newy=this.options.minY;}
this.element.style.top=newy+'px';}
this.triggerEvent('drag',this.getEventObject(),this);YAHOO.util.Event.stopEvent(e);};(function(){var Y=YAHOO.util,$E=Y.Event;function collapseCategories(lnk,dv){if(lnk.className==="lnkCatCollapsed"){document.getElementById(dv).style.display="block";lnk.innerHTML=LMI.Strings.getString('js.home.links.fewerCategories');lnk.className="lnkCatExpanded";}
else{document.getElementById(dv).style.display="none";lnk.innerHTML=LMI.Strings.getString('js.home.links.moreCategories');lnk.className="lnkCatCollapsed";}}
LMI.Init.addFunction(function(){var img=new Image(),imgUrl=LMI.Urls.get('/updatepreference.ds')+"?advancedSearch=false&r="+Math.round(Math.random()*1000);img.src=imgUrl;$E.on('moreCatLink','click',function(e){collapseCategories(this,'popCategories');$E.preventDefault(e);});});})();
