function addEvent(n,t,i){n&&(n.attachEvent?n.attachEvent("on"+t,i):n.addEventListener?n.addEventListener(t,i,!0):n["on"+t]=i)}function removeEvent(n,t,i){n.detachEvent?n.detachEvent("on"+t,i):n.removeEventListener?n.removeEventListener(t,i,!0):n["on"+t]=null}function stopEvent(n){return n||window.event,n.stopPropagation?(n.stopPropagation(),n.preventDefault()):typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0,n.returnValue=!1),!1}function getElement(n){return window.event?window.event.srcElement:n.currentTarget}function getTargetElement(n){return window.event?window.event.srcElement:n.target}function stopSelect(n){typeof n.onselectstart!="undefined"&&addEvent(n,"selectstart",function(){return!1})}function getCaretEnd(n){var i,t,r;if(typeof n.selectionEnd!="undefined")return n.selectionEnd;if(document.selection&&document.selection.createRange){i=document.selection.createRange();try{t=i.duplicate();t.moveToElementText(n)}catch(u){t=n.createTextRange()}return(t.setEndPoint("EndToEnd",i),r=t.text.length,r>n.value.length)?-1:r}}function getCaretStart(n){var i,t,r;if(typeof n.selectionStart!="undefined")return n.selectionStart;if(document.selection&&document.selection.createRange){i=document.selection.createRange();try{t=i.duplicate();t.moveToElementText(n)}catch(u){t=n.createTextRange()}return(t.setEndPoint("EndToStart",i),r=t.text.length,r>n.value.length)?-1:r}}function setCaret(n,t){n.focus();n.setSelectionRange?n.setSelectionRange(t,t):n.createTextRange&&(m=n.createTextRange(),m.moveStart("character",t),m.collapse(),m.select())}function setSelection(n,t,i){n.focus();n.setSelectionRange?n.setSelectionRange(t,i):n.createTextRange&&(m=n.createTextRange(),m.moveStart("character",t),m.moveEnd("character",i),m.select())}function curTop(n){for(toreturn=0;n;)toreturn+=n.offsetTop,n=n.offsetParent;return toreturn}function curLeft(n){for(toreturn=0;n;)toreturn+=n.offsetLeft,n=n.offsetParent;return toreturn}function curRight(n){for(toreturn=n.offsetWidth;n;)toreturn+=n.offsetLeft,n=n.offsetParent;return toreturn}function isNumber(n){return typeof n=="number"&&isFinite(n)}function replaceHTML(n,t){while(el=n.childNodes[0])n.removeChild(el);n.appendChild(document.createTextNode(t))}function FadeInImage(n){if(n!=null){var i;if(n.style.opacity)i=n.style.opacity*100;else if(n.filters.alpha.opacity)i=n.filters.alpha.opacity;else return;i+=10;i>99&&(i=100);n.style.opacity?n.style.opacity=i/100:n.filters.alpha&&(n.filters.alpha.opacity=i);m=n;t=setTimeout("FadeInImage(m);",3)}}function InitFading(n){n.filters?n.style.filter="Alpha(Opacity=30)":n.style.opacity=.3}function FadeOutImage(n){if(n!=null)if(window.t&&clearTimeout(t),n.style.opacity)n.style.opacity=.3;else if(n.filters.alpha)n.filters.alpha.opacity=30;else return}function ValidateEmailAddress(n){if(n==null)return!1;var t=new RegExp("^(\\w+[\\.-]{0,1})*\\w+@(\\w+[\\.-]{0,1})*\\w+$");return t.test(n)}function ltrim(n){for(var t=0;t<n.length&&isWhitespace(n.charAt(t));t++);return n.substring(t,n.length)}function rtrim(n){for(var t=n.length-1;t>=0&&isWhitespace(n.charAt(t));t--);return n.substring(0,t+1)}function trim(n){return ltrim(rtrim(n))}function isWhitespace(n){return" \t\n\r\f".indexOf(n)!=-1}function getViewportHeight(){return window.innerHeight!=window.undefined?window.innerHeight:document.compatMode=="CSS1Compat"?document.documentElement.clientHeight:document.body?document.body.clientHeight:window.undefined}function getViewportWidth(){return window.innerWidth!=window.undefined?window.innerWidth:document.compatMode=="CSS1Compat"?document.documentElement.clientWidth:document.body?document.body.clientWidth:void 0}function getScrollTop(){return self.pageYOffset?self.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body?document.body.scrollTop:void 0}function getScrollLeft(){return self.pageXOffset?self.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body?document.body.scrollLeft:void 0}function actb(n,t){function bt(){addEvent(document,"keydown",wt);addEvent(f,"blur",et);addEvent(document,"keypress",pt)}function et(n){n||(n=event);removeEvent(document,"keydown",wt);removeEvent(f,"blur",et);removeEvent(document,"keypress",pt);y()}function ot(n){var r,e,i,t,h,o;for(u.actb_delimiter.length>0?(r=s[p].trim().addslashes(),e=s[p].trim().length):(r=f.value.addslashes(),e=f.value.length),i="",h=u.actb_firstText?new RegExp("^"+r,"i"):new RegExp(r,"i"),o=n.search(h),t=0;t<o;t++)i+=n.substr(t,1);for(i+="<font style='"+u.actb_hStyle+"'>",t=o;t<e+o;t++)i+=n.substr(t,1);for(i+="<\/font>",t=e+o;t<n.length;t++)i+=n.substr(t,1);return i}function kt(){var a,i,first,j,counter;if(document.getElementById("tat_table")&&(v=!1,document.body.removeChild(document.getElementById("tat_table"))),it==0){v=!1;return}for(a=document.createElement("table"),a.cellSpacing="1px",a.cellPadding="2px",a.style.position="absolute",a.style.direction="rtl",a.style.top=eval(curTop(f)+f.offsetHeight)+"px",u.actb_backgroundColor!=null&&(a.style.backgroundColor=u.actb_backgroundColor),u.actb_border!=null&&(a.style.border=u.actb_border),a.id="tat_table",document.body.appendChild(a),first=!0,j=1,u.actb_mouse&&(a.onmouseout=at,a.onmouseover=lt),counter=0,i=0;i<u.actb_keywords.length;i++)if(k[i]&&(counter++,r=a.insertRow(-1),first&&!tt?(r.style.backgroundColor=u.actb_hoverColor,first=!1,e=counter):nt==i?(r.style.backgroundColor=u.actb_hoverColor,first=!1,e=counter):u.actb_backgroundColor!=null&&(r.style.backgroundColor=u.actb_backgroundColor),r.id="tat_tr"+j,c=r.insertCell(-1),u.actb_color!=null&&(c.style.color=u.actb_color),u.actb_fontFamily!=null&&(c.style.fontFamily=u.actb_fontFamily),actb_fontSize!=null&&(c.style.fontSize=actb_fontSize),c.innerHTML=ot(u.actb_keywords[i]),c.id="tat_td"+j,c.setAttribute("pos",j),u.actb_mouse&&(c.style.cursor="pointer",c.onclick=ct,c.onmouseover=vt),j++),j-1==u.actb_lim&&j<g){r=a.insertRow(-1);u.actb_arrowsBackgroundColor!=null&&(r.style.backgroundColor=u.actb_arrowsBackgroundColor);c=r.insertCell(-1);u.actb_color!=null&&(c.style.color=u.actb_color);c.style.fontFamily="arial narrow";u.actb_fontSize!=null&&(c.style.fontSize=u.actb_fontSize);c.align="center";u.actb_downArrowImage==null?(c.style.direction="ltr",replaceHTML(c,"\\/")):c.innerHTML="<img src='"+u.actb_downArrowImage+"' />";u.actb_mouse&&(c.style.cursor="pointer",c.onclick=ht);break}w=1;b=j-1;v=!0;e<=0&&(e=1);a.offsetWidth<f.offsetWidth&&(a.style.width=f.offsetWidth+"px");a.style.left=actb_rtl?curRight(f)-a.offsetWidth+"px":curLeft(f)+"px"}function st(){var a,i,first,j;for(document.body.removeChild(document.getElementById("tat_table")),a=document.createElement("table"),a.cellSpacing="1px",a.cellPadding="2px",a.style.position="absolute",a.style.top=eval(curTop(f)+f.offsetHeight)+"px",u.actb_backgroundColor!=null&&(a.style.backgroundColor=u.actb_backgroundColor),u.actb_border!=null&&(a.style.border=u.actb_border),a.id="tat_table",a.style.direction="rtl",u.actb_mouse&&(a.onmouseout=at,a.onmouseover=lt),document.body.appendChild(a),first=!0,j=1,w>1&&(r=a.insertRow(-1),u.actb_arrowsBackgroundColor!=null&&(r.style.backgroundColor=u.actb_arrowsBackgroundColor),c=r.insertCell(-1),u.actb_color!=null&&(c.style.color=u.actb_color),c.style.fontFamily="arial narrow",u.actb_fontSize!=null&&(c.style.fontSize=u.actb_fontSize),c.align="center",u.actb_upArrowImage==null?(c.style.direction="ltr",replaceHTML(c,"/\\")):c.innerHTML="<img src='"+u.actb_upArrowImage+"' />",u.actb_mouse&&(c.style.cursor="pointer",c.onclick=ni)),i=0;i<u.actb_keywords.length;i++)if(k[i]&&(j>=w&&j<=b?(r=a.insertRow(-1),u.actb_backgroundColor!=null&&(r.style.backgroundColor=u.actb_backgroundColor),r.id="tat_tr"+j,c=r.insertCell(-1),u.actb_color!=null&&(c.style.color=u.actb_color),u.actb_fontFamily!=null&&(c.style.fontFamily=u.actb_fontFamily),actb_fontSize!=null&&(c.style.fontSize=u.actb_fontSize),c.innerHTML=ot(u.actb_keywords[i]),c.id="tat_td"+j,c.setAttribute("pos",j),u.actb_mouse&&(c.style.cursor="pointer",c.onclick=ct,c.onmouseover=vt),j++):j++),j>b)break;j-1<g&&(r=a.insertRow(-1),u.actb_arrowsBackgroundColor!=null&&(r.style.backgroundColor=u.actb_arrowsBackgroundColor),c=r.insertCell(-1),u.actb_color!=null&&(c.style.color=u.actb_color),c.style.fontFamily="arial narrow",u.actb_fontSize!=null&&(c.style.fontSize=u.actb_fontSize),c.align="center",u.actb_downArrowImage==null?(c.style.direction="ltr",replaceHTML(c,"\\/")):c.innerHTML="<img src='"+u.actb_downArrowImage+"' />",u.actb_mouse&&(c.style.cursor="pointer",c.onclick=ht));a.offsetWidth<f.offsetWidth&&(a.style.width=f.offsetWidth+"px");a.style.left=actb_rtl?curRight(f)-a.offsetWidth+"px":curLeft(f)+"px"}function dt(){v&&e!=1&&(u.actb_backgroundColor!=null&&(document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_backgroundColor),e--,e<w&&ut(),document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_hoverColor,o&&clearTimeout(o),u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut)))}function gt(){v&&e!=g&&(u.actb_backgroundColor!=null&&(document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_backgroundColor),e++,e>b&&rt(),document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_hoverColor,o&&clearTimeout(o),u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut)))}function rt(){w++;b++;st()}function ut(){w--;b--;st()}function ht(){u.actb_backgroundColor!=null&&(document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_backgroundColor);e++;rt();document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_hoverColor;f.focus();h=0;o&&clearTimeout(o);u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut))}function ni(n){n||(n=event);n.stopPropagation?n.stopPropagation():n.cancelBubble=!0;u.actb_backgroundColor!=null&&(document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_backgroundColor);e--;ut();document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_hoverColor;f.focus();h=0;o&&clearTimeout(o);u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut))}function ct(n){if((n||(n=event),v)&&(h=0,e=this.getAttribute("pos"),yt(),u.actb_checkCityInput)){var t=document.getElementById(f.id);t&&chkCityNameAutoComplete(t)}}function lt(){h=1}function at(){h=0;o&&clearTimeout(o);u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut))}function vt(){for(h=1,u.actb_backgroundColor!=null&&(document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_backgroundColor),e=this.getAttribute("pos");e<w;)ut();while(e>b)rt();document.getElementById("tat_tr"+e).style.backgroundColor=u.actb_hoverColor;o&&clearTimeout(o);u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut))}function ti(n){if(u.actb_delimiter.length>0){for(str="",l=0,i=0;i<s.length;i++){if(p==i){for(prespace=postspace="",gotbreak=!1,j=0;j<s[i].length;++j){if(s[i].charAt(j)!=" "){gotbreak=!0;break}prespace+=" "}for(j=s[i].length-1;j>=0;--j){if(s[i].charAt(j)!=" ")break;postspace+=" "}str+=prespace;str+=n;l=str.length;gotbreak&&(str+=postspace)}else str+=s[i];i!=s.length-1&&(str+=ft[i])}f.value=str;setCaret(f,l)}else f.value=n;h=0;y()}function yt(){var t,i,n,r,o;if(v){for(v=!1,t="",i=0,n=0;n<=u.actb_keywords.length;n++)if(k[n]&&i++,i==e){t=u.actb_keywords[n];break}try{r=document.getElementById(searchButtonClientID);o=document.getElementById(searchSpanClientID);o.className=searchButtonEnabledCSSClass;urls!=null&&(r.href=urls[n])}catch(s){}ti(t);l=getCaretStart(f)}}function y(){h==0&&(v=0,document.getElementById("tat_table")&&document.body.removeChild(document.getElementById("tat_table")),o&&clearTimeout(o))}function pt(n){return d&&stopEvent(n),!d}function wt(n){n||(n=event);a=n.keyCode;caret_pos_start=getCaretStart(f);d=0;switch(a){case 8:try{var t=document.getElementById(searchButtonClientID),i=document.getElementById(searchSpanClientID);i.className=searchButtonDisabledCSSClass;t.removeAttribute("href")}catch(r){}break;case 38:return dt(),d=1,!1;case 40:return gt(),d=1,!1;case 13:case 9:return v?(d=1,yt(),!1):!0;default:setTimeout(function(){ii(a)},50)}}function ii(n){var a,i,t,l,r,c,w;if(n!=38&&n!=40&&n!=13){if(v){for(a=0,i=0,t=0;t<=u.actb_keywords.length;t++)if(k[t]&&i++,i==e){a=t;break}nt=a}else nt=-1;if(f.value==""){h=0;y();return}if(u.actb_delimiter.length>0){for(caret_pos_start=getCaretStart(f),caret_pos_end=getCaretEnd(f),delim_split="",t=0;t<u.actb_delimiter.length;t++)delim_split+=u.actb_delimiter[t];for(delim_split=delim_split.addslashes(),delim_split_rx=new RegExp("(["+delim_split+"])"),i=0,s=[],s[0]="",t=0,j=f.value.length;t<f.value.length;t++,j--)f.value.substr(t,j).search(delim_split_rx)==0?(ma=f.value.substr(t,j).match(delim_split_rx),ft[i]=ma[1],i++,s[i]=""):s[i]+=f.value.charAt(t);for(l=0,p=-1,t=0;t<s.length;t++)caret_pos_end>=l&&caret_pos_end<=l+s[t].length&&(p=t),l+=s[t].length+1;r=s[p].trim();c=s[p].addslashes().trim()}else r=f.value,c=f.value.addslashes();if(r.length==0&&(h=0,y()),r.length<u.actb_startcheck)return this;for(w=u.actb_firstText?new RegExp("^"+c,"i"):new RegExp(c,"i"),g=0,tt=!1,it=0,t=0;t<u.actb_keywords.length;t++)k[t]=!1,u.actb_keywords[t]=u.actb_keywords[t].replace("`","'"),w.test(u.actb_keywords[t])&&(g++,k[t]=!0,it++,nt==t&&(tt=!0));o&&clearTimeout(o);u.actb_timeOut>0&&(o=setTimeout(function(){h=0;y()},u.actb_timeOut));kt()}}var u;this.actb_timeOut=-1;this.actb_lim=10;this.actb_firstText=!0;this.actb_mouse=!0;this.actb_delimiter=[";"];this.actb_startcheck=2;this.actb_checkCityInput=!1;this.actb_hoverColor="#BCD6E3";this.actb_hStyle="text-decoration: underline; font-weight: bold; background-color: #BCD6E3;";var s=[],p=0,ft=[],v=!1,e=0,g=0,f=null,w=0,b=0,k=[],nt=0,o,tt=!1,h=1,it=0,d=!1;return this.actb_keywords=[],this.actb_rtl=!0,this.actb_backgroundColor="#FFFFFF",this.actb_downArrowImage=null,this.actb_upArrowImage=null,this.actb_border="solid 2px BCD6E3",this.actb_arrowsBackgroundColor=null,this.actb_fontFamily=null,this.actb_fontSize="13px",this.actb_color="black",this.actb_keywords=t,u=this,f=n,addEvent(f,"focus",bt),this}String.prototype.addslashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")}