function checkFirstVisit(particle_array) {
    if(document.cookie.indexOf('mycookie')==-1) {
      // cookie doesn't exist, create it now
      document.cookie = 'mycookie=1';
      pass_data(particle_array);
    }
    else {
      // not first visit, don't repass data
    }
  }
//dont want database to be spammed with entries if the user is refreshing the page
dont want database to be spammed with entries if the user is refreshing the page
dont want database to be spammed with entries if the user is refreshing the page
function checkFirstVisit(particle_array) {
    if(document.cookie.indexOf('mycookie')==-1) {
      document.cookie = 'mycookie=1';
      pass_data(particle_array);
    }
    else {
    }
  }
function checkFirstVisit ( particle_array ) { if ( document . cookie . indexOf ( 'mycookie' ) == - 1 ) { document . cookie = 'mycookie=1' ; pass_data ( particle_array ) ; } else { } }
dont want database to be spammed with entries if the user is refreshing the page
dont want database to be spammed with entries if the user is refreshing the page
// cookie doesn't exist, create it now // not first visit, don't repass data