		var sessionCountLoaded = true;
		
		function setCookie(name,value,duration){
			cookiestring=name+"="+escape(value)+";path=/; domain=.economist.com;";
			document.cookie=cookiestring;
		}		

		function ReadCookie(cookieName) {
		 	var theCookie=""+document.cookie;
		 	var ind=theCookie.indexOf(cookieName);
		 	if (ind==-1 || cookieName=="") return ""; 
		 	var ind1=theCookie.indexOf(';',ind);
		 	if (ind1==-1) ind1=theCookie.length; 
		 	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
		}

		
		function countClicks(){
			if(document.cookie.indexOf('CFID')){	// If CFID is present then cookies are allowed
				var cookiestring=""+document.cookie;
				var isThere = cookiestring.indexOf('sessionCount');
				if(isThere == -1){
					setCookie('sessionCount',0);
				} else {
					var clicks = ReadCookie('sessionCount');
					var newVal = parseInt(clicks) + 1;
					setCookie('sessionCount',newVal);
					//if(clicks == 2){
					//	// Display the transitional page
					//	alert('show the trans page');
					//} 
				}
			} else {
				// Cookies are not allowed. Do nothing				
			}
		}