﻿function showUserStatus_mainSite(userStatuDiv_id)
{
    var userName = getCookie("ST_DisplayName");
    var htmlContent;
    if (userName != null)
    {
        if (userName.length > 18) {
            userName = userName.substring(0, 15) + '...';
        }
        htmlContent  = "";  
        htmlContent += "<a href='http://www.stonecontact.com/Main.aspx?pid=MemberCenter'class=\"import\">Welcome, " + userName + ",<b> My StoneContact</b></a>";
        htmlContent += "<a href='http://www.stonecontact.com/Main.aspx?pid=Office_Login&id=Logout' id=\"Sign\">Logout</a>";     
    }
    else
    {
        htmlContent  = "";        
        htmlContent += "                    <a href='http://www.stonecontact.com/Main.aspx?pid=Office_Login' id=\"Sign\">Sign in</a>";        
        htmlContent += "                    <a href=\"http://www.stonecontact.com/Main.aspx?pid=Office_Register\" id=\"Join\">Join Now for Free</a>";
    }
    document.getElementById(userStatuDiv_id).innerHTML = htmlContent;   
}