function set_cookie($name, $value = false, $year = false) {
if (!$year && !intval($year)) $year = 5;
if (!$value) $value = '';
setcookie($name, $value, time() + 60*60*24*365*$year, '/');
}
function set_cookie($name, $value = false, $year = false) {
if (!$year && !intval($year)) $year = 5;
if (!$value) $value = '';
setcookie($name, $value, time() + 60*60*24*365*$year, '/');
}