JavaScript for Setting Session ID and Visitor ID Cookies

Hi,
This blog guides you about how to store and retrieve cookies from Javascript. 
This code should be stored in a file named <filename>.js, e.g. cookie.js :
function Get_Cookie(name) {
   var start = document.cookie.indexOf(name+”=”);
   var len = start+name.length+1;
   if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
   if (start == -1) return null;
   var end = document.cookie.indexOf(“;”,len);
   if (end == [...]