First, thank you all that have posted help on this site. It has assisted me in numerous zencart installs for myself and friends.

I am having a small problem with a age verification pop-up that I am trying to implement on a new install of zencart v 1.51
the website is inaprops.com
and I am trying to create a popup that will prompt the user to acknowledge that they are 18 or older before proceeding to the website. The popup is working correctly, but the cookie is not being created (at least when I look at the the site with firebug). Does anything pop out to anyone else with this code:

<script type="text/javascript">

function setCookie(cname,cvalue,exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires=" + d.toGMTString();
document.cookie = cname+"="+cvalue+"; "+expires;
}

function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return "";
}

var ofAge = getCookie("ofAge");
if (ofAge != "true") {
var answer = confirm ("Are you 18 or older?");
if (answer = ok) {
setCookie("ofAge","true",30);
// document.location="http://www.inaprops.com"; // This line is not needed and will redirect the user back to the main page
} else {
alert('Sorry, we can not let you in!');
document.location="http://www.google.com";
}
}

</script>


Thank you all in advance for any insight that you can give on this.