<script type="text/javascript">
  // drawPercentBar()
  // Written by Matthew Harvey (matt AT unlikelywords DOT com)
  // (http://www.unlikelywords.com/html-morsels/)
  // Mod by Yvonne
  // (http://www.cogknition.org/knitblogging/percentagebar/)
  // Modded by BrophY for varibles while calling function
  // Distributed under the Creative Commons 
  // "Attribution-NonCommercial-ShareAlike 2.0" License
  // (http://creativecommons.org/licenses/by-nc-sa/2.0/)


  function drawPercentBar(percent, color, background, width, border) 
  { 

    if (!color) { color = "#B0B0B0"; }
    if (!background) { background = "#ffffff"; }
    if (!border) { border = "#000000"; }
 
    var pixels = width * (percent / width); 

    document.write("<div style=\"position: relative; line-height: 1em; background-color: " 
                   + background + "; border: 1px solid " + border + "; width: " 
                   + width + "px\">"); 
    document.write("<div style=\"height: 0.55em; width: " + pixels + "px; background-color: "
                   + color + ";\"><\/div>"); 
    document.write("<div style=\"position: absolute; text-align: center; width: " 
                   + width + "px; <?php echo(''.$lineheight.''); ?>; left: 0\">" + percent + "%<\/div>");
    document.write("<\/div>"); 
  } 

</script>