var Hint3Name = ''; step=0; function errmess(s) { messid.innerHTML=''+s+''; highlight(); } function highlight() { if (step) return(0); step=10; setTimeout(dohi,50); } function dohi() { var hx=new Array(0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F"); step--; messid.style.color="#"+hx[Math.floor(15-step/2)]+((step&1)?"F":"8")+"0000"; if (step>0) setTimeout(dohi,50); } 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); } // Caaieiaie, iacaaiea ne?eioa, eiy iiey n eiaeiii function usescript(title, script, name, def, pretext, mtype, addon) { var s; s='
'+ pretext + '
'+(addon?addon:'')+'
'; s = crtmagic(mtype, title, s); document.getElementById("hint4").innerHTML = s; document.getElementById("hint4").style.visibility = "visible"; document.getElementById("hint4").style.left = 100; document.getElementById("hint4").style.zIndex = 200; document.getElementById("hint4").style.top = document.body.scrollTop+50; Hint3Name = name; document.getElementById(name).focus(); } // Caaieiaie, iacaaiea ne?eioa, eiy iiey n eiaeiii function findlogin(title, script, name, defaultlogin, mtype, addon, need_defend) { var s; if (need_defend && defend==false) { defend = -1; // errmess("Aeie ia aua?ai."); return false; } if (need_defend) { addon+=""; addon+=""; addon+=""; } s='
'+ 'Oea?eoa eiaei ia?niia?a:
(ii?ii uaeeioou ii eiaeio a ?aoa)
'+(addon?addon:'')+'
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML = s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = document.body.scrollTop+50; document.all(name).focus(); Hint3Name = name; } function b_confirm(script, txt, mtype, addon, need_defend) { if (need_defend && defend==false) { defend=-1 // errmess("Aeie ia aua?ai."); return false; } if (need_defend) { addon+=""; addon+=""; addon+=""; } dialogconfirm('Iiaoaa??aaiea', '/battle.pl', '
'+txt+'
Eniieuciaaou nae?an?
'+addon, mtype); } function dialogconfirm(title, script, text, mtype) { var s; s='
'+ text+'
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML = s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = document.body.scrollTop+50; document.all("tmpname423").focus(); Hint3Name = name; } function dialogOK(title, text, mtype) { var s; s='
'+ text+'
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML = s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = document.body.scrollTop+50; 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; } // Aey iaaee. Caaieiaie, iacaaiea ne?eioa, iacaaiea iaaee, iiia? aaueou a ??ecaea, eiaei ii oiie?aie?, iienaiea aii. iiey function magicklogin(title, script, magickname, n, defaultlogin, extparam, mtype) { var s = ''; if (extparam != null && extparam != '') { s = s + ''; } s = s + '
'+ 'Oea?eoa eiaei ia?niia?a:
(ii?ii uaeeioou ii eiaeio a ?aoa)
'+extparam+'
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML = s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = document.body.scrollTop+50; document.all("param").focus(); Hint3Name = 'param'; } // Iaaey function UseMagick(title, script, name, extparam, n, extparam2, mtype) { if ((extparam != null)&&(extparam != '')) { var t1='text',t2='text'; if (extparam.substr(0,1) == "!") { t1='password'; extparam=extparam.substr(1,extparam.length); } var s = ''; if (extparam2 != null && extparam2 != '') { if (extparam2.substr(0,1) == "!") { t2='password'; extparam2=extparam2.substr(1,extparam2.length); } s = s + ''; } s += '
'+ extparam + ':
'+extparam2+':
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML = s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = document.body.scrollTop+50; document.all("param").focus(); Hint3Name = 'param'; } else { dialogconfirm('Iiaoaa??aaiea', script, '
Eniieuciaaou nae?an?
'+ '', mtype); } } // Cae?uaaao ieii aaiaa eiaeia function closehint3() { document.all("hint4").style.visibility="hidden"; Hint3Name=''; } // Aey aiaaie iaaee. Caaieiaie, iacaaiea iaaee, iiia? aaueou a ??ecaea function Bmagicklogin (title, magickname, n, defaultlogin, extparam, mtype) { if (defend==false) { defend=-1; // errmess("Aeie ia aua?ai."); return false; } var s = ''; if (extparam != null && extparam != '') { s = s + ''; } s = s + '
'+ 'Oea?eoa eiaei ia?niia?a:
(ii?ii uaeeioou ii eiaeio a ?aoa)
'+extparam+'
'; s = crtmagic(mtype, title, s); document.all("hint4").innerHTML= s; document.all("hint4").style.visibility = "visible"; document.all("hint4").style.left = 100; document.all("hint4").style.zIndex = 200; document.all("hint4").style.top = 60; document.all("param").focus(); Hint3Name = 'param'; } // Iaaey function BUseMagick(name, extparam, n, mtype) { if (defend==false) { defend=-1; // errmess("Aeie ia aua?ai."); return false; } if ((extparam != null)&&(extparam != '')) { var s = prompt(extparam+':', ''); if ((s != null)&&(s != '')) { re = /\%/g; s=s.replace(re, "%25"); re = /\+/g; s=s.replace(re, "%2B"); re = /\#/g; s=s.replace(re, "%23"); re = /\?/g; s=s.replace(re, "%3F"); re = /\&/g; s=s.replace(re, "%26"); window.location.href='/battle.pl?use='+name+'¶m='+s+'&n='+n+'&mdefend='+defend+'&enemy='+enemy+'&myid='+myid; } } else { dialogconfirm('Iiaoaa??aaiea', '/battle.pl', '
Eniieuciaaou nae?an?
'+ '', mtype); } } function crtmagic(mtype, title, body, subm) { //name, XYX, X1-X2-Y2, pad.LRU 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://img.combats.com/i/misc/dmagic/'+names[mtype*10]+'_30.gif'); var s=''+ ''+ ''+ ''+ '
'+ ''+ ''+ ''+ '
'+ ''+ ''+ //(names[mtype*10+7]?'':'')+ //''+ ''+ //''+ //(names[mtype*10+8]?'':'')+ ''+ '
  '+ ''+ ''+ ''+ ''+ '
'+ '
'+title+ ' 
'+ '
'+body+ '
  
'; return s; }