You can implement the SetCookie function in your page.
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function setC(form) {
var expdate = new Date ();
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 31));
SetCookie (form.name, form.value, expdate);
}
Similar question is answered here:
Looking to create a “Terms and Conditions” page for our Company's Sharepoint Intranet
For Cookie java script details, please refer this.
Another approach for the same from this thread create agreement page in SharePoint site:
To do it right, you would probably best go with an FBA kind of approach. Your custom membership provider could determine whether the user has accepted before and then take the right action.
A second best approach (or at least another approach) would be to insert some jQuery into a common master page that performs this check. The drawback, of course, is that it will be running all the time someone hits a page.
I can think of other more fancy approaches. You could have a custom asp page that goes and provisions their account after they accept. That would relatively complicated.