Change this line
setcookie( 'cookiename', 'cookievalue', time() + 3600, 'mysite.net/sites/site1/', 'mysite.net/sites/site1/');
to
setcookie( 'cookiename', cookievalue, time() + 3600, COOKIEPATH, COOKIE_DOMAIN);`
COOKIEPATH
and COOKIE_DOMAIN
are WP constants now, but the codex is not updated yet.