function LZ(x) {return(x<0||x>9?x:"0"+x)}

function TimeModified(x) {
update = new Date(document.lastModified)
theMonth = update.getMonth() + 1
theDate = update.getDate()
theYear = update.getYear()
theHours = update.getHours()
theMinutes = update.getMinutes()
theSeconds = update.getSeconds()

theYear = theYear + ((theYear < 70) ? 2000 : 0);
theYear = theYear + ((theYear < 1900) ? 1900 : 0);

document.writeln("This page was last updated on "+ theYear  + "/" + theMonth + "/" + theDate + " " + LZ(theHours) + ":" + LZ(theMinutes) + ":" + LZ(theSeconds));

}

function WriteCookie (cookieName, cookieValue, expiry) 
{
var expDate = new Date();

if(expiry)
{
expDate.setTime (expDate.getTime() + expiry);
    document.cookie = cookieName + "=" + escape (cookieValue) + "; expires=" + expDate.toGMTString();
    }
    else
    {
        document.cookie = cookieName + "=" + escape (cookieValue);
        }
}

function setCookie ()
{
var name = document.forms[0].elements[0].value;
var value = document.forms[0].elements[1].value;
var num = document.forms[0].elements[2].value;
var select = document.forms[0].elements[3].selectedIndex;

if(num == 0)
{
WriteCookie(name, value, 0);
}
else if(select == 0)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num);
}
else if(select == 1)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 31);
}
else if(select == 2)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 365);
}

}


function ReadCookie (CookieName) {
  var CookieString = document.cookie;
  var CookieSet = CookieString.split (';');
  var SetSize = CookieSet.length;
  var CookiePieces
  var ReturnValue = "";
  var x = 0;

  for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {

    CookiePieces = CookieSet[x].split ('=');

    if (CookiePieces[0].substring (0,1) == ' ') {
      CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
    }

    if (CookiePieces[0] == CookieName) {
      ReturnValue = CookiePieces[1];
    }

  }

  document.forms[0].elements[1].value = ReturnValue;;

}
function setCookie ()
{
var name = document.forms[0].elements[0].value;
var value = document.forms[0].elements[1].value;
var num = document.forms[0].elements[2].value;
var select = document.forms[0].elements[3].selectedIndex;

if(num == 0)
{
WriteCookie(name, value, 0);
}
else if(select == 0)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num);
}
else if(select == 1)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 31);
}
else if(select == 2)
{
WriteCookie(name, value, 1000 * 60 * 60 * 24 * num * 365);
}

}


function ReadCookie (CookieName) {
  var CookieString = document.cookie;
  var CookieSet = CookieString.split (';');
  var SetSize = CookieSet.length;
  var CookiePieces
  var ReturnValue = "";
  var x = 0;

  for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {

    CookiePieces = CookieSet[x].split ('=');

    if (CookiePieces[0].substring (0,1) == ' ') {
      CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
    }

    if (CookiePieces[0] == CookieName) {
      ReturnValue = CookiePieces[1];
    }

  }

  document.forms[0].elements[1].value = ReturnValue;;

}
        var supported = (document.getElementById || document.all);

        if (supported)
        {
            document.write("<STYLE TYPE='text/css'>");
                document.write(".section {display: none}");
                document.write("</STYLE>");
            
                var max = 4;
                var shown = new Array();
                for (var i=1;i<=max;i++)                
            {
                    shown[i+1] = false;
                shown[1] = true;
        }
        }

        function blocking(i)
        {
                if (!supported)
            {
                alert('This link does not work in your browser.');
                return;
            }
                shown[i] = (shown[i]) ? false : true;
                current = (shown[i]) ? 'block' : 'none';
            if (document.getElementById)
            {
                    document.getElementById('number'+i).style.display = current;
            }
            else if (document.all)
                {
                        document.all['number'+i].style.display = current;
                }
    }

