function ResetLoadingBar()
{
   loadingbar.setExtent(1, 38);
}

// shouldn't be called more than 4 times for 1 load

function ChangeLoadingBar(%num)
{
   if(%num $= "")
      %num = 100;
      
   %extent = loadingbar.getExtent();
   
   %x = getWord(%extent, 0);
   %y = getWord(%extent, 1);
      
   %x = %x+%num;
   
   loadingbar.setExtent(%x, %y);   
}