function closehint(){ document.getElementById('hint4').style.visibility='hidden'; Hint3Name=''; } function findlogin(title, name, mtype, addon) { var s = ''; s='
'+ 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)
'+(addon?addon:'')+'
'; s = crtmagic(mtype, title, s); document.getElementById('hint4').innerHTML = s; top.changeni(name); document.getElementById('hint4').style.visibility = 'visible'; document.getElementById('hint4').style.left = '100px'; document.getElementById('hint4').style.top = '50px'; document.getElementById(name).focus(); Hint3Name = name; } function save_complect(title, name, mtype, addon) { var s = ''; s='
'+ 'Введите название комплекта:
'+(addon?addon:'')+'
'; s = crtmagic(mtype, title, s); document.getElementById('hint4').innerHTML = s; document.getElementById('hint4').style.visibility = 'visible'; document.getElementById('hint4').style.left = '100px'; document.getElementById('hint4').style.top = '50px'; document.getElementById(name).focus(); Hint3Name = name; } function dconfirm(title, script, text, mtype) { var s; s='
'+ text+'
'; s = crtmagic(mtype, title, s); document.getElementById("hint4").innerHTML = s; document.getElementById("hint4").style.visibility = 'visible'; document.getElementById("hint4").style.left = '100px'; document.getElementById("hint4").style.top = '50px'; document.getElementById("hint4").focus(); Hint3Name = name; } function useMagick(title, name, mtype, url) { var s = ''; s='
'+ 'Укажите логин персонажа:
(можно щелкнуть по логину в чате)
'; s = crtmagic(mtype, title, s); document.getElementById('hint4').innerHTML = s; top.changeni(name); document.getElementById('hint4').style.visibility = 'visible'; document.getElementById('hint4').style.left = '100px'; document.getElementById('hint4').style.top = '50px'; document.getElementById(name).focus(); Hint3Name = name; } function useSharp(title, name, mtype, url) { var s = ''; s='
'+ 'Введите название предмета:
'; s = crtmagic(mtype, title, s); document.getElementById('hint4').innerHTML = s; top.changeni(name); document.getElementById('hint4').style.visibility = 'visible'; document.getElementById('hint4').style.left = '100px'; document.getElementById('hint4').style.top = '50px'; document.getElementById(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, subm) { 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, 12, 0, 'water', 57, 30, 33, 20, 21, 14, 11, 12, 0, 'air', 57, 30, 33, 20, 21, 14, 11, 12, 0, 'earth', 57,30, 33, 20, 21, 14, 11, 12, 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#', 'http://'+top.config['img']+'/i/misc/dmagic/'+names[mtype*10]+'_30.gif'); var s=''+ ''+ ''+ ''+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ '
'+ ''+ ''+ (names[mtype*10+7]?'':'')+ ''+ ''+ ''+ (names[mtype*10+8]?'':'')+ ''+ '
  '+ ''+ ''+ ''+ ''+ '
'+ '
'+title+ ' 
'+ '
'+body+ '
  
'+ ''+ ''+ ''+ ''+ ''+ ''+ '
'; return s; }