function writeCookie() 
{

 var today = new Date();
 var the_date = new Date("December 31, 2023");
 var the_cookie_date = the_date.toGMTString();

 var NS = (navigator.appName=="Netscape")?true:false; 

 iWidth = (NS)?window.innerWidth:document.body.clientWidth;

 var the_cookie = "users_resolution=" + iWidth;

 the_cookie += ";expires=" + the_cookie_date;
 document.cookie=the_cookie
}