battles/js/main_096_ru.js
2018-01-28 18:40:49 +02:00

22 lines
1.0 KiB
JavaScript

function DrawBar(title, id, flags, link_text, link){
// alert(title + document);
var s ='<table width="100%" border=0 cellspacing=0 cellpadding=1 background="http://img.combats.com/i/icon/back.gif">' +
'<tr><td valign=top>';
var sz = 11, num = 1;
var rnd = Math.random();
s += '<a name="bar__'+id+'" href="?edit='+rnd+'&bar='+id+'&a=explore&is_open='+(1-(flags & 1))+'#bar_'+id+'">';
if (flags & 1) {
s+= '<img width='+sz+' height=9 alt="Скрыть" border=0 src="http://img.combats.com/i/icon/'+num+'minus.gif">';
} else {
s+= '<img width='+sz+' height=9 alt="Показать" border=0 src="http://img.combats.com/i/icon/'+num+'plus.gif">';
}
s += '</a> </td>';
s += '<td>&nbsp;</td><td bgcolor="#e2e0e0"><small>&nbsp;<b>'+title+':<b>&nbsp;</small></td>';
if (link_text){
s += '<td>&nbsp;</td><td bgcolor="#e2e0e0"><small>&nbsp;<a href="'+link+'">'+link_text+'</a>&nbsp;</small></td>';
}
s += '</tr></table>';
// window.clipboardData.setData('Text', s);
document.writeln(s);
}