// flash call to create cookie once details have been submitted
// cookie script partly from http://www.w3schools.com/JS/

function setCookie() {
	document.cookie="floaded=true"
}

function getCookie(floaded)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(floaded + "=");
  if (c_start!=-1)
    {
    c_start=c_start + floaded.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function checkCookie() {
   var fload = getCookie('floaded');

   if (fload!=null && fload!="") {
      //alert('cookie present');
      var theFlash = document.getElementById("myFlashContent");
      theFlash.cookiePresentJs(true);
   } else {
      //alert('cookie not present');
      var theFlash = document.getElementById("myFlashContent");
      theFlash.cookiePresentJs(false);
   }
}
