var clix = 50;
var copy = "Fabian Neumann ©2000";
var acc = clix;
var bye = false;

function count(objekt)
{
 clix--;
 window.status=copy+" @"+clix;

 if(clix <= 0 && bye==false)
 {
  order = confirm("Your account of "+acc+" free clicks is expired.\nChoose OK to order more clicks.\nCancel to leave the page.");
  if(order == true)
  {
   do
   {
    newClix = prompt("How many free clicks do you want (max. 1000)?",50);
   } while(newClix>1000 || newClix<=0);

   clix=newClix;
   acc=newClix;
   window.status="Thank you for your order of "+acc+" more free clicks!";
   window.setTimeout("window.status=copy+' @'+clix",3000);
  }
  else
  {
   objekt.innerText="";
   window.status="GOOD BYE";
   bye = true;
   window.close();
  }
 }
} //ende count()