function srOnDocumentClick(e)
{
var target = (window.event) ? window.event.srcElement : e.target;
if(document.srExpandedList)
{
if((target.srIndex || target.srIndex === 0) && document.srExpandedList == target.parentNode )
document.srExpandedList.srCollapse(target);
else
document.srExpandedList.srCollapse();
switch ($('select.kuk').val()) {
case '1':
$('ul.srBlur').css({background:"url('css/jaz/selectbg.png') "} );
$('ul.srFocus').css({background:"url('css/jaz/selectbg.png') "} ); break;
case '2':
$('ul.srFocus').css({background:"url('css/jaz/sbgfr.png')"} );
$('ul.srBlur').css({background:"url('css/jaz/sbgfr.png')"} ); break;
}
}
else
{
if(target.srIndex || target.srIndex === 0)
target.parentNode.srExpand();
}
}
function srReplaceSelects()
{
var s = $('select.kuk');
var len = s.length
for (var i = 0; i < len; i++)
rsSelectReplace(s[i]);
srAddEvent(document, 'click', srOnDocumentClick);
}
srAddEvent(window, 'load', srReplaceSelects);
вот часть кода с обработчиком click