<!-- Begin hiding JavaScript

// Check for existence of the fpccookie 
var nameOfVisitor = getCookie(CName)
if(nameOfVisitor != null) {location.href= "mainc1.htm"}

function getCookieVal (offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1) { endstr = document.cookie.length;    }
    return unescape(document.cookie.substring(offset, endstr));
}

function getCookie (cookieName)  {
    var arg = cookieName + "=";
    var argLength = arg.length;
    var cookieLength = document.cookie.length;
    var i = 0;
    while (i < cookieLength)  {
    var j = i + argLength;
    if (document.cookie.substring(i, j) == arg) {return getCookieVal(j)}
    if (i == 0) {break}}
     return null;
}

function setCookie(name, value) {
    var argv = setCookie.arguments;
    var argc = setCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? 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 submitentry(userName, value) {
    password = document.password1.password2.value.toLowerCase()
    username = document.password1.username2.value.toLowerCase()
    passcode = 1
    usercode = 1
    for(i = 0; i < password.length; i++) {passcode *= password.charCodeAt(i);}
    for(x = 0; x < username.length; x++) {usercode *= username.charCodeAt(x);}
    if(usercode==usercodecheck&&passcode==passcodecheck) {
         var stay=confirm("Click 'OK' to save this Username & Password for future sessions")
      if (!stay) {var expdate = null}
      else {var expdate = new Date();expdate.setTime(expdate.getTime() + (1000 * 60 * 60 * 24 * 730))}
         setCookie( CName, password, expdate);
         location.href = "mainc1.htm"}
    else{alert("Sorry, password/username combination is incorrect      ")}
}

// End hiding JavaScript -->
