// Status Balken 
// Written by Hoffi (hoffi@lanparty.de)
// The code written in the next two lines is the html source to paste into the Desgin or into your Homepage HTML
//   <script language="JavaScript" src="http://lansurfer.lanparty.de/party/js_stats.phtml?party=496" type="text/javascript"></script>
//   <script language="JavaScript" src="http://your.domain.com/javascript/status.js" type="text/javascript"></script>

// There are three variables defined in the Lansurfer Script
// LS_GuestCount 
// LS_PaidCount
// LS_MaxGuests

// maximum width and height of the bars  
  var $width = 90;
  var $heigth = 5;
// path to the gifs and the names of themselves
  var $imagepath = "http://www.lanparty.utcd.de/images/";
  var $greenbar  = "greenbar.gif";
  var $yellowbar = "yellowbar.gif";
  var $redbar    = "redbar.gif";
  

// The following code doesen't need to be changed
  $full = LS_GuestCount + LS_PaidCount;

  if ($full > LS_MaxGuests) {
	$reference = $full;
  } 
  else {
	$reference = LS_MaxGuests ;
  }
	
  $teilnehmerbar = $width * LS_MaxGuests / $reference;
  $paidbar = ($width * LS_PaidCount) / $reference;
  $guestbar = ($width *  (LS_GuestCount  - LS_PaidCount)) / $reference;
  document.write('<font size="1">&nbsp;<img src="'+$imagepath+$greenbar+'" height="'+$heigth+'" width="'+$teilnehmerbar+'" alt="'+LS_MaxGuests+' Teilnehmer"><br>');
  document.write('&nbsp;<img src="'+$imagepath+$redbar+'" height="'+$heigth+'" width="'+$paidbar+'" alt="'+LS_PaidCount+' Bezahlte Gäste"><img src="'+$imagepath+$yellowbar+'" height="'+$heigth+'" width="'+$guestbar+'" alt="'+LS_GuestCount+' Anmeldungen"></font><br><br>');
