	var login_key = readCookie("realclear_key");
	var login_vars = readCookie("realclear_vars");
	var disqus_remote_auth_s2 = "";
																
	if( login_key != null ){  //IF LOGIN_KEY EXISTS						
		if( login_vars != null ){ //IF SO DOUBLE CHECK LOGIN_VARS COOKIE EXISTS AS WELL		
			//LOAD SSO-DISQUS
			user_id = realclearVars(1); 
			user_name = realclearVars(2);
			user_email = realclearVars(3).replace("%40","@");

			document.write('<style type="text/css">#dsq-content #dsq-new-post .dsq-request-user-logout {display:none;}</style>'); 

			///////////////////////////////////////////////
			//JSON-serialized and Base64-encoded message.//			
			var json_string = '{"username": "'+user_name+'", "id": "'+user_id+'", "avatar": "", "email": "'+user_email+'"}';   					
			//$.post("/dev/disqus-sso/compute_string.php",{ //GENERATES USER_HAS FOR DISQUS
			$.getJSON("http://comments.realclearmarkets.com/process/compute-sso.php?jsoncallback=?",{
				json_string: json_string
			}, function(data) {					
				disqus_remote_auth_s2 = data.msg;	
				loadDisqusObject();				
			});							
		}		
	}else{ //NOT SIGNED-IN
		//HIDE NEW POST FORM UNTIL THEY SIGN-IN
		//HIDE DISQUS MISSING PERMISSIONS VERBAGE
		//document.write('<style type="text/css">.auth .comments-missing-permissions {display:none;}</style>');
		
		//$('#comments-container').prepend('<div align="right">Already have an account at RCP? Sign In below.</div>');
		
		//LOAD DISQUS WITHOUT SSO
		var json_string = '{}';  //EMPTY STRING SO IT WILL LOGOUT NEXT TIME PAGE IS LOADED 		
		
		$.getJSON("http://comments.realclearmarkets.com/process/compute-sso.php?jsoncallback=?",{
			json_string: json_string
		}, function(data) {									
			disqus_remote_auth_s2 = data.msg;	
			loadDisqusObject();							
		});					
	}

	function loadDisqusObject(){
																	
		(function() {
			//alert(disqus_remote_auth_s2);
			//alert(dsq_site_shortname);
			//alert(disqus_remote_auth_s2);
			var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = false;
			dsq.src = 'http://'+dsq_site_shortname+'.disqus.com/embed.js';
			(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);		   	
																																				
		})();																			
																					
	}
