function pbsprivate_show_survey(suburl, forceopen) {
  // Setup Survey
  var cookiename = "pbsol.survey.2004";
  var expirationdate = "May 31, 2005";

  // Remove this to launch
  // var debugonly = pbs_get_cookieval("testsurvey");
  // if (debugonly != "true") return false;

  var siteinfo = pbs_compare_url_to_list(suburl, PBS_surv_sites);
  if (siteinfo) {
    // Check to see if they've already taken the survey.
    var surveyflag = pbs_get_cookieval(cookiename);

    if(surveyflag == null || isNaN(surveyflag)) {
      surveyflag = 0;
    } else {
      surveyflag = parseInt(surveyflag);
    }

    if(surveyflag != 0 && parseInt(forceopen) != 1) return false;

    var myrand = Math.round(Math.random() * 100 * siteinfo[2]);
    // var myrand = Math.round(Math.random() * 100 * 3);
    pbs_set_cookieval(cookiename, myrand, expirationdate);

    if ((myrand < 100) || (forceopen > 0))
      window.location = "/includes/survey/top20/" + siteinfo[1];
  }
  return false;
}

function pbsprivate_takesurvey(url) {
  if(url) {
    url = "/survey/2004/top20/redir/" + url;
    window.open(url, "surveyPopUp",
                     'toolbar=0,location=0,scrollbars=1,menubar=0,' +
                     'resizable=1,width=800,height=600');
  }

  window.history.back();
  return false;
}

