Per funzionare anche quello funziona il problema e avere i due script insieme nella stessa pagina.
Si dovrebbe questa parte di codice o no?
function setCookie(name,value,expdays){ //memorizza il cookie
var now = new Date();
var exp = new Date(now.getTime() + (1000*60*60*24*expdays));
document.cookie = name + "=" + escape(value) + ";" + "expires=" + exp.toGMTString() + ";" + "path=/";
}

function getCookie(name){ //restituisce il cookie
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
var start = dc.indexOf(cname);
if (start != -1) {
start += cname.length;
var stop = dc.indexOf(";", start);
if (stop == -1) stop = dc.length;
return unescape(dc.substring(start,stop));

Voi che dite?