22 lines
1.0 KiB
JavaScript
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> </td><td bgcolor="#e2e0e0"><small> <b>'+title+':<b> </small></td>';
|
|
if (link_text){
|
|
s += '<td> </td><td bgcolor="#e2e0e0"><small> <a href="'+link+'">'+link_text+'</a> </small></td>';
|
|
}
|
|
s += '</tr></table>';
|
|
// window.clipboardData.setData('Text', s);
|
|
document.writeln(s);
|
|
}
|