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

var AFTR09729EmbedstartTime=new Date();
var AFTR09729EmbedendTime;

function AFTR09729EmbedFixPrecision(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 AFTR09729EmbedStopTime()
  {
    AFTR09729EmbedendTime=new Date();

    var a='Loaded: '+AFTR09729EmbedFixPrecision((AFTR09729EmbedendTime-AFTR09729EmbedstartTime)/1000)+'s';

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

function AFTR09729EmbedShow()
  {
    document.getElementById("AFTR09729EmbedendTime").innerHTML="Loading...";
    AFTR09729EmbedstartTime=new Date();
    var o=document.getElementById('AFTR09729Embed');
    var b=document.body,e=document.documentElement;
    var w=0,h=0,esw=0,eow=0,bsw=0,bow=0,esh=0,eoh=0,bsh=0,boh=0;

    if(e)
      {
        esw = e.scrollWidth;  eow = e.offsetWidth;
        esh = e.scrollHeight; eoh = e.offsetHeight;
      }
    if(b)
      {
        bsw = b.scrollWidth;  bow = b.offsetWidth;
        bsh = b.scrollHeight; boh = b.offsetHeight;
      }
    w=(Math.max(esw,eow,bsw,bow)-640)/2;
    h=Math.max(esh,eoh,bsh,boh);

    document.getElementById('AFTR09729EmbedLink').href = "http://www.karsunsworld.com";
    document.getElementById('AFTR09729EmbedAd').innerHTML = "<object id='AFTR09729ObjectAd' data='http://matthiaschronicles.tanaya.net/AFTR/TopAd.html' type='text/html' style='overflow: hidden;' width=320 height=60></object>";
    document.getElementById('AFTR09729EmbedBody').innerHTML = "<object id='AFTR09729ObjectBody' data='http://www.karsunsworld.com#aftrInUse' onload='AFTR09729EmbedStopTime();' width=640 height=180></object>";
    document.getElementById('aftr09729Counter').src = "http://matthiaschronicles.tanaya.net/cgi-bin/aftrCounter.cgi?38389";

    o.style.position='absolute';
    o.style.left=w+'px';
    o.style.top=h+'px';
    o.style.display='block';
  }

function AFTR09729EmbedWait()
  {
    var AFTR09729EmbedLT;

    AFTR09729EmbedendTime=new Date();

    AFTR09729EmbedLT=(AFTR09729EmbedendTime-AFTR09729EmbedstartTime);
    if(AFTR09729EmbedLT<60000)
      setTimeout('AFTR09729EmbedShow()', (60000-AFTR09729EmbedLT));
    else
      AFTR09729EmbedShow();
  }
function AFTR09729EmbedaddEvent(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 AFTR09729Embedposition(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);
  }

if(AFTR09729Embedposition('aftrInUse',location.href)<0 && !AFTRonce) { 
var AFTRonce=09729;

AFTR09729EmbedaddEvent(window,'load',AFTR09729EmbedWait,false);

document.writeln('<div id="AFTR09729Embed" 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="AFTR09729EmbedendTime">Loading...</span><br>');
document.writeln('<img id="aftr09729Counter" 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="AFTR09729EmbedLink" 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('<div id="AFTR09729EmbedAd"></div>');
document.writeln('</center></td></tr><tr><td colspan=4>');
document.writeln('<div id="AFTR09729EmbedBody"></div>');
document.writeln('</td><tr></table>');
document.writeln('</div>'); }

-->
