<p>varcookie={setcookie:function(name,value,iDay){varoDate=newDate();oDate.setDate(oDate.getDate()+iDay);document.cookie=name+'='+value+';expires='+oDate;},getcookie:function(name){vararr=document.cookie.split(';');for(vari=arr.length-1;i>=0;i--){vararr2=arr[i].split('=');if(arr2[0]===name){returnarr2[1];}}return'';},removecookie:function(name){cookie.setcookie(name,1,-1);}};</p>