<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>SocialPicks</title>
<meta name="description" content="SocialPicks - Share Stock Picks Across Network of Investment Websites" />
<meta name="keywords" content="stock pick forum message board" />

<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes">
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:400,700);
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css);
a{color:#339;}
body {
  background: #CDE;
  font: 14px Lato;
  margin: 20px;
}
.vcontainer {height:100%;width:400px;
    display : table;
}
.vheader {
    display : table-row;
    height : 1px;
}
.vbody {height:100%;overflow:auto;}
.vfooter {
    display : table-row;
    height : 1px;
}
.chat {
  width: 100%;
  margin: 0 auto;
  background: #FFF;
  border-radius: 5px;
  box-shadow: 10px 10px 15px 0 rgba(0, 0, 0, 0.3);
}
#chat-header {
  background: #6AA;
  font-size:18px;
  font-weight:bold;
  color: #FFF;
  padding: 5px 15px;
  border-radius: 5px 5px 0 0;

}
.chat-body {
  padding: 20px 20px 0 20px;
}

.chat-footer {
  padding: 0 20px 5px 20px;
}

.chat-item {
  width:100%;
  position:relative;
  clear:both;
}
.message, .editor, .loginbox, .logoutbox, .xprofile{
  float:left;
  align-items: flex-start;
  margin-bottom: 15px;
  background: #F8F8F8;
  border:1px solid #F8F8F8;
  width:calc(100% - 20px);
  padding: 10px;
  border-radius: 5px;
  position: relative;
  font-size:16px;
}
.editor {
  background: #FFF !important;
  border:1px solid #CCC;
}

.loginbox, .logoutbox{
  width:calc(100% - 40px);
  left:20px;
  position:fixed;
  bottom:30px;
  display:none;
  border:0;
  background:#36A;
  color:#FFF;
  padding:0px;
  border-radius:5px 5px 0 0;
}
@media screen and (max-width: 500px) {
  body{margin:0px;}
  .loginbox, .logoutbox{left:0px;width:100%;bottom:10px;}
  #chat-header {border-radius: 0;}
}

.tabblock{min-width:60px;}
.tabon{background:#36A;color:#FFF;cursor:default;font-weight:normal;}
.taboff{background:#58B;color:#FFF;cursor:pointer;font-weight:normal;}
.taboff:hover{background:#69C;color:#FF6;}
.tabon, .taboff, .tabblock{float:right;border-radius: 5px 5px 0 0;padding:4px 10px 6px 10px;margin-left:6px;}
.loginbox > div:first-of-type,
.logoutbox > div:first-of-type {padding:10px;padding-bottom:29px;color:#333;font-weight:bold;background:#6AA;border-radius:5px 5px 0 0;}
#returningdiv, #optionsdiv, #profilediv, #signupdiv{display:none;min-height:60px;padding:10px;}
#returningdiv, #optionsdiv {display:block;}
#spinner {position:absolute;right:-4px;top:-72px;font-size:32px;z-index:255;color: white;
   -webkit-text-fill-color: black; 
   -webkit-text-stroke-width: 1px;
   -webkit-text-stroke-color: white;display:none;}


.chat-image, .chat-imagebig, .chat-imagebig-avatar {cursor:pointer;border-radius:50%;position:absolute;right:-12px;
  display: block;width:45px;height:45px;margin-top:-18px;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-image: url('');
-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-ms-transition:all 0.5s;-o-transition:all 0.5s;transition: all 0.5s;
}

.chat-imagebig, .chat-imagebig-avatar{z-index:255;width:80px;height:80px;margin-top:-35px;
-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-ms-transition:all 0.5s;-o-transition:all 0.5s;transition: all 0.5s;}

.chat-imagebig-avatar {margin-top:-90px;}

.message_user-name {
  font-size: 16px;
  font-weight: bold;
  color: #000;
}

.message_time {
  font-size: 12px;
  color: #666;
  white-space:nowrap;
  display:block;
}

.message_text, .message_textarea {
  font-size: 16px;
  color: #777;
  width:100%;
  font-family: Lato;
  max-height:60px;
  overflow:hidden;
}

.message_textarea{
  display:block;
  resize: none;
  outline: none;
  border: 0;
  padding: 0px;
}

.textbox, .textboxbig {font-family:Lato;font-size:16px;float:left;color:#333;border:0;-webkit-box-shadow: none;box-shadow: none;margin:4px 10px 8px 0;padding:6px 4px;max-width:165px;white-space:nowrap;}
.textboxbig {min-width:300px;max-width:300px;}


.xicon {float:right;cursor:pointer;margin-top:6px;margin-right:24px;margin-left:10px;}
.xicon div{position:absolute;width: 30px;height: 4px;margin-bottom:6px;border-radius: 40px;
}
.xicon div+div {background-color: #FFF;
    -ms-transform: rotate(45deg);-webkit-transform: rotate(45deg);transform: rotate(45deg);}
.xicon div>div {background-color: #FFF;
    -ms-transform: rotate(-45deg);-webkit-transform: rotate(-45deg);transform: rotate(-45deg);}

.floater{float:left;padding:6px 0;color:#FFF;margin:4px 10px 8px 0;}
.button{border-radius:6px;background-color:#69C;color:#FFF;padding:6px;float:left;min-width:90px;text-align:center;margin:4px 10px 8px 0;cursor:pointer;}
.button:hover{background-color:#7AD;color:#FF0;}

.clickable {cursor:pointer;}
#attrib{clear:both;color:#999;font-size:10px;line-height:0;margin-bottom:5px;}
.hiddentext {color:#EEE;}
.showntext {color:#777;}
.showntext {
  -moz-transition:all 1.5s;
  -webkit-transition:all 1.5s;
  -ms-transition:all 1.5s;
  -o-transition:all 1.5s;
  transition: all 1.5s;
}
.downarrow{position:absolute;left:50%;margin-left:-10px;margin-top:-8px;font-size:32px;color:#333;cursor:pointer;}
.button:hover, .taboff:hover, .tabon, .downarrow, #chat-header {
  -moz-transition:all 0.5s;
  -webkit-transition:all 0.5s;
  -ms-transition:all 0.5s;
  -o-transition:all 0.5s;
  transition: all 0.5s;
}
input:focus {outline:0;}
.stockquote3 {margin-top:12px;}
.overlay{display:none;z-index:200;text-align:center;position:absolute;top:0;bottom:-300px;left:0;width:100%;background: #333;opacity: 0.4;-moz-opacity:0.4;filter:alpha(opacity=40);}
.overlay2{display:none;z-index:201;text-align:center;position:absolute;top:0;bottom:0;left:0;width:100%;background:transparent;opacity: 1.0;-moz-opacity:1.0;filter:alpha(opacity=100);}
#messagebox{z-index:255;text-align:center;background:#DB0;width:300px;text-align:center;margin:100px auto;padding:5px;border:1px solid #333;}

mypost, myid {display:none;}

</style>
<body>


<div id="mapboxdiv" style="display:none;"><div id="mapbox" style="border-radius:5px;padding:5px;border:1px solid #666;background-color:#DFE;margin-top:-10px;left:0px;right:0px;position:absolute;z-index:254;"
><div class="chat-item profile"><span style="float:right;width:70px;height:50px;"></span><span style="clear:both;"></span><span id="userprofileid"></span> User Profiles coming soon. </div></div></div>


<div id="overlay" class="overlay"></div>
<div id="overlaymessage" class="overlay2">
<center>
<div id="messagebox">
<table border="0" cellspacing="5" cellpadding="5" align="center"><tr><td align="center"><div id="overlaymessagestr">Hello</div><div style="padding-top:5px;"><img src='http://www.socialpicks.com/img/loading.png'/></div></td></tr></table>
</div>
</center>
</div>

<div class="vcontainer chat">
  
<div class="vheader">
  <div id="chat-header"><span style="font-size:18px;color:#FFF;">Social</span><span style="font-size:21px;color:#FD0;">Picks</span><div style="font-size:12px;font-weight:normal;">You are welcome to use this community forum while it is still under development under these <a href="#tc" style="color:#FFF;">terms and conditions</a>.  Please note that all posts are deleted within a week unless designated as permanent posts.</div></div>
</div>

<div id="vbody" class="vbody chat-body" >
  <div id="archive">
    <div class="chat-item message">
       <span><div class="chat-image" style="background-image: url('img/webmaster.png');" onclick="moveme(this);"></div></span>
       <span class="message_user-name">Webmaster</span> of <span id="webmastersite" class="message_user-name">SocialPicks</span>
       <span class="message_time"><i class="fa fa-clock-o"></i> Today <big><b>&#183;</b></big> <span id="webmastertime"></span> EST</span>
       <div class="message_text">Greetings!  Share your investment ideas and trading tips with the SocialPicks community.</div>
    </div>
  </div>
  <div id="watchlist" style="max-width:200px;"></div>
</div>

<div class="vfooter">
  <div class="chat-footer">
     <div class="chat-item editor">
       <span><div class="chat-image" id="myavatar" onclick="zoomme(this);"></div></span>
       <span id="spinner"><i class="fa fa-spinner fa-spin fa-2x"></i></span>

       <span class="message_user-name" id="myname"></span> of <span class="message_user-name" id="mysite">SocialPicks</span><span id="mytime" style="display:none;"></span>
       <textarea id="chatbox" class="message_textarea" rows="2" placeholder="Enter your message or symbol like $IBM here"
        onclick="updateTime();checkloginme();" onkeyup="updateTime();if (event.keyCode == 13) postme();"></textarea>
    </div>
<div style="display:none;">
<form id="userphotoform" target="loader" action="cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">
<input type="hidden" name="userid" id="userid" value="2"/>
<input type="file" id="camera" name="camera" size="25" onChange="handleChange();"/>
<input type="submit" id="upload"/>
<iframe id="loader" name="loader"></iframe>
</form>
</div>

<script>
function clickme() {
   document.getElementById("camera").click();
}
function handleChange() {
   //document.getElementById("spindiv").innerHTML = '<i class="fa fa-plus fa-spin fa-2x"></i>';
   document.getElementById("upload").click();
   document.getElementById("spinner").style.display = "block";
   //document.getElementById('loadingimguser').style.display = 'block';
}
</script>


    <div class="chat-item">
      
      <div id="logoutbox" class="logoutbox">
        <div><div>Welcome, <span id="logoutname"></span></div>
          <div class="tabblock"></div>
          <div id="optionstab" class="tabon" onclick="startoptions();">Options</div>
          <div id="profiletab" class="taboff" onclick="startprofile();">Profile</div>
        </div>
        <div id="profilediv">
          <form id="profileform" onsubmit="profileme();return false;">
            <input id="profiletext" class="textboxbig" type="text" placeholder="Enter Your Profile" onkeyup="if (event.keyCode == 13) profileme();">
            <div class="button" onclick="profileme();">Update</div>
          </form>
        </div>
        <div id="optionsdiv">
           <div class="button" onclick="clickme();">Photo</div>
          <div class="button" onclick="logoutnow();">Log Out</div>
        </div>
      </div>
      <div id="loginbox" class="loginbox" >
<div><div>Welcome, <span id="loginname">Guest</span></div>
         <div class="tabblock"></div>
         <div id="logintab" class="tabon" onclick="startlogin();">Returning</div>
         <div id="signuptab" class="taboff" onclick="startsignup();">New?</div>
      </div>
      <div id="returningdiv">
         <form id="logindiv" onsubmit="dologin();return false;" style="display:;">
         <input id="user" class="textbox" type="text" placeholder="Enter User Name" onclick="loginme()" onkeyup="if (event.keyCode == 13) dologin();">
         
         <div><input id="password" class="textbox" type="password" placeholder="Enter Password" onkeyup="if (event.keyCode == 13) dologin();">
         <div class="button" onclick="dologin();">Log In</div> <div style="padding-top:10px;" onclick="showresetnow();"><a href="#" style="color:#FFF;">Forgot Password?</a></div></div>
         </form>
<div id="resetnowdiv" style="clear:both;display:none">
         <form id="logindiv" onsubmit="resetnow();return false;" style="display:;">
         <input id="emailreset" class="textbox" type="text" placeholder="Enter Email Address" onkeyup="if (event.keyCode == 13) resetnow();">
         <div class="button" onclick="resetnow();">Reset&nbsp;Password</div> 
         </form>
</div>
         <form onsubmit="doreset();return false;" id="resetdiv" onsubmit="doreset();return false;" style="display:none;">
         <input id="userreset" type="hidden" value="">
         <input id="passwordreset" class="textbox" type="password" placeholder="Enter New Password" onkeyup="if (event.keyCode == 13) doreset();">
         <div class="button" onclick="doreset();">Save</div>
         </form>
      </div>
      <div id="signupdiv">
         <form onsubmit="signupnow();return false;" id="emailonlydiv" style="display:;">
         <input id="email" class="textbox" type="text" placeholder="Enter Email Address" onkeyup="if (event.keyCode == 13) signinnow();">
         <div class="button" onclick="signupnow();">Sign Up</div>
         </form>
         <form onsubmit="doregister();return false;" id="newuserpassdiv" style="display:none;">
         <input id="newuser" class="textbox" type="text" placeholder="Enter New User Name" onkeyup="if (event.keyCode == 13) doregister();">
         <input id="newpassword" class="textbox" type="password" placeholder="Enter New Password" onkeyup="if (event.keyCode == 13) doregister();">
         <div class="button" onclick="doregister();">Sign Up</div>
         </form>
       </div>
    </div>
    <div id="attrib">Powered by SocialPicks <big><b>&#183;</b></big> &copy; 2006-<script> var d = new Date();document.write(d.getFullYear());</script> All rights reserved.</div>
  </div>
</div>

</div>
</body>
<script>
var guestimgstr = "http://www.clipartkid.com/images/558/child-v-cambridge-university-hospital-nhs-foundation-trust-2011-zrYH3H-clipart.jpg";
var count = 0;
function postme() {
  var grab = document.getElementById("chatbox").value;
  document.getElementById("chatbox").value = "";
  if (event.keyCode == 13 && grab.length == 1) return;
  grab = grab.replace(/\</g, "\&lt;");
  grab = grab.replace(/[\r\n]/g, "<br />");
  grab = grab.replace(/[ +]/g, " ");
  if (grab.match(/^\$/g)) {
    document.getElementById("chatbox").value = "";
    var res = grab.match(/^\$[A-Za-z]+/g);
    if (res[0].length > 0) {
      res[0] = res[0].replace(/\$/g, "");
      count++;
      grabquote(res[0]);
      return;
    }
  }
  var username = document.getElementById("myname").innerHTML;
  update("mode=post&username=" + username + "&story=" + grab);
}

function addquote(story,mytime) {
  count++;
  var html = "";
  html += '<div class="chat-item message" style="background:#DEF;">';
  html += '<span class="message_user-name">Stock Quotes</span> by <span class="message_user-name">CloudQuote</span> ';
  html += '<span class="message_time"><i class="fa fa-clock-o"></i> Today <big><b>&#183;</b></big> ' + mytime + ' EST</span>';
  html += '<div id="message' + count + '" class="message_text hiddentext">' + story + '</div></div>';
  document.getElementById("archive").innerHTML += html;
  var chatbody = document.getElementById("vbody");
  chatbody.scrollTop = chatbody.scrollHeight;
  document.getElementById("message" + count).className = "message_text showntext";
}
function warning(me) {
  alert("Warning:" + me);
}
function warning2(me) {
  alert("Warning2:" + me);
}
function warning3(me) {
  alert("Warning3:" + me);
}

function resetnow() {
  var emailreset = document.getElementById("emailreset").value;
  document.getElementById("emailreset").value = "";
  if (emailreset != "") {
    cgi("login.cgi?mode=reset&email=" + emailreset);
    backtoedit();
  }
}
function signupnow() {
  var email = document.getElementById("email").value;
  if (email != "") {
    cgi("login.cgi?mode=login&email=" + email);
    backtoedit();
  }
}
function logoutnow() {
  login("mode=logout");
  backtoedit();
}
function checkloginme() {
  var username = document.getElementById("myname").innerHTML;
  if (username == "Guest") loginme();
}
function loginme() {
  movemap(home);
  var username = document.getElementById("myname").innerHTML;
  if (username == "Guest") {
     document.getElementById("loginbox").style.display = "block";
     if (document.getElementById("logintab").className == "tabon") document.getElementById("user").select();
     if (document.getElementById("signuptab").className == "tabon") document.getElementById("email").select();
  } else {
     document.getElementById("logoutbox").style.display = "block";
  }
  if (document.getElementById("resetnowdiv").style.display == "") {
    document.getElementById("resetnowdiv").style.display = "none";
    document.getElementById("emailreset").value = "";
  }
  document.getElementById("chat-header").style.backgroundColor = "#CCC";
}
function backtoedit() {
  document.getElementById("chat-header").style.backgroundColor = "#6AA";
  document.getElementById("user").value = "";
  document.getElementById("password").value = "";
  document.getElementById("email").value = "";
  document.getElementById("loginbox").style.display = "none";
  document.getElementById("logoutbox").style.display = "none";
  document.getElementById("logindiv").style.display = "";
  document.getElementById("resetdiv").style.display = "none";
  updateTime();
  document.getElementById("myavatar").className = "chat-image";//checkme
}
function togglemenu() {
    var m = document.getElementById("themenu").className == "menu";
    document.getElementById("themenu").className = m ? "menushow" : "menu";
    document.getElementById("topline").className = m ? "basehide" : "base";
    document.getElementById("midline1").className = m ? "baserevslant" : "base";
    document.getElementById("midline2").className = m ? "baseslant" : "base";
    document.getElementById("botline").className = m ? "basehide" : "base";
}
function cgi(url) {
    var script = document.createElement("script");
    script.setAttribute("src","http://www.socialpicks.com/cgi-bin/" + url + "&1=2");
    script.setAttribute("type","text/javascript");                
    document.body.appendChild(script);
    //alert("http://www.socialpicks.com/cgi-bin/" + url + "&1=2");
}
function update(paramstr) {
    cgi("grab.cgi?" + paramstr);
}
function grabquote(ticker) {
    cgi("grab.cgi?tickers=" + ticker);
}
function nowtime() {
    var currentTime = new Date()
    var hours = currentTime.getHours()
    var minutes = currentTime.getMinutes()
    if (minutes < 10){
        minutes = "0" + minutes;
    }
    var ampm = "";
    if(hours > 11){
        ampm = "pm";
    } else {
        ampm = "am";
    }
    hours = (hours + 11) % 12 + 1;
    return hours + ":" + minutes + " " + ampm;
}
function updateTime(){
    document.getElementById("mytime").innerHTML = nowtime();
}
function showreset(me) {
    document.getElementById("loginbox").style.display = "block";
    document.getElementById("logindiv").style.display = "none";
    document.getElementById("resetdiv").style.display = "";
    setuser(me);
    document.getElementById("passwordreset").select();
}
function showregister() {
    document.getElementById("loginbox").style.display = "block";
    startsignup();
    document.getElementById("emailonlydiv").style.display = "none";
    document.getElementById("newuserpassdiv").style.display = "";
    document.getElementById("newuser").select();
}
function showresetnow() {
    document.getElementById("resetnowdiv").style.display="";
    document.getElementById("emailreset").select();
}
function doreset() {
	myuser = document.getElementById("userreset").value;
	mypassword = document.getElementById("passwordreset").value;
	if (myuser == "" || mypassword == "") {warning3("Please set a password first.");}
	if (myuser != "" && mypassword != "") {
		//warning3("<img src='img/loading.png'/>");
		login(searchterm + "&user=" + myuser + "&newpassword=" + mypassword + "&random=" + (new Date()).getTime());
		//alert(searchterm + "&user=" + myuser + "&newpassword=" + mypassword + "&random=" + (new Date()).getTime());
	}
}
function dologin() {

	myuser = document.getElementById("user").value;
	mypassword = document.getElementById("password").value;
	login("mode=login&user=" + myuser + "&password=" + mypassword + "&random=" + (new Date()).getTime());
	//alert("mode=login&user=" + myuser + "&password=" + mypassword + "&random=" + (new Date()).getTime());
}
function showloginresult(mystat) {
	if (!mystat) alert("The username and login combination did not work.  Please try again.")
}
function doregister() {
	myuser = document.getElementById("newuser").value;
	mypassword = document.getElementById("newpassword").value;
	if (myuser == "" || mypassword == "") {warning2("Please select a user name and set a password first.");}
	if (myuser != "" && mypassword != "") {
		//warning2("<img src='img/loading.png'/>");
		login(searchterm + "&user=" + myuser + "&password=" + mypassword + "&random=" + (new Date()).getTime());
	}
}

function hidereset() {
   document.getElementById("loginbox").style.display = "none";

}

function hidelogin() {
   document.getElementById("loginbox").style.display = "none";
}

function setuser(me) {
   document.getElementById("myname").innerHTML = me;
   document.getElementById("loginname").innerHTML = me;
   document.getElementById("logoutname").innerHTML = me;
   document.getElementById("userreset").value = me;
}

function hidemessage() {
  document.getElementById("overlay").style.display = "none";
  document.getElementById("overlaymessage").style.display = "none";
  document.getElementById("chat-header").style.backgroundColor = "#6AA";
}
function showmessage(mystr) {
  document.getElementById("overlaymessagestr").innerHTML = mystr;
  document.getElementById("overlay").style.display = "block";
  document.getElementById("overlaymessage").style.display = "block";
}

function login(paramstr) {
    var script = document.createElement("script");
    script.setAttribute("src","http://www.socialpicks.com/cgi-bin/login.cgi?" + paramstr);
    script.setAttribute("type","text/javascript");                
    document.body.appendChild(script);
}
var searchterm = "";
function setup() {
  setuser("Guest");
  if (window.location.search.slice(1)) {
    searchterm = window.location.search.slice(1)
    var sliced = searchterm.split(/&/);
    var param = sliced[0].split(/=/);
    if (param[0] == "site") {
      document.getElementById("mysite").innerHTML = param[1];
      document.getElementById("webmastersite").innerHTML = param[1];
    }
    if (param[0] == "mode") {
       login(searchterm);
    }
  } else {
    login("mode=logincheck");
  }
  cgi("grab.cgi?mode=grab");
}

var lasticon = null;
var home = document.getElementById("mapboxdiv");
function movemap(me) {
    if (me == home) {
              if (lasticon) lasticon.className = "chat-image";
       lasticon = null;
    }
    var mynode = document.getElementById("mapbox");
    me.appendChild(mynode);
    if (me != home) backtoedit();
}
function zoomme(me) {
   if (me.className == "chat-image") {
       me.className = "chat-imagebig-avatar";
       loginme();
   } else {
       me.className = "chat-image";
       backtoedit();
   }
}

function moveme(me) {
   if (me.className == "chat-image") {
      if (lasticon) lasticon.className = "chat-image";
      lasticon = me;
      me.className = "chat-imagebig";
      document.getElementById("myavatar").className = "chat-image";
      movemap(me.parentNode);
      document.getElementById("userprofileid").innerHTML = "User #" + me.parentNode.getElementsByTagName("myid")[0].innerHTML + " Post #" + me.parentNode.getElementsByTagName("mypost")[0].innerHTML;
   } else {
      lasticon = null;
      me.className = "chat-image";
      movemap(home);
   }
}
function lockme(me) {
   var mypost = me.parentNode.parentNode.getElementsByTagName("mypost")[0].innerHTML;
   if (me.innerHTML == '<i class="fa fa-unlock"></i>') {
      me.innerHTML = '<i class="fa fa-lock"></i>';
      update("mode=lock&id=" + mypost);
   } else {
      me.innerHTML = '<i class="fa fa-unlock"></i>';
      update("mode=unlock&id=" + mypost);
   }
}

function additem(myicon,myname,mysite,mypost,myid,mytime,grab,mylock,after) {
  var myuserid = document.getElementById("userid").value;
  mysite = mysite == 0 ? "SocialPicks" : mysite + ' <a href="http://' + mysite + '" target="_new"><i class="fa fa-external-link-square"></i></a>';
  var ww = window.innerWidth*1-60;
  count++;
  var html = "";
  html += '<div class="chat-item message"><span><div class="chat-image" style="background-image:url(' + myicon + ') ;" onclick="moveme(this);" ></div><mypost>' + mypost + '</mypost><myid>' + myid + '</myid></span>';
  html += '<span class="message_user-name">' + myname + '</span> of <span class="message_user-name">' + mysite + '</span> ';
  html += '<span class="message_time"><i class="fa fa-clock-o"></i> ' + mytime;
  if (myid == myuserid) html += ' <span style="cursor:pointer;font-size:18px;margin-left:6px;" onclick="lockme(this);"><i class="fa fa-' + ["unlock","lock"][mylock] + '"></i></span>';
  html += '</span>';
  html += '<div id="message' + count + '" class="message_text hiddentext" style="max-width:' + ww + 'px;">' + grab + '</div><div><div id="z-' + count + '" class="downarrow" onclick="resizeme(this.parentElement.previousSibling,this);"></div></div></div>';
  if (after == 1) document.getElementById("archive").innerHTML += html;
  if (after == 0) document.getElementById("archive").innerHTML = html + document.getElementById("archive").innerHTML;
  document.getElementById("archive").innerHTML += ' ';
  
  var newpost = document.getElementById("message" + count);
  if (newpost.clientHeight != newpost.scrollHeight) {
    document.getElementById("z-" + count).innerHTML = '<i class="fa fa-caret-down"></i>';
  }

  var chatbody = document.getElementById("vbody");
  chatbody.scrollTop = chatbody.scrollHeight;
  newpost.className = "message_text showntext";
}

updateTime();
setup();
</script>
<script>
function resizeme(me,ptr) {
   //alert(me.clientHeight + "::" + me.scrollHeight);
   me.style.maxHeight = me.style.maxHeight == "none" ? "60px" : "none";
   ptr.style.transform = me.style.maxHeight == "none" ? "rotate(180deg)" : "rotate(0deg)";
}
function startoptions() {
   document.getElementById("optionstab").className = "tabon";
   document.getElementById("profiletab").className = "taboff";
   document.getElementById("optionsdiv").style.display = "block";
   document.getElementById("profilediv").style.display = "none";
}
function startprofile() {
   document.getElementById("optionstab").className = "taboff";
   document.getElementById("profiletab").className = "tabon";
   document.getElementById("optionsdiv").style.display = "none";
   document.getElementById("profilediv").style.display = "block";
}
function startlogin() {
   document.getElementById("logintab").className = "tabon";
   document.getElementById("signuptab").className = "taboff";
   document.getElementById("returningdiv").style.display = "block";
   document.getElementById("signupdiv").style.display = "none";
   document.getElementById("user").select();
}
function startsignup() {
   document.getElementById("logintab").className = "taboff";
   document.getElementById("signuptab").className = "tabon";
   document.getElementById("returningdiv").style.display = "none";
   document.getElementById("signupdiv").style.display = "block";
   document.getElementById("emailonlydiv").style.display = "";
   document.getElementById("newuserpassdiv").style.display = "none";
   document.getElementById("email").select();
}
</script>
<script>
for (var i=1;i<2;i++) {
    document.getElementById("archive").innerHTML += "<br/>";
}
</script>