// JavaScript Diagramme (c) 2010 Lutz Rodenhauser
// Balkendiagramm mit je vier Balken pro Datensatz 
document.writeln('<div style="font-size:8pt;border:solid 1px #000000;margin:5px;' + diagrammausrichtung + diagrammfarben + 'padding:5px;">');
if (diagrammtitel != '')
{
 document.writeln('<p style="margin:1px;padding:1px;font-weight:bold;">' + diagrammtitel + '</p>');
}
j=datensatztitel.length;
document.writeln('<table border="0">');
for (var i=0; i<j; i++)
{
  document.writeln('<tr><td>' + datensatztitel[i] + '</td>'); 
  document.writeln('<td><div style="border:solid 1px #000000;'); 
  document.writeln('margin:1px;height:' + balkengroesse + 'px;width:' + datensatzprozent1[i] + 'px;background-color:#00ff00;">&nbsp;</div>');
  document.writeln('<div style="border:solid 1px #000000;'); 
  document.writeln('margin:1px;height:' + balkengroesse + 'px;width:' + datensatzprozent2[i] + 'px;background-color:#0000ff;">&nbsp;</div>');
  document.writeln('<div style="border:solid 1px #000000;'); 
  document.writeln('margin:1px;height:' + balkengroesse + 'px;width:' + datensatzprozent3[i] + 'px;background-color:yellow;">&nbsp;</div>');
  document.writeln('<div style="border:solid 1px #000000;'); 
  document.writeln('margin:1px;height:' + balkengroesse + 'px;width:' + datensatzprozent4[i] + 'px;background-color:#ff0000;">&nbsp;</div></td></tr>');
}
if (diagrammlegende1 != '')
{
 document.writeln('<tr><td colspan="2"><div style="float:left;margin:0px;height:10px;width:10px;background-color:#00ff00;">&nbsp;</div>&nbsp;' + diagrammlegende1 + '</td></tr>');
}
if (diagrammlegende2 != '')
{
 document.writeln('<tr><td colspan="2"><div style="float:left;margin:0px;height:10px;width:10px;background-color:#0000ff;">&nbsp;</div>&nbsp;' + diagrammlegende2 + '</td></tr>');
}
if (diagrammlegende3 != '')
{
 document.writeln('<tr><td colspan="2"><div style="float:left;margin:0px;height:10px;width:10px;background-color:yellow;">&nbsp;</div>&nbsp;' + diagrammlegende3 + '</td></tr>');
}
if (diagrammlegende4 != '')
{
 document.writeln('<tr><td colspan="2"><div style="float:left;margin:0px;height:10px;width:10px;background-color:#ff0000;">&nbsp;</div>&nbsp;' + diagrammlegende4 + '</td></tr>');
}
document.writeln('</table>');
if (diagrammtext != '')
{
 document.writeln('<p style="clear:left;margin:1px;padding:1px;">' + diagrammtext +'</p>');
}
else
{
 document.writeln('<br clear=all>');
}
document.writeln('</div>');


