var bz_autosuggest_backend_url='';var bz_autosuggest_min_chars=1;var bz_autosuggest_show_as_stream=true;var bz_autosuggest_auto_submit=true;var bz_autosuggest_sform_name='bz_search';var bz_autosuggest_inputfield_id='query';var bz_autosuggest_caption_text='';var bz_autosuggest_caption_position='bottom';var bz_autosuggest_close_link_text='';var bz_autosuggest_close_link_position='top';var bz_autosuggest_allow_auto_hide='smart';var bz_autosuggest_allow_term_highlight=false;var bz_autosuggest_style='';var bz_autosuggest_pane='';var bz_autosuggest_pane_width=270;var bz_autosuggest_pane_dynamic_min_width=200;var bz_autosuggest_adjust_left_pos=1;var bz_autosuggest_adjust_width=-2;var bz_autosuggest_listing_font_width=6;var x11=0;var x12;var bz_as_o;var bz_is_it_ie=navigator.userAgent.toLowerCase().indexOf('msie')>=0?true:false;if(bz_is_it_ie){bz_autosuggest_adjust_width=0;}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');};String.prototype.singlespace=function(){return this.replace(/\s+/g,' ');};if(typeof(bz_as_o)=="undefined"){bz_as_o={};}if(typeof(bz_as_o.Autosuggest)=="undefined"){bz_as_o.Autosuggest={};}bz_as_o.BAS=function(x,y){if(!document.getElementById){return 0;}this.fld=bz_as_o.Bm.Bpb(x);if(!this.fld){return 0;}this.Bqa="";this.nInpC=0;this.Bqb=[];this.Bei=0;this.Be=y ? y : {};var z, a={min_length:3,as_query:"q",method:"get",timeout:5000,delay:400,maxheight:250,className:"bz_asug",offsety:-5,shownoresults:false,noresults:"no suggestions !",cache:true,maxentries:20};if(bz_autosuggest_style!='rounded'){a['offsety']=0;}for(z in a){if(typeof(this.Be[z])!=typeof(a[z])){this.Be[z]=a[z];}}var b=this;this.fld.onkeypress=function(n){return b.oKP(n);};this.fld.onkeyup=function(n){return b.oKu(n);};this.fld.setAttribute("autocomplete","off");if(!(bz_autosuggest_caption_text && bz_autosuggest_caption_position)){bz_autosuggest_caption_text='';bz_autosuggest_caption_position='';}if(!(bz_autosuggest_close_link_text && bz_autosuggest_close_link_position)){bz_autosuggest_close_link_text='';bz_autosuggest_close_link_position='';}};bz_as_o.BAS.prototype.oKP=function(a){var b=(window.event)? window.event.keyCode : a.keyCode;var e=13;var f=9;var g=27;var h=1;switch(b){case e:this.Bhv();h=0;break;case g:this.Bmt();break;}return h;};bz_as_o.BAS.prototype.oKu=function(a){var b=(window.event)? window.event.keyCode : a.keyCode;var c=38;var d=40;var h=1;switch(b){case c:this.Bch(b);h=0;break;case d:this.Bch(b);h=0;break;default:this.Bgs(this.fld.value);}return h;};bz_as_o.BAS.prototype.Bgs=function(a){a=a.singlespace();a=a.trim();x12=a;if(a==this.Bqa){this.createList(this.Bqb);return 0;}if(!bz_autosuggest_show_as_stream){bz_as_o.Bm.Bpc(this.idAs);}this.Bqa=a;if(a.length<this.Be.min_length){this.Bmt();this.Bqb=[];this.nInpC=a.length;return 0;}this.nInpC=a.length ? a.length : 0;var c=this;var d=this.Bqa;clearTimeout(this.ajID);this.ajID=setTimeout(function(){c.Baq(d)},this.Be.delay);return false;};bz_as_o.BAS.prototype.Baq=function(x){if(x!=x12){return false;}var c=this;var f;if(this.Be.as_backend.indexOf("?")==-1){f=this.Be.as_backend+'?'+this.Be.as_query+"="+encodeURIComponent(this.Bqa);}else{f=this.Be.as_backend+this.Be.as_query+"="+encodeURIComponent(this.Bqa);}var h=this.Be.method;var x=this.Bqa;var o=function(req){c.Bss(req,x)};var l=function(status){return;};var la=new bz_as_o.Bax();la.Bmq(f,h,o,l);};bz_as_o.BAS.prototype.Bss=function(q,a){if(a!=x12){return false;}this.Bqb=[];var b=eval('('+q.responseText+')');for(var i=0;i<b.lst.length;i++){this.Bqb.push({'id':b.lst[i].n,'v':b.lst[i].v,'i':b.lst[i].i});}this.idAs="bz_asg_v110_"+this.fld.id;this.createList(this.Bqb);};bz_as_o.BAS.prototype.createList=function(e){var f=this;bz_as_o.Bm.Bpc(this.idAs);this.Bms();if((e.length==0)&& !this.Be.shownoresults){return false;}var g;if(bz_autosuggest_caption_text){var b3=bz_as_o.Bm.Bpa("div",{className:"as_caption"},bz_autosuggest_caption_text);}if(bz_autosuggest_close_link_text){var a1=bz_as_o.Bm.Bpa("div",{className:"as_close_link"});var a2=bz_as_o.Bm.Bpa("a",{href:"#"},bz_autosuggest_close_link_text);a2.onclick=function(){f.Bmt();return false;};a1.appendChild(a2);}var a3=bz_as_o.Bm.Bpa("div",{id:this.idAs,className:this.Be.className});if(bz_autosuggest_style=='rounded'){var a4=bz_as_o.Bm.Bpa("div",{className:"asug_corner"});var a5=bz_as_o.Bm.Bpa("div",{className:"asug_bar"});var a6=bz_as_o.Bm.Bpa("div",{className:"asug_head"});a6.appendChild(a4);a6.appendChild(a5);a3.appendChild(a6);}if(bz_autosuggest_caption_position=='top'){a3.appendChild(b3);}if(bz_autosuggest_close_link_position=='top'){a3.appendChild(a1);}var a7=bz_as_o.Bm.Bpa("ul",{id:"as_ul"});var b4;for(var i=0;i<e.length;i++){var a8=e[i].v.length;if(a8>x11){x11=a8;}if(bz_autosuggest_allow_term_highlight){var a9=e[i].v;var st=a9.toLowerCase().indexOf(this.Bqa.toLowerCase());b4=a9.substring(0,st)+"<em>"+a9.substring(st,st+this.Bqa.length)+"</em>"+a9.substring(st+this.Bqa.length);}else{b4=e[i].v;}var span=bz_as_o.Bm.Bpa("span",{},b4,true);var b2=bz_as_o.Bm.Bpa("a",{href:"#"});var b5=bz_as_o.Bm.Bpa("span",{className:"tl"}," ");var b6=bz_as_o.Bm.Bpa("span",{className:"tr"}," ");b2.appendChild(b5);b2.appendChild(b6);b2.appendChild(span);b2.name=i+1;b2.onclick=function(){f.Bhv();return false;};b2.onmouseover=function(){f.Bsh(this.name);};var b1=bz_as_o.Bm.Bpa("li",{},b2);a7.appendChild(b1);}if((e.length==0)&&this.Be.shownoresults){var b1=bz_as_o.Bm.Bpa("li",{className:"asug_warn"},this.Be.noresults);a7.appendChild(b1);}a3.appendChild(a7);if(bz_autosuggest_caption_position=='bottom'){a3.appendChild(b3);}if(bz_autosuggest_close_link_position=='bottom'){a3.appendChild(a1);}if(bz_autosuggest_style=='rounded'){var b7=bz_as_o.Bm.Bpa("div",{className:"asug_corner"});var b8=bz_as_o.Bm.Bpa("div",{className:"asug_bar"});var b9=bz_as_o.Bm.Bpa("div",{className:"asug_foot"});b9.appendChild(b7);b9.appendChild(b8);a3.appendChild(b9);}var pos=bz_as_o.Bm.Bpd(this.fld);a3.style.left=(bz_autosuggest_adjust_left_pos+pos.x)+"px";a3.style.top=(pos.y+this.fld.offsetHeight+this.Be.offsety)+"px";if(bz_autosuggest_pane=='fixed'){a3.style.width=bz_autosuggest_pane_width+"px";}else if(bz_autosuggest_pane=='dynamic'){g=x11*bz_autosuggest_listing_font_width+10;if(bz_autosuggest_pane_dynamic_min_width && (bz_autosuggest_pane_dynamic_min_width > g)){g=bz_autosuggest_pane_dynamic_min_width;}a3.style.width=g+"px";}else{g=bz_autosuggest_adjust_width+this.fld.offsetWidth;a3.style.width=g+"px";}if((bz_autosuggest_allow_auto_hide=='yes')||(bz_autosuggest_allow_auto_hide=='smart')){a3.onmouseover=function(){f.Bms()};a3.onmouseout=function(){f.resetTimeout()};}document.getElementsByTagName("body")[0].appendChild(a3);this.Bei=0;if(bz_autosuggest_allow_auto_hide=='yes'){var f=this;this.toID=setTimeout(function(){f.Bmt()},this.Be.timeout);}};bz_as_o.BAS.prototype.Bch=function(b){var c=bz_as_o.Bm.Bpb("as_ul");if(!c){return false;}var o;if(b==40){o=this.Bei+1;}else if(b==38){o=this.Bei-1;}if(o>c.childNodes.length){o=c.childNodes.length;}if(o<1){o=1;}this.Bsh(o);};bz_as_o.BAS.prototype.Bsh=function(o){var c=bz_as_o.Bm.Bpb("as_ul");if(!c){return false;}if(this.Bei>0){this.Bcc();}this.Bei=Number(o);c.childNodes[this.Bei-1].className="asug_highlight";this.Bms();};bz_as_o.BAS.prototype.Bcc=function(){var x=bz_as_o.Bm.Bpb("as_ul");if(!x){return false;}if(this.Bei>0){x.childNodes[this.Bei-1].className="";this.Bei=0;}};bz_as_o.BAS.prototype.Bhv=function(){if(this.Bei){this.Bqa=this.fld.value=this.Bqb[this.Bei-1].v;this.fld.focus();if(this.fld.selectionStart){this.fld.setSelectionRange(this.Bqa.length, this.Bqa.length);}this.Bmt();if(bz_autosuggest_auto_submit){submit_sform();return false;}if(typeof(this.Be.callback)=="function"){this.Be.callback(this.Bqb[this.Bei-1]);}}};bz_as_o.BAS.prototype.Bms=function(){clearTimeout(this.toID);};bz_as_o.BAS.prototype.resetTimeout=function(){clearTimeout(this.toID);var pointer=this;this.toID=setTimeout(function(){pointer.Bmt()},1000);};bz_as_o.BAS.prototype.Bmt=function(){this.Bms();var x=bz_as_o.Bm.Bpb(this.idAs);var u=this;if(x){var v=new bz_as_o.Bf(x,1,0,250,function(){bz_as_o.Bm.Bpc(u.idAs)});}};if(typeof(bz_as_o.Bax)=="undefined"){bz_as_o.Bax={};}bz_as_o.Bax=function(){this.q={};this.isIE=false;};bz_as_o.Bax.prototype.Bmq=function(f,a1,a2,a4){if(a1!="POST"){a1="GET";}this.onComplete=a2;this.onError=a4;var pointer=this;if(window.XMLHttpRequest){this.q=new XMLHttpRequest();this.q.onreadystatechange=function(){pointer.Bmr()};this.q.open("GET",f,true);this.q.send(null);}else if(window.ActiveXObject){this.q=new ActiveXObject("Microsoft.XMLHTTP");if(this.q){this.q.onreadystatechange=function(){pointer.Bmr()};this.q.open(a1,f,true);this.q.send();}}};bz_as_o.Bax.prototype.Bmr=function(){if(this.q.readyState==4){if(this.q.status==200){this.onComplete(this.q);}else{this.onError(this.q.status);}}};if(typeof(bz_as_o.Bm)=="undefined"){bz_as_o.Bm={};}bz_as_o.Bm.Bpa=function(z1,z3,z6,z8){var x1=document.createElement(z1);if(!x1){return 0;}for(var a in z3){x1[a]=z3[a];}var j=typeof(z6);if((j=="string")&& !z8){x1.appendChild(document.createTextNode(z6));}else if(j=="string" && z8){x1.innerHTML=z6;}else if(j=="object"){x1.appendChild(z6);}return x1;};bz_as_o.Bm.Bpb=function (e){var j=typeof(e);if(j=="undefined"){return 0;}else if(j=="string"){var re=document.getElementById(e);if(!re){return 0;}else if(typeof(re.appendChild)!="undefined"){return re;}else{return 0;}}else if(typeof(e.appendChild)!="undefined"){return e;}else{return 0;}};bz_as_o.Bm.Bpc=function(o){var e=this.Bpb(o);if(!e){return 0;}else if(e.parentNode.removeChild(e)){return true;}else{return 0;}};bz_as_o.Bm.Bpd=function(e){var e=this.Bpb(e);var obj=e;var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}var obj=e;var curtop=0;if(obj.offsetParent){while(obj.offsetParent){curtop+=obj.offsetTop;obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}return{x:curleft,y:curtop};};if(typeof(bz_as_o.Bf)=="undefined"){bz_as_o.Bf={};}bz_as_o.Bf=function(o,p,to,u1,u2){if(!o){return 0;}this.e=o;this.from=p;this.to=to;this.cb=u2;this.nDur=u1;this.nInt=50;this.nTime=0;var p=this;this.nID=setInterval(function(){p._df()},this.nInt);};bz_as_o.Bf.prototype._df=function(){this.nTime+=this.nInt;var z=Math.round(this._dt(this.nTime,this.from,this.to,this.nDur)*100);var op=z/100;if(this.e.filters){try{this.e.filters.item("DXImageTransform.Microsoft.Alpha").opacity=z;}catch(e){this.e.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+z+')';}}else{this.e.style.opacity=op;}if(this.nTime==this.nDur){clearInterval(this.nID );if(this.cb != undefined){this.cb();}}};bz_as_o.Bf.prototype._dt=function(u,q,w,z){return q+((w-q)*(u/z));};function submit_sform(){var f=document.forms[bz_autosuggest_sform_name];f.submit();}
 

