function placeChannelNavLogo() { var Registration = function(){} Registration.REGISTRATION_COOKIE = "wpniuser"; Registration.PLUCK_COOKIE = "hd"; Registration.FACEBOOK_UID_COOKIE= "fbuid"; Registration.FACEBOOK_NAME_COOKIE= "fbuname"; Registration.prototype.getEditProfileLink = function( txt ) { return ''+txt+''; } Registration.prototype.getSignInLink = function( txt ) { return ''+txt+''; } Registration.prototype.getSignOutLink = function( txt ) { return ''+txt+''; } Registration.prototype.getRegisterLink = function( txt ) { return ''+txt+''; } Registration.prototype.isSignedIn = function() { if( typeof this.signedIn == 'undefined' ) { this.signedIn = ( document.cookie.indexOf( Registration.REGISTRATION_COOKIE ) != -1 ); } return this.signedIn; } Registration.prototype.isFBUser = function() { if( typeof this.FBUser == 'undefined' ) { this.FBUser = ( document.cookie.indexOf( Registration.FACEBOOK_UID_COOKIE ) != -1 ); } return this.FBUser; } Registration.prototype.getPluckUserName = function() { if (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) != -1) { var start = (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) + Registration.REGISTRATION_COOKIE.length + 1 ); var end = (document.cookie.indexOf(";",start)) == -1 ? document.cookie.length : document.cookie.indexOf(";",start); this.pluckusername = document.cookie.substring(start,end); if( this.pluckusername.indexOf( "@" ) != -1 ) this.pluckusername = this.pluckusername.substring(0,this.pluckusername.indexOf("@")); } return this.pluckusername; } Registration.prototype.getUserName = function() { if( typeof this.username == 'undefined' ) { if (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) != -1) { var start = (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) + Registration.REGISTRATION_COOKIE.length + 1); var end = (document.cookie.indexOf(";",start)) == -1 ? document.cookie.length : document.cookie.indexOf(";",start); this.username = document.cookie.substring(start,end); if( this.username.indexOf( "@" ) != -1 ) this.username = this.username.substring(0,this.username.indexOf("@")); } } if (document.cookie.indexOf(Registration.FACEBOOK_UID_COOKIE) != -1) { var start = (document.cookie.indexOf(Registration.FACEBOOK_NAME_COOKIE) + Registration.FACEBOOK_NAME_COOKIE.length + 1); var end = (document.cookie.indexOf(";",start)) == -1 ? document.cookie.length : document.cookie.indexOf(";",start); this.username = document.cookie.substring(start,end); } if (document.cookie.indexOf(Registration.PLUCK_COOKIE) != -1) { this.username = ''+this.username+''; } return this.username; } Registration.prototype.getRawUserName = function() { if( typeof this.username == 'undefined' ) { if (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) != -1) { var start = (document.cookie.indexOf(Registration.REGISTRATION_COOKIE) + Registration.REGISTRATION_COOKIE.length + 1); var end = (document.cookie.indexOf(";",start)) == -1 ? document.cookie.length : document.cookie.indexOf(";",start); this.username = document.cookie.substring(start,end); } if (document.cookie.indexOf(Registration.FACEBOOK_UID_COOKIE) != -1) { var start = (document.cookie.indexOf(Registration.FACEBOOK_NAME_COOKIE) + Registration.FACEBOOK_NAME_COOKIE.length + 1); var end = (document.cookie.indexOf(";",start)) == -1 ? document.cookie.length : document.cookie.indexOf(";",start); this.username = document.cookie.substring(start,end); } } return this.username } // ****************************** var reg = new Registration(); parseUrl = "http://www.washingtonpost.com"; ourUrl = document.location.href; if( ourUrl.indexOf("blog.washingtonpost.com") != -1) parseUrl = "http://www.washingtonpost.com"; document.write(''); document.write('