function Tail()
{
//===================================== CLASS BODY =========================================
//VARIABLES
 var arr = new Array();
 var topid = 0;
 
//METHODS
 this.push = function(element)
 {
  arr[arr.length] = element;
 }
 
 this.pop = function()
 {
  if (topid > arr.length-1)
   return null;
  return arr[topid++];
 }
 
 this.top = function()
 {
  return arr[topid];
 }
 
 this.recycle = function()
 {
  for (var i = 0;i < arr.length-topid;i++)
   arr[i] = arr[topid+i];
  arr.length -= topid;
  topid = 0;
 }
//===================================== INIT SECTION =======================================
}
