131 lines
6.8 KiB
JavaScript
131 lines
6.8 KiB
JavaScript
function findlogin2(title, script, name) {
|
|
var s = '<form action="'+script+'" method=POST><table width=270 cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>'+title+'</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</td></tr><tr><td colspan=2>';
|
|
s +='<table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td align=center>';
|
|
s +='<table width=90% cellspacing=0 cellpadding=2 align=center><tr><td align=left colspan="2">';
|
|
s +='Укажите логин персонажа:<br><small>(можно щелкнуть по логину в чате)</small></td></tr>';
|
|
s += '<tr><td align=right><small><b>Логин:</b></small></td><td><INPUT TYPE=text NAME="'+name+'" style="width:140px"></td></tr>';
|
|
s += '<INPUT type=image SRC=i/friend/b__ok.gif WIDTH=25 HEIGHT=18 ALT="Добавить контакт" style="border:0; vertical-align: middle"></TD></TR></TABLE><INPUT TYPE=hidden name=sd4 value="1"></TD></TR></TABLE></td></tr></table></FORM>';
|
|
document.all("hint3").innerHTML = s;
|
|
document.all("hint3").style.visibility = "visible";
|
|
document.all("hint3").style.left = 100;
|
|
document.all("hint3").style.top = document.body.scrollTop+50;
|
|
document.all(name).focus();
|
|
Hint3Name = name;
|
|
}
|
|
|
|
function findlogin(title, script, name) {
|
|
var s;
|
|
s = '<form action="'+script+'" method=POST name=slform><table border=0 width=100% cellspacing="0" cellpadding="2"><tr><td colspan=2>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043B\u043E\u0433\u0438\u043D \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u0436\u0430: <br><small>(\u041C\u043E\u0436\u043D\u043E \u043A\u043B\u0438\u043A\u043D\u0443\u0442\u044C \u043F\u043E \u043B\u043E\u0433\u0438\u043D\u0443 \u0432 \u0447\u0430\u0442\u0435)</small>'+
|
|
'</TD></TR><TR><TD width=50% align=right style="padding-left:5">'+
|
|
'<input style="width: 100%" type="text" name="'+name+'" id="'+name+'" /></TD><TD width=50%>'+
|
|
'<input type=image SRC="#IMGSRC#" WIDTH="27" HEIGHT="20" BORDER=0 alt="" onclick="slform.submit();" /></TD></TR></TABLE></FORM>';
|
|
|
|
s = crtmagic(5, title, s);
|
|
document.getElementById("hint3").innerHTML = s;
|
|
document.getElementById("hint3").style.visibility = "visible";
|
|
document.getElementById("hint3").style.left = 200;
|
|
document.getElementById("hint3").style.top = 100;
|
|
Hint3Name = name;
|
|
document.getElementById(name).focus();
|
|
}
|
|
|
|
var sd4 = 0;
|
|
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, noclose) {
|
|
return crtmagic_full(mtype, title, body, subm, noclose, 270, 0);
|
|
}
|
|
|
|
function closehint3() {
|
|
document.getElementById("hint3").style.visibility = "hidden";
|
|
Hint3Name = '';
|
|
}
|
|
|
|
function crtmagic_full(mtype, title, body, subm, noclose, dx, dy) {
|
|
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#', '/i/misc/dmagic/'+names[mtype*10]+'_30.gif');
|
|
}
|
|
|
|
var s = '<table width="'+dx+(dy?'" height="'+dy:'')+'" border="0" align="center" cellpadding="0" cellspacing="0">'+
|
|
'<tr>'+
|
|
'<td width="100%">'+
|
|
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
|
'<tr><td>'+
|
|
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'+
|
|
'<tr>'+
|
|
'<td width="'+names[mtype*10+1]+'" align="left"><img src="/i/misc/dmagic/b'+names[mtype*10]+'_03.gif" width="'+names[mtype*10+1]+'" height="'+names[mtype*10+2]+'"></td>'+
|
|
'<td width="100%" align="right" background="/i/misc/dmagic/b'+names[mtype*10]+'_05.gif"></td>'+
|
|
'<td width="'+names[mtype*10+3]+'" align="right"><img src="/i/misc/dmagic/b'+names[mtype*10]+'_07.gif" width="'+names[mtype*10+3]+'" height="'+names[mtype*10+2]+'"></td>'+
|
|
'</tr>'+
|
|
'</table></td>'+
|
|
'</tr>'+
|
|
'<tr><td>'+
|
|
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
|
'<tr>'+
|
|
(names[mtype*10+7]?'<td width="'+names[mtype*10+7]+'"><SPAN style="width:'+names[mtype*10+7]+'"> </SPAN></td>':'')+
|
|
'<td width="5" background="/i/misc/dmagic/b'+names[mtype*10]+'_17.gif"> </td>'+
|
|
'<td width="100%">'+
|
|
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
|
'<tr><td bgcolor="#'+colors[mtype*2]+'"'+(names[mtype*10+9]?' style="padding-top: '+names[mtype*10+9]+'"':'')+' >'+
|
|
'<table border=0 width=100% cellspacing="0" cellpadding="0"><td style="padding-left: 20" align=center><B>'+title+
|
|
'</td><td width=20 align=right valign=top style="cursor: hand" '+(noclose?'':'onclick="closehint3();" ') + '><IMG src="/i/clear.gif" width=13 height=13> </td></table>'+
|
|
'</td></tr>'+
|
|
'<tr>'+
|
|
'<td align="center" bgcolor="#'+colors[mtype*2+1]+'">'+body+
|
|
'</tr>'+
|
|
'</table></td>'+
|
|
'<td width="5" background="/i/misc/dmagic/b'+names[mtype*10]+'_19.gif"> </td>'+
|
|
(names[mtype*10+8]?'<td width="'+names[mtype*10+8]+'"><SPAN style="width:'+names[mtype*10+8]+'"> </SPAN></td></td>':'')+
|
|
'</tr>'+
|
|
'</table></td>'+
|
|
'</tr>'+
|
|
'<tr><td>'+
|
|
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'+
|
|
'<tr>'+
|
|
'<td width="'+names[mtype*10+4]+'" align="left"><img src="/i/misc/dmagic/b'+names[mtype*10]+'_27.gif" width="'+names[mtype*10+4]+'" height="'+names[mtype*10+6]+'"></td>'+
|
|
'<td width="100%" align="right" background="/i/misc/dmagic/b'+names[mtype*10]+'_29.gif"></td>'+
|
|
'<td width="'+names[mtype*10+5]+'" align="right"><img src="/i/misc/dmagic/b'+names[mtype*10]+'_31.gif" width="'+names[mtype*10+5]+'" height="'+names[mtype*10+6]+'"></td>'+
|
|
'</tr>'+
|
|
'</table></td>'+
|
|
'</tr>'+
|
|
'</table></td>'+
|
|
'</tr>'+
|
|
'</table>';
|
|
|
|
return s;
|
|
} |