var Hint3Name = ''; function fixspaces (s) { while (s.substr(s.length - 1, s.length) == " ") s = s.substr(0, s.length - 1); while (s.substr(0,1) == " ") s = s.substr(1, s.length); return (s); } function bank_open (ac_list, name) { var ac = ac_list.split(','); var s; var opt = ''; s = ''+ ''+ ''+ ''+ ''+ ''+ '
Выберите счёт и введите пароль
' + opt+ ' 
'; s = crtmagic ('', 'Счёт в банке', s, ''); if (!name) name = "hint3"; $('#'+name).html(s).css({'left': pos.x - 135 + "px", 'top': pos.y - 30 + "px", 'zIndex': '101'}).fadeIn('fast'); $('[name=credit]').focus(); Hint3Name = 'credit'; } function dialogconfirm (title, script, text, mtype) { var s; s = '
'+text+ '
'; s = crtmagic(mtype, title, s); $('#hint3').html(s); var coor = getCenter($('#hint3').width(), $('#hint3').height()); $('#hint3').css({'left': coor.x, 'top': coor.y, 'zIndex': 200}).fadeIn('fast'); Hint3Name = "hint3"; } function findLogin (title, script, name, defaultlogin, mtype, addon, noclose) { var s; s = '
'+ ''+ ''+ ''+ '
Укажите логин персонажа:
(можно щелкнуть по логину в чате)
'+(addon ?addon :'')+'
'; s = crtmagic(mtype, title, s, noclose); $('#hint3').html(s).css({'left': 100, 'top': 50, 'zIndex': 200}).fadeIn('fast'); $('[name='+name+']').focus(); Hint3Name = name; } function foundmagictype (mtypes) { if (mtypes) { mtypes = mtypes + ""; if (mtypes.indexOf(',') == -1) return parseInt(mtypes); var s = mtypes.split(','); var found = 0; var doubl = 0; var maxfound = 0; for (i = 0; i < s.length; i++) { var k = parseInt(s[i]); if (k > maxfound) { found = i + 1; maxfound = k; doubl = 0; } else if (k == maxfound) doubl = 1; } if (doubl) return 0; return found; } return 0; } function crtmagic (mtype, title, body, noclose) { var mtype = foundmagictype(mtype); var names = new Array ( 'neitral', 17, 6, 14, 17, 14, 7, 0, 0, 3, 'fire', 57, 30, 33, 20, 21, 14, 11, 11, 0, 'water', 57, 30, 33, 20, 21, 14, 11, 11, 0, 'air', 57, 30, 33, 20, 21, 14, 11, 11, 0, 'earth', 57,30, 33, 20, 21, 14, 11, 11, 0, 'white', 51, 25, 46, 44, 44, 10, 5, 5, 0, 'gray', 51, 25, 46, 44, 44, 10, 5, 5, 0, 'black', 51, 25, 46, 44, 44, 10, 5, 5, 0); var colors = new Array ('B1A993','DDD5BF', 'ACA396','D3CEC8', '96B0C6', 'BDCDDB', 'AEC0C9', 'CFE1EA', 'AAA291', 'D5CDBC', 'BCBBB6', 'EFEEE9', '969592', 'DADADA', '72726B', 'A6A6A0'); while (body.indexOf('#IMGSRC#') >= 0) body = body.replace('#IMGSRC#', 'i/misc/dmagic/'+names[mtype*10]+'_30.gif'); var s = ''+ ''+ ''+ ''+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ '
'+ ''+ ''+ ''+ '
'+ (names[mtype*10+7] ?'' :'')+ ''+ ''+ ''+ (names[mtype*10+8] ?'' :'')+ '
 
 '+ ''+ ''+ ''+ '
'+title+'' + ((noclose) ?'' :'') + ' 
'+ '
'+body+'
'+ '
 
 
'+ ''+ ''+ ''+ '
'+ '
'; return s; } function closehint3 () { $('#hint3').fadeOut('fast', function (){$(this).html('');}); Hint3Name = ''; }