function getExpireDate() {

var wksToExpire = 12; // 3 months
var expire = new Date();
var oneWeek = 1000 * 60 * 60 * 24 * 7;

expire.setTime(expire.getTime() + (oneWeek * wksToExpire));
expire = expire.toGMTString();

return expire;

}


function writeITCookie(support_area) { 

alert(support_area);
var expiresWhen = getExpireDate();
var the_cookie = "it_support_area=" + escape(support_area) + ";path=/;expires=" + expiresWhen;
alert("the_cookie is "+the_cookie);
document.cookie = the_cookie;

}



function SetITpref(site) {

var baseurl="http://it.fuqua.duke.edu"; //change to base site URL, it.fuqua in this case
alert("Your site is "+site+"\n and your choice is "+document.itsite.suparea.checked);

if (document.itsite.suparea.checked){   //if remember is checked, do this

		writeITCookie(site);

	}
// ----add in window.location.replace code
window.location.href=baseurl+site;

}