function setCookie(cname, cvalue, expires) { var d = new Date(); d.setTime(d.getTime() + expires); var cookieValidity = "expires=" + d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + cookieValidity + ";"; // with experation time } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length, c.length); } return ""; } function checkCookie() { var bbcap = getCookie("bbcap8509"); if (bbcap == "" || typeof bbcap === 'undefined') { bbcap = 1; } else { bbcap++; } if(bbcap == 1) { setCookie("bbcap8509", bbcap, 0); } document.write('