var AutoTips = function(A){
var elem = ? D.$() : ;
var checkLength = 5;
var _this = {};
var key = '';
_this.start = function(){
if(!D.$()){
var h = ();
var info = (elem);
var div = ('DIV');
var bs = ();
h = ('$top$',( + )).
replace('$left$',( + )).
replace('$width$',).
replace('$height$',).
replace('$SCTOP$','0');
= h;
(div);
}else{
_this.updatePosstion();
}
}
_this.keyupFn = function(e){
var e = e || ;
var code = ;
if(code == 38 || code == 40 || code == 13) {
if(code==13 && D.$(). != 'none'){
_this.enter();
}
return false;
}
var cp = (elem);
if(!cp) return _this.hide();
var valuep = (0, cp);
var val = (-checkLength);
var chars = (/(\w+)?@(\w+)$|@$/);
if(chars == null) return _this.hide();
var char = chars[2] ? chars[2] : '';
D.$().innerHTML = (0, - ).replace(/\n/g,'<br/>').
replace(/\s/g,' ') + ;
_this.showList(char);
}
_this.showList = function(char){
key = char;
var data = (friendsData, char, 5);
var html = ();
var h = '';
var len = ;
if(len == 0){_this.hide();return;}
var reg = new RegExp(char);
var em = '<em>'+ char +'</em>';
for(var i=0; i<len; i++){
var hm = data[i]['user'].replace(reg,em);
h += (/\$ACCOUNT\$|\$NAME\$/g,data[i]['name']).
replace('$SACCOUNT$',hm).replace('$ID$',data[i]['user']);
}
_this.updatePosstion();
var p = D.$().getBoundingClientRect();
var bs = ();
var d = D.$().style;
= + 20 + + 'px';
= - 5 + 'px';
D.$().innerHTML = h;
_this.show();
}
_this.KeyDown = function(e){
var e = e || ;
var code = ;
if(code == 38 || code == 40 || code == 13){
return (code);
}
return true;
}
_this.updatePosstion = function(){
var p = (elem);
var bs = ();
var d = D.$().style;
= + +'px';
= + + 'px';
= +'px';
= +'px';
D.$().scrollTop = ;
}
_this.show = function(){
= D.$().getElementsByTagName('li');
= -1;
selectList._this = _this;
_this.cursorSelect();
= _this.KeyDown;
D.$(). = 'block';
}
_this.cursorSelect = function(list){
for(var i=0; i<; i++){
list[i].onmouseover = (function(i){
return function(){(i)};
})(i);
list[i].onclick = _this.enter;
}
}
_this.hide = function(){
= null;
= -1;
selectList._this = null;
(elem, 'keydown', _this.KeyDown);
D.$(). = 'none';
}
_this.bind = function(){
= _this.keyupFn;
= _this.keyupFn;
= function(){setTimeout(_this.hide, 100)}
//= fn;
//(elem, 'keyup', _this.keyupFn, false)
//(elem, 'keyup', fn, false)
//(elem, 'click', _this.keyupFn, false);
//(elem, 'blur', function(){setTimeout(_this.hide, 100)}, false);
}
_this.enter = function(){
(elem, , key);
(elem, [].getElementsByTagName('A')[0].rel+' ');
_this.hide();
return false;
}
return _this;
}