I have tried the onload command and tried to break down ones like this but I am very new to javascript and I believe with all the site and things I have tried I have made myself very confused.
-
function getCookie(NewCookie)
-
{ if (document.cookie.length > 0)
-
{ begin = document.cookie.indexOf(NewCookie+"=");
-
if (begin != -1)
-
{ begin += NewCookie.length+1;
-
end = document.cookie.indexOf(";", begin);
-
if (end == -1) end = document.cookie.length;
-
return unescape(document.cookie.substring(begin, end)); }
-
}
-
return null;
-
}
-
-
-
-
function setCookie(NewCookie, Website cookie value, expiredays)
-
{ var ExpireDate = new Date ();
-
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
-
document.cookie = NewCookie + "=" + escape(value) +
-
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
-
}
-
-
-
-
function delCookie (NewCookie)
-
{ if (getCookie(NewCookie)) {
-
document.cookie = NewCookie + "=" +
-
"; expires=Thu, 30 Dec 2013 00:00:01 GMT";
-
}
-
-
}
-