/************************************************************************************************************ (C) www.dhtmlgoodies.com, April 2006 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var ajaxBox_offsetX = 0; var ajaxBox_offsetY = 0; var ajax_list_externalFile = 'list.php?username='; // Path to external file var minimumLettersBeforeLookup = 1; // Number of letters entered before a lookup is performed. var ajax_list_objects = new Array(); var ajax_list_cachedLists = new Array(); var ajax_list_activeInput = false; var ajax_list_activeItem; var ajax_list_optionDivFirstItem = false; var ajax_list_currentLetters = new Array(); var ajax_optionDiv = false; var ajax_optionDiv_iframe = false; var ajax_list_MSIE = false; if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_MSIE=true; var currentListIndex = 0; function ajax_getTopPos(inputObj) { var returnValue = inputObj.offsetTop; while((inputObj = inputObj.offsetParent) != null){ returnValue += inputObj.offsetTop; } return returnValue; } function ajax_list_cancelEvent() { return false; } function ajax_getLeftPos(inputObj) { var returnValue = inputObj.offsetLeft; while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft; return returnValue; } function ajax_option_setValue(e,inputObj) { if(!inputObj)inputObj=this; var tmpValue = inputObj.innerHTML; if(ajax_list_MSIE)tmpValue = inputObj.innerText;else tmpValue = inputObj.textContent; if(!tmpValue)tmpValue = inputObj.innerHTML; ajax_list_activeInput.value = tmpValue; if(document.getElementById(ajax_list_activeInput.name + '_hidden'))document.getElementById(ajax_list_activeInput.name + '_hidden').value = inputObj.id; ajax_options_hide(); } function ajax_options_hide() { if(ajax_optionDiv)ajax_optionDiv.style.display='none'; if(ajax_optionDiv_iframe)ajax_optionDiv_iframe.style.display='none'; } function ajax_options_rollOverActiveItem(item,fromKeyBoard) { if(ajax_list_activeItem)ajax_list_activeItem.className='optionDiv'; item.className='optionDivSelected'; ajax_list_activeItem = item; if(fromKeyBoard){ if(ajax_list_activeItem.offsetTop>ajax_optionDiv.offsetHeight){ ajax_optionDiv.scrollTop = ajax_list_activeItem.offsetTop - ajax_optionDiv.offsetHeight + ajax_list_activeItem.offsetHeight + 2 ; } if(ajax_list_activeItem.offsetTop