//*****************************************************************************************
//* 	Declare vairables
//*****************************************************************************************
			
var head="display:''"

//*****************************************************************************************
//* Function: 			MainLine
//* Passed Values:		None
//*	Returned Value:		None
//*	Purpose:			The top of all JavaScrips
//*****************************************************************************************
function getMainLine() {
}

//*****************************************************************************************
//* 	Function:					PutCookieVisits
//*   Passed Values:		none
//*		Returned Value:		none
//*		Purpose:					Given cookie, return visit attributes
//*****************************************************************************************
function PutCookieVisits(name)
  {
   var expdate = new Date();
   var visits;

   expdate.setTime(expdate.getTime() +  (48 * 60 * 60 * 1000 * 365));

   if(!(visits = GetCookie(name)))
        visits = 0;
   visits++;

   SetCookie(name, visits, expdate, "/", null, false);

   document.write("<td class='white8' align='center'>Your Visits:<td class='gold8' align='center'>" + visits + " ");
  }
//*****************************************************************************************
//* 	Function:					PutCookieMenuOption
//*   Passed Values:		DirPath, MenuItem
//*		Returned Value:		none
//*		Purpose:					Given cookie, return visit attributes
//*****************************************************************************************
function PutCookieMenuOption(DirPath, MenuItem)
  {
   var DirPathName;
   var MenuOption;
   var expdate = new Date();
   expdate.setTime(expdate.getTime() +  (48 * 60 * 60 * 1000 * 365));

   if(!(MenuOption = GetCookie("MenuOption")))
	{   MenuItemAgain = "whatMenuItem";}

   SetCookie("MenuOption", MenuItem, expdate, "/", null, false);
   
   if(!(DirPathName = GetCookie("DirPathName")))
	{   DirPathAgain = "whatPathDir";}

   SetCookie("DirPathName", DirPath, expdate, "/", null, false);

  }
//*****************************************************************************************
//* 	Function:					GetCookie
//*   Passed Values:		userName
//*		Returned Value:		none
//*		Purpose:					Gets cooie and its attributes
//*****************************************************************************************
function GetCookie (name)
 {
   var arg  = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i    = 0;

   while (i < clen)
    {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
          return GetCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
          break;
    }
   return null;
  }
//*****************************************************************************************
//* 	Function:					SetCookie
//*   Passed Values:		userName, escape value
//*		Returned Value:		none
//*		Purpose:					Sets cookie attributes
//*****************************************************************************************
function SetCookie (name, value)
  {
   var argv    = SetCookie.arguments;
   var argc    = SetCookie.arguments.length;

   var expires = (2 < argc) ? argv[2] : null;
   var path    = (3 < argc) ? argv[3] : null;
   var domain  = (4 < argc) ? argv[4] : null;
   var secure  = (5 < argc) ? argv[5] : false;

   document.cookie = name + "=" + escape (value) +
     ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
     ((path    == null) ? "" : ("; path=" + path)) +
     ((domain  == null) ? "" : ("; domain=" + domain)) +
     ((secure  == true) ? "; secure" : "");
  }
//*****************************************************************************************
//* 	Function:					GetCookieVal
//*   Passed Values:		Starting ocation of cookie attribute
//*		Returned Value:		attribute value
//*		Purpose:					Sets an returns attribute value
//*****************************************************************************************
function GetCookieVal (offset)
  {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
       endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
  }
//*****************************************************************************************
//* 	Function:					GetTime
//*   Passed Values:		none
//*		Returned Value:		none
//*		Purpose:					Show Nailed Bug 
//*****************************************************************************************
function GetCurrTime()
  {
   today = new Date();
  
   if(today.getMinutes() < 10)
     {pad = "0"}
   else
      pad = ""; 

   document.write("<table align='center'><tr><td class='white8' align='center'>"+today+"</table>");
  }
