var Registration = function(){}
Registration.REGISTRATION_COOKIE = "wpniuser";
Registration.PLUCK_COOKIE = "hd";
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.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.PLUCK_COOKIE) != -1) this.username = ''+this.username+'';
return this.username
}