<!--
// Along for the ride
// By Mar Matthias Darin
// Copyright (C) 2009 All Rights Reserved

var AFTREmbedstartTime=new Date();
var AFTREmbedendTime;

function AFTREmbedFixPrecision(num)
  {
    var stringNum = String(num);

    if (stringNum.indexOf('.')==-1)
      return stringNum+'.00';

    var newNum = stringNum.split('.');

    newNum[1]=(newNum[1].length>2)?newNum[1].subString(0,2):newNum[1];

    if (newNum[1].length==1)
      newNum[1]+='0';

    return newNum[0]+'.'+newNum[1];
  }

function AFTREmbedStopTime()
  {
    AFTREmbedendTime=new Date();

    var a='Loaded: '+AFTREmbedFixPrecision((AFTREmbedendTime-AFTREmbedstartTime)/1000)+'s';

    document.getElementById('AFTREmbedendTime').innerHTML=a;
  }

function AFTREmbedShow()
  {
    document.getElementById("AFTREmbedendTime").innerHTML="Loading...";
    AFTREmbedstartTime=new Date();
    var o=document.getElementById('AFTREmbed');
    document.getElementById('AFTREmbedLink').href = "http://www.amyoops.com";
    document.getElementById('AFTREmbedAd').src = "http://matthiaschronicles.tanaya.net/AFTR/TopAd.html";
    document.getElementById('AFTREmbedBody').src = "http://www.amyoops.com#aftrInUse";
    document.getElementById('aftrCounter').src = "http://matthiaschronicles.tanaya.net/cgi-bin/aftrCounter.cgi?25025";

    o.style.display='inline';
  }

function AFTREmbedWait()
  {
    var AFTREmbedLT;

    AFTREmbedendTime=new Date();

    AFTREmbedLT=(AFTREmbedendTime-AFTREmbedstartTime);
    if(AFTREmbedLT<60000)
      setTimeout('AFTREmbedShow()', (60000-AFTREmbedLT));
    else
      AFTREmbedShow();
  }
function AFTREmbedaddEvent(elm, evType, fn, useCapture)
  {
    if(elm.addEventListener)
      {
        elm.addEventListener(evType, fn, useCapture);
        return true;
      }
    else if (elm.attachEvent)
      {
        var r = elm.attachEvent('on' + evType, fn);
        return r;
      }
    else
      {
        elm['on' + evType] = fn;
        return(true);
      }
    return(false);
  }

function AFTREmbedposition(srch,name)
  {
    var l=srch.length;
    var t=name.length;
    var e=t-l+1;
    var done=-1;

    for(var i=0;i<e && done<0;i++)
      {
        var sub=name.substring(i,i+l);
        if(sub==srch)
          done=i;
      }
    return(done);
  }

AFTREmbedaddEvent(window,'load',AFTREmbedWait,false);

if(AFTREmbedposition('aftrInUse',location.href)<0) { document.writeln('<center><div id="AFTREmbed" style="display: none; font-size: 16px; font-weight: bold; font-family: Verdana,Geneva,Arial,Sans-serif;">');
document.writeln('<table style="background-color: #aeaeff;" width=645>');
document.writeln('<tr height=70><td valign="center"><center>');
document.writeln('Along For The Ride!<br><span id="AFTREmbedendTime">Loading...</span><br>');
document.writeln('<img id="aftrCounter" src="#" border=0 height=1 width=1>');
document.writeln('<a target="_blank" href="http://whos.amung.us/stats/vkhrlhtdwxxw/"><img src="http://whos.amung.us/swidget/vkhrlhtdwxxw.png" width="80" height="15" border="0" title="Visitors" /></a>');
document.writeln('</center></td><td><center>');
document.writeln('<a id="AFTREmbedLink" target="_blank" href="#">Open</a>');
document.writeln('</center></td><td><center>');
document.writeln('<a target="_blank" href="http://matthiaschronicles.tanaya.net/AFTR/">Join!</a>');
document.writeln('</center></td><td><center>');
document.writeln('<iframe id="AFTREmbedAd" src="#" width=300 height=60 scrolling=no marginwidth=0 frameborder=0></iframe>');
document.writeln('</center></td></tr><tr><td colspan=4>');
document.writeln('<iframe id="AFTREmbedBody" src="#" onload="AFTREmbedStopTime();" width=640 height=180></iframe>');
document.writeln('</td><tr></table>');
document.writeln('</div></center>'); }

-->
