// tynt.com publisher tools
// add backlink to copy/paste
if(document.location.protocol=='http:'){
 var Tynt=Tynt||[];Tynt.push('duN0Kw0ayr4jW_adbi-bnq');Tynt.i={"b":true,"ap":"Complete article:","as":"See also: http://facebook.com/SkewsMeScience"};
 (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
}


function Barehref(theURL)
{
  var i=theURL.indexOf('#');
  if (i!=-1) theURL=theURL.substr(0,i);
  return theURL;
}

// URLEncode - Copyright Albion Research Ltd. 2002 (http://www.albionresearch.com/)
// Converted for general use by SkewsMe.com
function URLEncode(plaintext)
{
  // The Javascript escape and unescape functions do not correspond with what browsers actually do
  var SAFECHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";
  // RFC2396 Mark characters
  var HEX="0123456789ABCDEF";
  var encoded="";
  for (var i=0;i<plaintext.length;i++)
  {
    var ch=plaintext.charAt(i);
    if (ch==" ")
      encoded+="+"; // x-www-urlencoded, rather than %20
    else if (SAFECHARS.indexOf(ch)!=-1)
      encoded+=ch;
    else
    {
      var charCode=ch.charCodeAt(0);
      if (charCode>255) // UNICODE not supported
        encoded+="+";
      else
        encoded+="%"+HEX.charAt((charCode>>4)&0xF)+HEX.charAt(charCode&0xF);
    }
  }
  return encoded;
}

function InsertHeader()
{
  // Copyright, home, etc.
  document.write ('<table width="728" align="center" cellpadding="0" cellspacing="0" border="0" style="margin-top:20px;"><tr><td valign="top">'); // begin 728x table
  document.write('<a id="skewsmeTitle" class="header" href="http://www.skewsme.com" target="_blank" title="Home">Skews Me</a><br /><font id="skewsmeMotto" class="header">Even the smallest drop in the bucket makes a wave</font><br />');
    document.write('<div class="essayheader header" style="margin-top:5px;">'); // begin essayheader
      document.write('<a class="header menu" href="http://www.skewsme.com" target="_blank" title="SkewsMe.com">Home</a>');
      document.write(' | <a class="header menu" href="m&#97;i&#108;&#116;o&#58;sk%&#54;5&#119;s_m&#101;@y&#97;hoo&#46;co&#109;?subject=' + document.title + '" title="email Skews Me">Contact</a>');
      document.write(' | <a class="header menu" href="http://www.playlist.com/SkewsMe" target="_blank" title="Skews Me at Playlist.com">Music</a>');
      document.write(' | <a class="header menu" href="http://www.facebook.com/SkewsMeScience" target="_blank" title="Skews Me at Facebook.com">Facebook</a>');
      document.write(' | <a class="header menu" href="http://skewsme.com/politics" target="_blank" title="Politics at Skews Me">Politics</a>');
      //document.write(' | <a class="header menu" href="#" style="font-size:10pt;color:#ffffff;" onClick="javascript:forceAp(); return false;">Occupy!</a>');
      document.write(' | <a class="header menu" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9Z7DWXCVANNEN" target="_blank" title="Paypal donation to Skews Me (Kevin Crosby)">Donate</a>');
    document.write('</div>'); // end essayheader
    document.write('</td><td rowspan="2" align="right" valign="top">');
      document.write('<iframe src="http://www.skewsme.com/skews_me_badge.html" frameborder="0" scrolling="no" style="border:0;margin:0;padding:0;width:300px;height:100px;overflow:hidden;display:inline;"></iframe>');
    document.write('</td>');
  document.write('</tr><tr>');

    document.write('<td valign="bottom">');
      SocialNetworking();
    document.write('</td></tr></table>'); // end 728x table
  document.write('<hr width="728" />');

  // Aeon Now
  //document.write('<div style="text-align:center;"><a class="pic" href="http://AeonNow.com" title="Dreampunk cabaret"><img id="imgAeonNow" src="http://skewsme.com/aeonnow/img/aeon_now_728x90.gif" alt="Dreampunk cabaret" title="Dreampunk cabaret" /></a></div><hr width="728" />');
}

function SocialNetworking()
{
// AddToAny
document.write('<a class="a2a_dd" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_171_16.png" width="171" height="16" border="0" alt="Share"/></a>');

document.write('<script type="text/javascript">a2a_config = { onclick: 1 };</script>');

  document.write('<script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>');
  
/*

  // Facebook SDK
  document.write('<div id="fb-root"></div>');
  window.fbAsyncInit = function() {
    FB.init({appId: '154395581259063', status: true, cookie: true,
             xfbml: true});
  };

  // Create table
  document.write('<table border="1" style="background-color:white;width:300px;height:24px;" cellpadding="5" cellspacing="0"><tr><td>');
  document.write('<table border="0" style="background-color:white" cellpadding="0" cellspacing="0" width="100%"><tr><td>');
  document.write('<table border="0" cellpadding="0" cellspacing="5" width="100%"><tr>');
  document.write('<td style="width:60px;" valign="top">');
  document.write('<a name="fb_share" type="button">');
  document.write('</td><td style="width:16px;" valign="top">');
  document.write('<a target="_blank" class="DiggThisButton DiggIcon" title="submit to Digg"></a>');
  document.write('</td><td style="width:16px;" valign="top">');
  document.write('<a target="_blank" href="http://reddit.com/submit" onclick="window.location = \'http://reddit.com/submit?url=\' + encodeURIComponent(window.location); return false"> <img src="http://reddit.com/static/spreddit1.gif" width="16" height="16" alt="submit to reddit" title="submit to reddit" border="0" /> </a>');
  document.write('</td><td style="width:16px;" valign="top">');
  document.write('<a target="_blank" href="http://www.delicious.com/save" onclick="window.open(\'http://www.delicious.com/save?v=5&noui&jump=close&url=\'+encodeURIComponent(location.href)+\'&title=\'+encodeURIComponent(document.title), \'delicious\',\'toolbar=no,width=550,height=550\'); return false;"><img src="http://l.yimg.com/hr/img/delicious.small.gif" height="16" width="16" alt="submit to Delicious" border="0" /></a>');
  document.write('</td><td style="width:90%;" align="right" valign="top">');
  document.write('<form method="post" action="https://www.paypal.com/cgi-bin/webscr" style="padding:0;margin:0;display:inline;"><input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="skews_me@yahoo.com"><input type="hidden" name="item_name" value=""><input type="hidden" name="return" value=""><input type="hidden" name="cancel_return" value=""><input type="hidden" name="image_url" value=""><input type="hidden" name="bn" value="yahoo-jsbf"><input type="hidden" name="pal" value="C3MGKKUCCAB9J"><input type="hidden" name="mrb" value="R-5AJ59462NH120001H"><input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but04.gif" alt="PayPal donate to Skews Me (Kevin Crosby)" title="PayPal donate to Skews Me (Kevin Crosby)" style="margin:0;"></form>');
  document.write('</td></tr></table>');
  document.write('</td></tr></table>');
  document.write('</td></tr></table>');

  // Facebook - Like button and count
  // <fb:like width="290" action="recommend"></fb:like>
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());

  // Facebook - Share button
  // <a name="fb_share" type="button">
  (function() {
  var e = document.createElement('script'); e.async = true;
  e.src = document.location.protocol +
  '//static.ak.fbcdn.net/connect.php/js/FB.Share';
  document.getElementById('fb-root').appendChild(e);
  }());
  
  // Digg
  // <a class="DiggThisButton DiggIcon"></a>
  (function() {
  var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
  s.type = 'text/javascript';
  s.async = true;
  s.src = 'http://widgets.digg.com/buttons.js';
  s1.parentNode.insertBefore(s, s1);
  })();
*/
  
};


var _theSize;
function BegThankyou(theSize)
{
  _theSize=theSize;
  document.write('<div class="essayHeader footerLeft footerFont" style="margin-top:15px;"><table cellspacing="0" cellpadding="0"><tr><td>');
}

function EndThankyou() {document.write('</td></tr></table></div>');}

function AddThankyou(theUrl)
{
  document.write('<a class="pic" href="' + theUrl + '" title="Thank you for linking to me" target="_blank"><img src="http://www.skewsme.com/images/lips.gif" border="0" width='+ Math.round(28*_theSize/100) + ' height=' + Math.round(16*_theSize/100) + ' /></a> ');
}

var _theLinks = new String();

function AddLink(theName,theLink)
{
  _theLinks += '<li class="footerFont" style="margin-right:2em;"><a dir="ltr" href="' + theLink + '" target="_blank">' + theName + '</a></li>';
}

function DisplayLinks()
{
  if (_theLinks  != "")
  {
    document.write('<ul id="footerLinks" style="margin:0; padding:0; " dir="rtl">');
    document.write(_theLinks);
    document.write('</ul>');
  }
}

function DisableCounter() {}

function InsertFooter_(theOrig,theDate,theGroup)
{
  AddLink("Facebook Skews Me Science", "http://www.facebook.com/SkewsMeScience");
  AddLink("Facebook Kevin Crosby", "http://www.facebook.com/SkewsMe");
  AddLink("Project Playlist", "http://www.playlist.com/SkewsMe");
  AddLink("MySpace", "http://www.myspace.com/SkewsMe");
  AddLink("Seattle Free School", "http://www.seattlefreeschool.org");
  AddLink("Left Bank Books", "http://www.leftbankbooks.com");
  AddLink("Albion Research Ltd.","http://www.albionresearch.com");

  document.write('<br clear="all"><hr />');

  document.write('<table class="essayheader" width="100%" cellspacing="0" cellpadding="5" align="center" border="0"><tr>'); // begin footer table

      // AddToAny / Top of Page
      document.write('<td valign="top" width="33%"><a class="a2a_dd footerLeft footerFont" href="http://www.addtoany.com/share_save"><img src="http://static.addtoany.com/buttons/share_save_171_16.png" width="171" height="16" border="0" alt="Share" /></a>');
      document.write('<script type="text/javascript">a2a_config = { onclick: 1 };</script>');
      document.write('<script type="text/javascript" src="http://static.addtoany.com/menu/page.js" async="async"></script>');
      document.write('<br /><br /><a class="footerLeft footerFont" href="#"><b>[top of page]</b></a></td>');
    
      // Home / email
      document.write('<td align="center" valign="top" style="padding-top:50px;"><a class="pic" href="http://www.SkewsMe.com" title="Home"><img src="http://www.skewsme.com/images/smallworld2.gif" border=0" /></a><br />');
      document.write('<a class="footerFont email" title="email me" href="m&#97;i&#108;&#116;o&#58;sk%&#54;5&#119;s_m&#101;@y&#97;hoo&#46;co&#109;?subject=' + document.title + '">skews_me&#64;ya&#104;oo&#46;&#99;o&#109;</a>');
      document.write('<hr width="200" />');
      // PayPal
      document.write('<form style="margin-top:0;" method="post" action="https://www.paypal.com/cgi-bin/webscr"><font class="footerFont">bandwidth and books cost <font color=#008800>$$$</font></font><br /><input type="hidden" name="cmd" value="_xclick"><input type="hidden" name="business" value="skews_me@yahoo.com"><input type="hidden" name="item_name" value=""><input type="hidden" name="return" value=""><input type="hidden" name="cancel_return" value=""><input type="hidden" name="image_url" value=""><input type="hidden" name="bn" value="yahoo-jsbf"><input type="hidden" name="pal" value="C3MGKKUCCAB9J"><input type="hidden" name="mrb" value="R-5AJ59462NH120001H"><input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but04.gif"></form>');
    
      document.write('</td><td align="right" valign="top" width="33%">');
      DisplayLinks();
      document.write('</td>');
      document.write('</tr><tr><td colspan="3"><hr width="500" /></td></tr><tr>');
      // Hosted by Yahoo!
      document.write('<td><table align="center"><tr><td align="center"><a class="pic" href="http://smallbusiness.yahoo.com/webhosting/" target="_blank"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/smallbiz/gr/hostedby2bw.gif" width="116" height="43" border="0" align="middle" alt="Hosting by Yahoo!"></a><br /><font class="footerFont">Since 1998</font></td></tr></table></td>');
      // Printer friendly
      document.write ('<td><center><img src="http://www.skewsme.com/img/RecyclingSymbolGreen_60x60.jpg" border="0" width="60" height="60" alt="" title=""></a><br /><font class="footerFont">printer friendly<br />by design</font></center></td>');
      // WaybackMachine
      document.write ('<td><center><a class="pic" href="http://www.archive.org/index.php" target=_blank><img src="http://www.skewsme.com/images/wayback_logo.gif" border="0"></a><br /><font class="footerFont">just in case</font></center></td>');
    
  document.write ('</td></tr></table>'); // end footer table

  // ChangeDetection
  document.write ('<div class="essayheader" style="margin-top:15px;"><a class="footerLeft footerFont" href="http://changedetection.com/detect.html?url=' + Barehref(location.href) + '" target="_blank">Receive e-mail when this page changes</a></div>');
  document.write ('<font class="footerLeft footerFont">Created by Skews_Me before: ' + theOrig + '&nbsp;&nbsp;&nbsp;Last modified: ' + theDate + '</font>');

}

function InsertFooter (theOrig, theDate)       { InsertFooter_ (theOrig, theDate, "skews_me"); }
function InsertDisneyFooter (theOrig, theDate) { InsertFooter_ (theOrig, theDate, "why_we_hate_disney"); }

function Digg() { } // UNDONE: remove from HTML pages


