function iniAutoComp(a){if(a){initAutoComplete($("formrechercherpar"),$("rs_av"),$("activ_av"),$("naf_av"),$("bouton_trouver_av"))}else{initAutoComplete($("formrechercherpar"),$("rs_exp"),$("activ_exp"),$("naf_exp"),$("bt_trouver"))}}var _documentForm=null;var _inputField=null;var _inputFieldActiv=null;var _inputFieldNaf=null;var _submitButton=null;function initAutoComplete(b,d,e,a,c){_documentForm=b;_inputField=d;_inputFieldActiv=e;_inputFieldNaf=a;_submitButton=c;_inputField.setAttribute("autocomplete","off");_inputFieldActiv.setAttribute("autocomplete","off");_inputFieldNaf.setAttribute("autocomplete","off");creeAutocompletionDiv();_currentInputFieldValue=_inputField.value;_oldInputFieldValue=_currentInputFieldValue;_currentInputFieldActivValue=_inputFieldActiv.value;_oldInputFieldActivValue=_currentInputFieldActivValue;_currentInputFieldNafValue=_inputFieldNaf.value;_oldInputFieldNafValue=_currentInputFieldNafValue;cacheResults("",new Array());cacheResultsActiv("",new Array());cacheResultsNaf("",new Array());document.onkeydown=onKeyDownHandler;_inputField.onkeydown=onKeyDownHandlerRS;_inputField.onkeyup=onKeyUpHandler;_inputField.onblur=onBlurHandler;_inputFieldActiv.onkeyup=onKeyUpHandlerActiv;_inputFieldActiv.onblur=onBlurHandlerActiv;_inputFieldNaf.onkeyup=onKeyUpHandlerNaf;_inputFieldNaf.onblur=onBlurHandlerNaf;window.onresize=onResizeHandler;setTimeout("mainLoop()",500)}var _oldInputFieldValue="";var _currentInputFieldValue="";var _oldInputFieldActivValue="";var _currentInputFieldActivValue="";var _oldInputFieldNafValue="";var _currentInputFieldNafValue="";var _resultCache=new Object();var _resultCacheActiv=new Object();var _resultCacheNaf=new Object();function mainLoop(){if(_oldInputFieldValue!=_currentInputFieldValue&&_currentInputFieldValue.length>2){var b=escapeURI(_currentInputFieldValue);var a=_resultCache[_currentInputFieldValue.toUpperCase()];if(a){metsEnPlace(b,a)}else{callSuggestions(b)}}_oldInputFieldValue=_currentInputFieldValue;if(_oldInputFieldActivValue!=_currentInputFieldActivValue&&_currentInputFieldActivValue.length>2){var f=escapeURI(_currentInputFieldActivValue);var e=_resultCacheActiv[_currentInputFieldActivValue.toUpperCase()];if(e){metsEnPlaceActiv(f,e)}else{callSuggestionsActiv(f)}}_oldInputFieldActivValue=_currentInputFieldActivValue;if(_oldInputFieldNafValue!=_currentInputFieldNafValue&&_currentInputFieldNafValue.length>1){var d=escapeURI(_currentInputFieldNafValue);var c=_resultCacheNaf[_currentInputFieldNafValue.toUpperCase()];if(c){metsEnPlaceNaf(d,c)}else{callSuggestionsNaf(d)}}_oldInputFieldNafValue=_currentInputFieldNafValue;setTimeout("mainLoop()",500);return true}function escapeURI(a){if(encodeURIComponent){return encodeURIComponent(a)}if(escape){return escape(a)}}function callSuggestions(a){_adresseRecherche="autocomp.php";if(_xmlHttp&&_xmlHttp.readyState!=0){_xmlHttp.abort()}_xmlHttp=getXMLHTTP();if(_xmlHttp){_xmlHttp.open("GET",_adresseRecherche+"?debut="+a,true);_xmlHttp.onreadystatechange=function(){if(_xmlHttp.readyState==4&&_xmlHttp.responseXML){var b=traiteXmlSuggestions(_xmlHttp.responseXML);cacheResults(a,b);metsEnPlace(a,b)}};_xmlHttp.send(null)}}function callSuggestionsActiv(a){_adresseRechercheActiv="autocomp_activ.php";if(_xmlHttp&&_xmlHttp.readyState!=0){_xmlHttp.abort()}_xmlHttp=getXMLHTTP();if(_xmlHttp){_xmlHttp.open("GET",_adresseRechercheActiv+"?debut="+a,true);_xmlHttp.onreadystatechange=function(){if(_xmlHttp.readyState==4&&_xmlHttp.responseXML){var b=traiteXmlSuggestions(_xmlHttp.responseXML);cacheResultsActiv(a,b);metsEnPlaceActiv(a,b)}};_xmlHttp.send(null)}}function callSuggestionsNaf(a){_adresseRechercheNaf="autocomp_naf.php";if(_xmlHttp&&_xmlHttp.readyState!=0){_xmlHttp.abort()}_xmlHttp=getXMLHTTP();if(_xmlHttp){_xmlHttp.open("GET",_adresseRechercheNaf+"?debut="+a,true);_xmlHttp.onreadystatechange=function(){if(_xmlHttp.readyState==4&&_xmlHttp.responseXML){var b=traiteXmlSuggestions(_xmlHttp.responseXML);cacheResultsNaf(a,b);metsEnPlaceNaf(a,b)}};_xmlHttp.send(null)}}function cacheResults(b,a){_resultCache[b.toUpperCase()]=a}function cacheResultsActiv(b,a){_resultCacheActiv[b.toUpperCase()]=a}function cacheResultsNaf(b,a){_resultCacheNaf[b.toUpperCase()]=a}function setStylePourElement(b,a){b.className=a}function calculateOffsetLeft(a){return calculateOffset(a,"offsetLeft")}function calculateOffsetTop(a){return calculateOffset(a,"offsetTop")}function calculateOffset(c,a){var b=0;while(c){b+=c[a];c=c.offsetParent}return b}function calculateWidth(a){if(a.offsetWidth){return a.offsetWidth-2*1}else{return 0}}function setCompleteDivSize(){if(_completeDiv){_completeDiv.style.left=calculateOffsetLeft(_inputField)+"px";_completeDiv.style.top=calculateOffsetTop(_inputField)+_inputField.offsetHeight-1+"px";_completeDiv.style.width=calculateWidth(_inputField)+"px"}}function setCompleteDivActivSize(){if(_completeDivActiv){_completeDivActiv.style.left=calculateOffsetLeft(_inputFieldActiv)+"px";_completeDivActiv.style.top=calculateOffsetTop(_inputFieldActiv)+_inputFieldActiv.offsetHeight-1+"px";_completeDivActiv.style.width=calculateWidth(_inputFieldActiv)+"px"}}function setCompleteDivNafSize(){if(_completeDivNaf){_completeDivNaf.style.left=calculateOffsetLeft(_inputFieldNaf)+"px";_completeDivNaf.style.top=calculateOffsetTop(_inputFieldNaf)+_inputFieldNaf.offsetHeight-1+"px";_completeDivNaf.style.width=calculateWidth(_inputFieldNaf)+"px"}}function creeAutocompletionDiv(){_completeDiv=document.createElement("DIV");_completeDiv.id="completeDiv";var b=1;var a=1;_completeDiv.style.borderRight="black "+b+"px solid";_completeDiv.style.borderLeft="black "+b+"px solid";_completeDiv.style.borderTop="black "+a+"px solid";_completeDiv.style.borderBottom="black "+a+"px solid";_completeDiv.style.zIndex="1";_completeDiv.style.paddingRight="0";_completeDiv.style.paddingLeft="0";_completeDiv.style.paddingTop="0";_completeDiv.style.paddingBottom="0";setCompleteDivSize();_completeDiv.style.visibility="hidden";_completeDiv.style.position="absolute";_completeDiv.style.backgroundColor="white";document.body.appendChild(_completeDiv);setStylePourElement(_completeDiv,"AutoCompleteDivListeStyle");_completeDivActiv=document.createElement("DIV");_completeDivActiv.id="completeDivActiv";_completeDivActiv.style.borderRight="black "+b+"px solid";_completeDivActiv.style.borderLeft="black "+b+"px solid";_completeDivActiv.style.borderTop="black "+a+"px solid";_completeDivActiv.style.borderBottom="black "+a+"px solid";_completeDivActiv.style.zIndex="1";_completeDivActiv.style.paddingRight="0";_completeDivActiv.style.paddingLeft="0";_completeDivActiv.style.paddingTop="0";_completeDivActiv.style.paddingBottom="0";setCompleteDivActivSize();_completeDivActiv.style.visibility="hidden";_completeDivActiv.style.position="absolute";_completeDivActiv.style.backgroundColor="white";document.body.appendChild(_completeDivActiv);setStylePourElement(_completeDivActiv,"AutoCompleteDivListeStyle");_completeDivNaf=document.createElement("DIV");_completeDivNaf.id="completeDivNaf";_completeDivNaf.style.borderRight="black "+b+"px solid";_completeDivNaf.style.borderLeft="black "+b+"px solid";_completeDivNaf.style.borderTop="black "+a+"px solid";_completeDivNaf.style.borderBottom="black "+a+"px solid";_completeDivNaf.style.zIndex="1";_completeDivNaf.style.paddingRight="0";_completeDivNaf.style.paddingLeft="0";_completeDivNaf.style.paddingTop="0";_completeDivNaf.style.paddingBottom="0";setCompleteDivNafSize();_completeDivNaf.style.visibility="hidden";_completeDivNaf.style.position="absolute";_completeDivNaf.style.backgroundColor="white";document.body.appendChild(_completeDivNaf);setStylePourElement(_completeDivNaf,"AutoCompleteDivListeStyle")}function metsEnPlace(a,c){while(_completeDiv.childNodes.length>0){_completeDiv.removeChild(_completeDiv.childNodes[0])}for(var e=0;e<c.length;++e){var b=document.createElement("DIV");b.onmousedown=divOnMouseDown;b.onmouseover=divOnMouseOver;b.onmouseout=divOnMouseOut;setStylePourElement(b,"AutoCompleteDiv");var d=document.createElement("SPAN");d.innerHTML=c[e];b.appendChild(d);_completeDiv.appendChild(b)}PressAction();if(_completeDivRows>0){_completeDiv.height=16*_completeDivRows+4}else{hideCompleteDiv()}}function metsEnPlaceActiv(a,c){while(_completeDivActiv.childNodes.length>0){_completeDivActiv.removeChild(_completeDivActiv.childNodes[0])}for(var e=0;e<c.length;++e){var b=document.createElement("DIV");b.onmousedown=divOnMouseDownActiv;b.onmouseover=divOnMouseOverActiv;b.onmouseout=divOnMouseOut;setStylePourElement(b,"AutoCompleteDiv");var d=document.createElement("SPAN");d.innerHTML=c[e];b.appendChild(d);_completeDivActiv.appendChild(b)}PressActionActiv();if(_completeDivActivRows>0){_completeDivActiv.height=16*_completeDivActivRows+4}else{hideCompleteDivActiv()}}function metsEnPlaceNaf(a,c){while(_completeDivNaf.childNodes.length>0){_completeDivNaf.removeChild(_completeDivNaf.childNodes[0])}for(var e=0;e<c.length;++e){var b=document.createElement("DIV");b.onmousedown=divOnMouseDownNaf;b.onmouseover=divOnMouseOverNaf;b.onmouseout=divOnMouseOut;setStylePourElement(b,"AutoCompleteDiv");var d=document.createElement("SPAN");d.innerHTML=c[e];b.appendChild(d);_completeDivNaf.appendChild(b)}PressActionNaf();if(_completeDivNafRows>0){_completeDivNaf.height=16*_completeDivNafRows+4}else{hideCompleteDivNaf()}}var _lastKeyCode=null;var onKeyDownHandler=function(a){if(!a&&window.event){a=window.event}if(a){_lastKeyCode=a.keyCode}};var onKeyDownHandlerRS=function(a){if(!a&&window.event){a=window.event}if(a){_lastKeyCode=a.keyCode}};var _eventKeycode=null;var onKeyUpHandler=function(e){if(!e&&window.event){e=window.event}_eventKeycode=e.keyCode;if(_eventKeycode==40||_eventKeycode==38){blurThenGetFocus()}var g=0;var b=-1;var a=_inputField.value;if(_eventKeycode!=0){if(g>0&&b!=-1){a=a.substring(0,b)}if(_eventKeycode==13||_eventKeycode==3){var f=_inputField;if(_inputField.createTextRange){var c=_inputField.createTextRange();c.moveStart("character",_inputField.value.length);_inputField.select()}else{if(f.setSelectionRange){_inputField.setSelectionRange(_inputField.value.length,_inputField.value.length)}}}else{if(_inputField.value!=a){_inputField.value=a}}}if(_eventKeycode!=40&&_eventKeycode!=38&&_eventKeycode!=13){_currentInputFieldValue=a}if(handleCursorUpDownEnter(_eventKeycode)&&_eventKeycode!=0){PressAction()}};var onKeyUpHandlerActiv=function(e){if(!e&&window.event){e=window.event}_eventKeycode=e.keyCode;if(_eventKeycode==40||_eventKeycode==38){blurThenGetFocusActiv()}var g=0;var b=-1;var a=_inputFieldActiv.value;if(_eventKeycode!=0){if(g>0&&b!=-1){a=a.substring(0,b)}if(_eventKeycode==13||_eventKeycode==3){var f=_inputFieldActiv;if(_inputFieldActiv.createTextRange){var c=_inputFieldActiv.createTextRange();c.moveStart("character",_inputFieldActiv.value.length);_inputFieldActiv.select()}else{if(f.setSelectionRange){_inputFieldActiv.setSelectionRange(_inputFieldActiv.value.length,_inputFieldActiv.value.length)}}}else{if(_inputFieldActiv.value!=a){_inputFieldActiv.value=a}}}if(_eventKeycode!=40&&_eventKeycode!=38&&_eventKeycode!=13){_currentInputFieldActivValue=a}if(handleCursorUpDownEnterActiv(_eventKeycode)&&_eventKeycode!=0){PressActionActiv()}};var onKeyUpHandlerNaf=function(e){if(!e&&window.event){e=window.event}_eventKeycode=e.keyCode;if(_eventKeycode==40||_eventKeycode==38){blurThenGetFocusNaf()}var g=0;var b=-1;var a=_inputFieldNaf.value;if(_eventKeycode!=0){if(g>0&&b!=-1){a=a.substring(0,b)}if(_eventKeycode==13||_eventKeycode==3){var f=_inputFieldNaf;if(_inputFieldNaf.createTextRange){var c=_inputFieldNaf.createTextRange();c.moveStart("character",_inputFieldNaf.value.length);_inputFieldNaf.select()}else{if(f.setSelectionRange){_inputFieldNaf.setSelectionRange(_inputFieldNaf.value.length,_inputFieldNaf.value.length)}}}else{if(_inputFieldNaf.value!=a){_inputFieldNaf.value=a}}}if(_eventKeycode!=40&&_eventKeycode!=38&&_eventKeycode!=13){_currentInputFieldNafValue=a}if(handleCursorUpDownEnterNaf(_eventKeycode)&&_eventKeycode!=0){PressActionNaf()}};function handleCursorUpDownEnter(a){if(a==40){highlightNewValue(_highlightedSuggestionIndex+1);return false}else{if(a==38){highlightNewValue(_highlightedSuggestionIndex-1);return false}else{if(a==13||a==3){if(_highlightedSuggestionDiv!=null&&_completeDiv.style.visibility=="visible"){_inputField.value=getSuggestion(_highlightedSuggestionDiv);hideCompleteDiv()}else{ValideFormulaire()}return false}}}return true}function handleCursorUpDownEnterActiv(a){if(a==40){highlightNewValueActiv(_highlightedSuggestionIndexActiv+1);return false}else{if(a==38){highlightNewValueActiv(_highlightedSuggestionIndexActiv-1);return false}else{if(a==13||a==3){if(_highlightedSuggestionDivActiv!=null&&_completeDivActiv.style.visibility=="visible"){_inputFieldActiv.value=getSuggestion(_highlightedSuggestionDivActiv);hideCompleteDivActiv()}else{ValideFormulaire()}return false}}}return true}function handleCursorUpDownEnterNaf(a){if(a==40){highlightNewValueNaf(_highlightedSuggestionIndexNaf+1);return false}else{if(a==38){highlightNewValueNaf(_highlightedSuggestionIndexNaf-1);return false}else{if(a==13||a==3){if(_highlightedSuggestionDivNaf!=null&&_completeDivNaf.style.visibility=="visible"){_inputFieldNaf.value=getSuggestion(_highlightedSuggestionDivNaf);hideCompleteDivNaf()}else{ValideFormulaire()}return false}}}return true}var _completeDivRows=0;var _completeDivDivList=null;var _highlightedSuggestionIndex=-1;var _highlightedSuggestionDiv=null;function PressAction(){_highlightedSuggestionIndex=-1;var a=_completeDiv.getElementsByTagName("div");var e=a.length;_completeDivRows=e;_completeDivDivList=a;if(_currentInputFieldValue.length<3||e==0){hideCompleteDiv()}else{showCompleteDiv()}var b=false;if(_currentInputFieldValue.length>0){var g;for(g=0;g<e;g++){if(getSuggestion(a.item(g)).toUpperCase().indexOf(_currentInputFieldValue.toUpperCase())==0){b=true;break}}}for(var d=0;d<e;d++){setStylePourElement(a.item(d),"AutoCompleteDiv")}_highlightedSuggestionIndex=-1;_highlightedSuggestionDiv=null;var c=false;switch(_eventKeycode){case 33:case 34:case 35:case 35:case 36:case 37:case 39:case 45:case 46:c=true;break;default:break}if(!c&&_highlightedSuggestionDiv){setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDivAct");var f;if(b){f=getSuggestion(_highlightedSuggestionDiv).substr(0)}else{f=_currentInputFieldValue}}else{_highlightedSuggestionIndex=-1}}var _completeDivActivRows=0;var _completeDivActivDivList=null;var _highlightedSuggestionIndexActiv=-1;var _highlightedSuggestionDivActiv=null;function PressActionActiv(){_highlightedSuggestionIndexActiv=-1;var a=_completeDivActiv.getElementsByTagName("div");var e=a.length;_completeDivActivRows=e;_completeDivActivDivList=a;if(_currentInputFieldActivValue.length<3||e==0){hideCompleteDivActiv()}else{showCompleteDivActiv()}var b=false;if(_currentInputFieldActivValue.length>0){var g;for(g=0;g<e;g++){if(getSuggestion(a.item(g)).toUpperCase().indexOf(_currentInputFieldActivValue.toUpperCase())==0){b=true;break}}}for(var d=0;d<e;d++){setStylePourElement(a.item(d),"AutoCompleteDiv")}_highlightedSuggestionIndexActiv=-1;_highlightedSuggestionDivActiv=null;var c=false;switch(_eventKeycode){case 33:case 34:case 35:case 35:case 36:case 37:case 39:case 45:case 46:c=true;break;default:break}if(!c&&_highlightedSuggestionDivActiv){setStylePourElement(_highlightedSuggestionDivActiv,"AutoCompleteDivAct");var f;if(b){f=getSuggestion(_highlightedSuggestionDivActiv).substr(0)}else{f=_currentInputFieldActivValue}}else{_highlightedSuggestionIndexActiv=-1}}function PressActionNaf(){_highlightedSuggestionIndexNaf=-1;var a=_completeDivNaf.getElementsByTagName("div");var e=a.length;_completeDivNafRows=e;_completeDivNafDivList=a;if(_currentInputFieldNafValue.length<2||e==0){hideCompleteDivNaf()}else{showCompleteDivNaf()}var b=false;if(_currentInputFieldNafValue.length>0){var g;for(g=0;g<e;g++){if(getSuggestion(a.item(g)).toUpperCase().indexOf(_currentInputFieldNafValue.toUpperCase())==0){b=true;break}}}for(var d=0;d<e;d++){setStylePourElement(a.item(d),"AutoCompleteDiv")}_highlightedSuggestionIndexNaf=-1;_highlightedSuggestionDivNaf=null;var c=false;switch(_eventKeycode){case 33:case 34:case 35:case 35:case 36:case 37:case 39:case 45:case 46:c=true;break;default:break}if(!c&&_highlightedSuggestionDivNaf){setStylePourElement(_highlightedSuggestionDivNaf,"AutoCompleteDivAct");var f;if(b){f=getSuggestion(_highlightedSuggestionDivNaf).substr(0)}else{f=_currentInputFieldNafValue}}else{_highlightedSuggestionIndexNaf=-1}}var _cursorUpDownPressed=null;function blurThenGetFocus(){_cursorUpDownPressed=true;_inputField.blur();setTimeout("_inputField.focus();",10);return}function defaultValueRestore(a){if(a.value.length==0){if(a.attributes.getNamedItem("_default")){a.value=a.attributes.getNamedItem("_default").value;$(a).addClassName("defaultValue");return true}}return false}function emptyValueIfDefault(a){if(a.attributes.getNamedItem("_default")){if(a.attributes.getNamedItem("_default").value==a.value){a.value="";$(a).removeClassName("defaultValue");return true}}return false}var _cursorUpDownPressedActiv=null;function blurThenGetFocusActiv(){_cursorUpDownPressedActiv=true;_inputFieldActiv.blur();setTimeout("_inputFieldActiv.focus();",10);return}var _cursorUpDownPressedNaf=null;function blurThenGetFocusNaf(){_cursorUpDownPressedNaf=true;_inputFieldNaf.blur();setTimeout("_inputFieldNaf.focus();",10);return}function rangeSize(c){var b=-1;if(c.createTextRange){var a=document.selection.createRange().duplicate();b=a.text.length}else{if(c.setSelectionRange){b=c.selectionEnd-c.selectionStart}}return b}function beforeRangeSize(c){var a=0;if(c.createTextRange){var b=document.selection.createRange().duplicate();b.moveEnd("textedit",1);a=c.value.length-b.text.length}else{if(c.setSelectionRange){a=c.selectionStart}else{a=-1}}return a}function cursorAfterValue(b){if(b.createTextRange){var a=b.createTextRange();a.moveStart("character",b.value.length);a.select()}else{if(b.setSelectionRange){b.setSelectionRange(b.value.length,b.value.length)}}}function getSuggestion(a){if(!a){return null}return trimCR(a.getElementsByTagName("span")[0].firstChild.data)}function trimCR(a){for(var d=0,b="",c="\n\r";d<a.length;d++){if(c.indexOf(a.charAt(d))==-1){b+=a.charAt(d)}}return b}function hideCompleteDiv(){controle_entree_actif=true;_completeDiv.style.visibility="hidden"}function hideCompleteDivActiv(){controle_entree_actif=true;_completeDivActiv.style.visibility="hidden"}function hideCompleteDivNaf(){controle_entree_actif=true;_completeDivNaf.style.visibility="hidden"}function showCompleteDiv(){controle_entree_actif=false;_completeDiv.style.visibility="visible";setCompleteDivSize()}function showCompleteDivActiv(){controle_entree_actif=false;_completeDivActiv.style.visibility="visible";setCompleteDivActivSize()}function showCompleteDivNaf(){controle_entree_actif=false;_completeDivNaf.style.visibility="visible";setCompleteDivNafSize()}function highlightNewValue(a){if(!_completeDivDivList||_completeDivRows<=0){return}showCompleteDiv();if(a>=_completeDivRows){a=_completeDivRows-1}if(_highlightedSuggestionIndex!=-1&&a!=_highlightedSuggestionIndex){setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDiv");_highlightedSuggestionIndex=-1}if(a<0){_highlightedSuggestionIndex=-1;_inputField.focus();return}_highlightedSuggestionIndex=a;_highlightedSuggestionDiv=_completeDivDivList.item(a);setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDivAct")}function highlightNewValueActiv(a){if(!_completeDivActivDivList||_completeDivActivRows<=0){return}showCompleteDivActiv();if(a>=_completeDivActivRows){a=_completeDivActivRows-1}if(_highlightedSuggestionIndexActiv!=-1&&a!=_highlightedSuggestionIndexActiv){setStylePourElement(_highlightedSuggestionDivActiv,"AutoCompleteDiv");_highlightedSuggestionIndexActiv=-1}if(a<0){_highlightedSuggestionIndexActiv=-1;_inputFieldActiv.focus();return}_highlightedSuggestionIndexActiv=a;_highlightedSuggestionDivActiv=_completeDivActivDivList.item(a);setStylePourElement(_highlightedSuggestionDivActiv,"AutoCompleteDivAct")}function highlightNewValueNaf(a){if(!_completeDivNafDivList||_completeDivNafRows<=0){return}showCompleteDivNaf();if(a>=_completeDivNafRows){a=_completeDivNafRows-1}if(_highlightedSuggestionIndexNaf!=-1&&a!=_highlightedSuggestionIndexNaf){setStylePourElement(_highlightedSuggestionDivNaf,"AutoCompleteDiv");_highlightedSuggestionIndexNaf=-1}if(a<0){_highlightedSuggestionIndexNaf=-1;_inputFieldNaf.focus();return}_highlightedSuggestionIndexNaf=a;_highlightedSuggestionDivNaf=_completeDivNafDivList.item(a);setStylePourElement(_highlightedSuggestionDivNaf,"AutoCompleteDivAct")}var onResizeHandler=function(a){setCompleteDivSize();setCompleteDivActivSize();setCompleteDivNafSize()};var onBlurHandler=function(a){defaultValueRestore(_inputField);if(!_cursorUpDownPressed){hideCompleteDiv()}_cursorUpDownPressed=false};var onBlurHandlerActiv=function(a){defaultValueRestore(_inputFieldActiv);if(!_cursorUpDownPressedActiv){hideCompleteDivActiv()}_cursorUpDownPressedActiv=false};var onBlurHandlerNaf=function(a){defaultValueRestore(_inputFieldNaf);if(!_cursorUpDownPressedNaf){hideCompleteDivNaf()}_cursorUpDownPressedNaf=false};var divOnMouseDown=function(){_inputField.value=getSuggestion(this)};var divOnMouseDownActiv=function(){_inputFieldActiv.value=getSuggestion(this)};var divOnMouseDownNaf=function(){_inputFieldNaf.value=getSuggestion(this)};var divOnMouseOver=function(){if(_highlightedSuggestionDiv){setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDiv")}setStylePourElement(this,"AutoCompleteDivAct")};var divOnMouseOverActiv=function(){if(_highlightedSuggestionDivActiv){setStylePourElement(_highlightedSuggestionDivActiv,"AutoCompleteDiv")}setStylePourElement(this,"AutoCompleteDivAct")};var divOnMouseOverNaf=function(){if(_highlightedSuggestionDivNaf){setStylePourElement(_highlightedSuggestionDivNaf,"AutoCompleteDiv")}setStylePourElement(this,"AutoCompleteDivAct")};var divOnMouseOut=function(){setStylePourElement(this,"AutoCompleteDiv")};
