function setCookie(name, value, expires)

{

	// no expiration date specified? use this date and it will just be deleted soon.

        if (!expires) expires = new Date(); 

	document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/";

}

var expdate = new Date (); // pre-set to the current time and date

expdate.setTime(expdate.getTime() + 1000 * 60 * 60 * 24 * 365); // add one year to it 

//365 days/year * 24 hours/day * 60 minutes/hour * 60 seconds/minute * 1000 milliseconds/second

// = howevermany milliseconds/year. So this adds one year, it'll expire in one year.















