function memlogin () {
var myuser = readcookie('user');
var J = 'LogIn-LogOut';
if (myuser == "") {
var J = '<a href="http://www.horseadvice.com/horse/messages/664/664.html">Join&nbsp;Us!<\/a>&nbsp;\/&nbsp;';
J = J + '<a href="http://www.horseadvice.com/cgi-bin/advisor/board-profile.cgi" target="login">LogIn&nbsp;&amp;&nbsp;Profile<\/a>';
}	 else {
var J = 'Welcome ' + myuser + '.<br><a href="http://www.horseadvice.com/cgi-bin/advisor/board-profile.cgi" target="_blank">Edit Profile<\/a>&nbsp;\/&nbsp;<a href="http://www.horseadvice.com/cgi-bin/advisor/discus.cgi?pg=logout">Log Out<\/a>';
}
document.write(J);
}

function welcome (){
var myuser = readcookie('user');
if (myuser == "") {
var J = '<div id="WelGuest">';
J = J + 'WELCOME GUEST!,';
J = J + '<br>As one of more than 6,000 daily visitors you can view the summaries of our acclaimed articles and read our discussions written and moderated by an experienced equine veterinarian. By joining you get full access to the articles, access to our members only areas, and can post your own questions and discussions to our equine professionally moderated boards. Join us and our approximately 3000 active members and get full access instantly to the best equine health reference in the world...<a href="http://www.horseadvice.com/horse/messages/664/664.html">Visitors&nbsp;Come&nbsp;Join&nbsp;Us!<\/a><br><br>MEMBERS: you have not been authenticated, log in at the top of the page to access your membership features. Tired of Logging-In? As you log-in edit your profile so the site remembers you! ';
J = J + '<\/div>';
document.write(J);
	}
}

function date_ddmmmyyyy(date)
{
  var d = date.getDate();
  var m = date.getMonth() + 1;
  var y = date.getYear();
  var mmm = 
    ( 1==m)?'Jan':( 2==m)?'Feb':(3==m)?'Mar':
    ( 4==m)?'Apr':( 5==m)?'May':(6==m)?'Jun':
    ( 7==m)?'Jul':( 8==m)?'Aug':(9==m)?'Sep':
    (10==m)?'Oct':(11==m)?'Nov':'Dec';
  return "" +
    (d<10?"0"+d:d) + " " + mmm + " " + (y<1000?1900+y:y);
}

function dateLastMod()
{
  var lmd = document.lastModified;
  var s   = "Unknown";
  var d1;
  // check if valid date
  if(0 != (d1=Date.parse(lmd)))
  { s = "" + date_ddmmmyyyy(new Date(d1)); }
  return s;
  document.write(dateLastMod());
}

function goodbye()
{
  var myuser = readcookie('user');
  var K;
  if (myuser == "") {
    K = '<a href="http://www.horseadvice.com/horse/messages/664/664.html">Join today and reap all the benefits of membership!<\/a>';
    document.write(K);
  }  else  {
    K = '<a href="http://www.horseadvice.com/cgi-bin/advisor/discus.cgi?pg=logout">Log&nbsp;Out<\/a>';
    document.write(K);
  }
}

function iframeart (arturl)
{
	document.writeln('<iframe src="'+arturl+'" name="article" width="100%" height="70%" scrolling="auto" frameborder="1">');
	document.writeln('Your user agent does not support frames or is currently configured not to display frames. To view the articles you must enable your frames.');
	document.writeln('</iframe>');
}