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 (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;
}

// Returns true if exp is in the past, ie. expired
function checkExpirationTime(exp)
{
  now = new Date();
  expTime = new Date(exp);

  if (now.getFullYear() < expTime.getFullYear())
  {
    return false;
  }
  else if ((now.getFullYear() == expTime.getFullYear()) && (now.getMonth() < expTime.getMonth()))
  {
    return false;
  }
  else if ((now.getFullYear() == expTime.getFullYear()) && (now.getMonth() == expTime.getMonth()) && (now.getDate() < expTime.getDate()))
  {
    return false;
  }
  else if ((now.getFullYear() == expTime.getFullYear()) && (now.getMonth() == expTime.getMonth()) && (now.getDate() == expTime.getDate()) && (now.getHours() < expTime.getHours()))
  {
    return false;
  }
  // No nead to get more specific
  return true;
}
// This has to be put here because it will hinder the Netscape4 file to show properly, if put in with the html
function submit_vote()
{
        // First, check if user has choosen a position
        var i, thisElement;
        var flag = false;
        for (i = 0; i < document['cur_vote'].elements.length; i++)
        {
                thisElement = document['cur_vote'].elements[i]
                if ((thisElement.name == "POSITION") && thisElement.checked)
                {
                        flag = true;
                }//end if
        }//end for
        if (!flag)
        {
             return;
        }//end if
        else
        {
        var cookieName = "VOV" + document['cur_vote'].voteID.value;
        var cookieValue = GetCookie(cookieName);
//alert(cookieName + " " + cookieValue);
        if (cookieValue != 1)
        {
            document['cur_vote'].submit();
        }//end if
        else
        {
// This shouldn't really ever happen, because if the cookie is set, the results are shown. Just to be safe, we could display an error, but that's not possible on netscape4
           return;
        }//end else
    }//end else
}//end submit_vote()

// Check to see if the remote host is allowed to serve this
//##ACCESSLIST##

// Get the hosting url, and get the host part
hostStr = top.document.location.hostname.toString();
 
// Check host against list
re = new RegExp(hostStr, "i");

var tempVar = 1;
if (tempVar)//re.test(accessList))
{
var expireValue = "Friday, 26-Mar-2010 12:00:00 GMT";
if ((navigator.appName.indexOf("Netscape") != -1) && (navigator.appVersion.indexOf("4") != -1))
{
  var cookieVal = GetCookie("VOV60632758");
  if ((cookieVal != 1))// || (checkExpirationTime(new Date(expireValue))))
  {
   document.write("<script language=\"JavaScript\" src=\"http://www.vote.com/remote/60479437/netscape4_60632758.js\">");
   document.write("</script>");
  }//end if
  else
  { 
    document.write("<script language=\"JavaScript\" src=\"http://www.vote.com/remote/processRemoteHTMLVote.phtml?netscape4=1&voteID=60632758&locale=usen&resultsBack=1&backgroundColor=FFFFFF&topic=Should%20Congress%20Stop%20The%20Massive%20Increases%20In%20Health%20Insurance%20Premiums?&partnerID=60479437&width=125&removePoweredBy=1\"><\/script>");
  }//end else
}//end if
else
{
document.write("<IFRAME SRC=\"http://www.vote.com/remote/60479437/iframe_60632758.phtml\" scrolling=\"no\" marginwidth=0 marginheight=0 frameborder=0 vspace=0 hspace=0 width=125 HEIGHT=460> </IFRAME>");
}//end else
}//end if

