function DisplayLogName(name) {
  var cookies=document.cookie;
  var start = cookies.indexOf(name + "=");
  var name = "";
  var start1;
  var end1;
  var tmp;
  var signed_in = -1;

  if (start != -1) {
    start = cookies.indexOf("=", start) +1;
    var end = cookies.indexOf("|", start);
    if (end != -1) {
      signed_in = cookies.indexOf("|yes", start);
      name = unescape(cookies.substring(start,end-1));
      document.write("Welcome, <b>" + name + "</b>");
      if (signed_in != -1) {
        document.write("<a href=\"http://marinedieselparts.com/cgi-bin/sc/order.cgi?func=3&storeid=*123daff681b50b68ae1021&html_reg=html\"> | <b>View/Edit Account</b></a>");
        document.write(" <a href=\"http://marinedieselparts.com/cgi-bin/sc/order.cgi?func=4&storeid=*123daff681b50b68ae1021&html_reg=html\"> | <b>Sign Out</b></a>");
      }
      else
      {
        // do nothing
      }
    }
  }
  if (signed_in == -1) {
    document.write(" Returning Customer? <a href=\"http://marinedieselparts.com/cgi-bin/sc/order.cgi?func=2&storeid=*123daff681b50b68ae1021&html_reg=html\">Click here to <b>Sign In</b></a>");
    document.write(" or <a href=\"http://marinedieselparts.com/cgi-bin/sc/order.cgi?func=1&storeid=*123daff681b50b68ae1021&html_reg=html\">Click here to <b>Register</b></a>");
  }
}
DisplayLogName("ss_reg_0001240301");
