// Determines browser
function IsExplorer (){return ((navigator.appName == "Microsoft Internet Explorer") && (navigator.userAgent.search ('Opera') == -1)) ? true : false;}

// Fixes MSIE <sup> font size
function AdjustSup()
{
  if (IsExplorer()==true)
    for (var i=0;i<document.styleSheets(0).rules.length;i++)
    {
      var theRule=document.styleSheets(0).rules(i);
      if (theRule.style.fontSize!="")
        if (theRule.selectorText.toLowerCase()=='sup')
          {theRule.style.fontSize='9pt';break;}
    }
}

function Barehref(theURL)
{
  var i=theURL.indexOf('#');
  if (i!=-1) theURL=theURL.substr(0,i);
  return theURL;
}

var digg_theURL=new String();
var digg_theTitle=new String();
var digg_theBody=new String();
var digg_theTopic=new String();

function Digg(theURL,theTitle,theBody,theTopic)
{
digg_theURL=theURL;
digg_theTitle=theTitle;
digg_theBody=theBody;
digg_theTopic=theTopic;
}

// 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()
{
/*
  if ((navigator.platform.search('Win')==-1)||(IsExplorer()==false))
    document.writeln('<div class=essayheader nowrap="nowrap" align=right><font style="font-size:9pt;color:#000000;background-color:#ffffff;">&nbsp;Best viewed using Microsoft Windows running Internet Explorer&nbsp;<br><br></font></div>');
*/

  // Open header table
  document.write('<table width="100%"><tr><td>');

  // Copyright, sitemap, etc.
  document.write ('<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>');

  document.write('<a href="http://www.skewsme.com/sitemap.html" target="_blank" title="Home" style="font-family:Arial;color:#ffffff;font-size:12pt;font-weight:bold;text-decoration:none;">Skews Me</a> <font style="font-family:Arial;color:#ffffff;font-size:12pt">©</font><br /><font style="font-size:10pt;font-family:tahoma;color:white;font-style:italic;">Even the smallest drop in the bucket makes a wave</font><br /><br />');

  // Open the hide sitemap block
  document.write('<div class=essayheader><font style="font-family:Arial;color:#ffffff;">');

  document.write('<a href="http://www.skewsme.com/sitemap.html" style="font-size:10pt;color:#ffffff;" target=_blank title="Skews Me\'s Sitemap">Sitemap</a> | ');

  document.write('<a style="font-size:10pt;color:#ffffff;" 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>');

  if ((navigator.appName=="Microsoft Internet Explorer")&& (parseInt(navigator.appVersion) >= 4))
  {
    document.write (' | <a style="font-size:10pt;color:#ffffff;" href="#" onClick="window.external.AddFavorite(Barehref(location.href),document.title);">Bookmark</a>');
  }

  // Music link
  document.write(' | <a href=http://www.playlist.com/skewsme style="font-size:10pt;color:#ffffff;" target=_blank title="Skews Me at Playlist.com">Music</a>');

  // Facebook link
  document.write(' | <a href=http://www.facebook.com/SkewsMe style="font-size:10pt;color:#ffffff;" target=_blank title="Skews Me at Facebook.com">Facebook</a>');


  // Close the hide sitemap block
  document.write('</div></td>');

  if (1)
  {
  // Phil Fischer
  document.write('<td class="essayheader" colspan=3 valign=top align=right><a href="http://philfischer.com" style="text-decoration:none;" title="Christian rock artist Phil Fischer - Northwest Musician Awards including Best Songwriter and Best New Artist (PhilFischer.com)"><img src="http://www.skewsme.com/img/phil_fischer_new_believer_728x90.jpg" style="width:728px;height:90px;border:0;" alt="Christian rock artist Phil Fischer - Northwest Musician Awards including Best Songwriter and Best New Artist (PhilFischer.com)" title="Christian rock artist Phil Fischer - Northwest Musician Awards including Best Songwriter and Best New Artist (PhilFischer.com)" /></a></td>');

  // Xbox Boys banner
  //document.write('<td colspan=2 valign=top align=right style="width:728px;height:90px"><a href="http://www.skewsme.com/xbox_boys.html" style="text-decoration:none;" title="Unofficial Homepage of the The Xbox Boys (The Ex Box Boys) featuring Phil Fischer (728x90 banner)"><img src="http://www.skewsme.com/img/the_xbox_boys_ad_728x90.jpg" style="width:728px;height:90px;border:0;" alt="Unofficial Homepage of The Xbox Boys" title="Unofficial Homepage of The Xbox Boys" /></a></td>');
  }

  // Facebook logo
  //document.write('</tr><tr><td class="essayheader" colspan="1"><table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#06448f;"><tr><td style="width:150;"><a href=http://www.facebook.com/SkewsMe target=_blank title="Skews Me at Facebook.com"><img src="images/facebook_logo_120x60.jpg" border="0" alt="Skews Me at Facebook.com" title="Skews Me at Facebook.com" /></a></td>');

  if (0)
  {
  document.write('<td align=right width=500><table cellpadding=0 cellspacing=0 border=0 width=500><tr><td>');
  
  // Playlist player 2012
  document.write('<td align=center bgcolor=#000000><div id="playlistplayer" class="essayheader" style="display:none;text-align: center; margin-left: auto; margin-right: auto; width:450px;"> <object width="435" height="270"> <param name="movie" value="http://www.profileplaylist.net/mc/mp3player_new.swf"></param> <param name="allowscriptaccess" value="never"></param> <param name="wmode" value="transparent"></param> <param name="flashvars" value="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_noautostart.xml&amp;mywidth=435&amp;myheight=270&amp;playlist_url=http%3A%2F%2Fwww.indimusic.us%2Floadplaylist.php%3Fplaylist%3D19086209%26t%3D1242520027&amp;wid=os"></param> <embed style="width:435px; visibility:visible; height:270px;" allowScriptAccess="never" src="http://www.profileplaylist.net/mc/mp3player_new.swf" flashvars="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_noautostart.xml&amp;mywidth=435&amp;myheight=270&amp;playlist_url=http://www.indimusic.us/loadplaylist.php?playlist=19086209&t=1242520027&amp;wid=os" width="435" height="270" name="mp3player" wmode="transparent" type="application/x-shockwave-flash" border="0"/> </object> <br/> <a href="http://www.profileplaylist.net"><img src="http://www.profileplaylist.net/mc/images/create_black.jpg" border="0" alt="Get a playlist!"/></a> <a href="http://www.mysocialgroup.com/standalone/19086209" target="_blank"><img src="http://www.profileplaylist.net/mc/images/launch_black.jpg" border="0" alt="Standalone player"/></a> <a href="http://www.mysocialgroup.com/download/19086209"><img src="http://www.profileplaylist.net/mc/images/get_black.jpg" border="0" alt="Get Ringtones"/></a> </div></td>');

  // Psychoacoustic Kitty
  document.write('<td id=acoustickitty class="essayheader" align=right valign=top rowspan=2><table bgcolor=#000000 cellpadding=0 cellspacing=0 border=2><tr><td align=center><a style="font-family:Arial;font-size:8pt;color:#ffffff;text-decoration:none;" href=# onClick="EnableAcousticKitty(); return false;" title="Playlist.com music" at playlist.com/skewsme"><img src=http://www.skewsme.com/img/psychoacoustic_kitty.gif border=0><br>music</a></td></tr></table></td>');

  // Playlist player phil fischer
  //document.write('<td align=center bgcolor=#000000><div id="playlistplayer" class="essayheader" style="display:none; text-align: center; margin-left: auto; visibility:visible; margin-right: auto; width:450px;"> <object width="435" height="270"> <param name="movie" value="http://www.profileplaylist.net/mc/mp3player_new.swf"></param> <param name="allowscriptaccess" value="never"></param> <param name="wmode" value="transparent"></param> <param name="flashvars" value="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_noautostart.xml&amp;mywidth=435&amp;myheight=270&amp;playlist_url=http%3A%2F%2Fwww.indimusic.us%2Floadplaylist.php%3Fplaylist%3D72677068%26t%3D1260491338&amp;wid=os"></param> <embed style="width:435px; visibility:visible; height:270px;" allowScriptAccess="never" src="http://www.profileplaylist.net/mc/mp3player_new.swf" flashvars="config=http%3A%2F%2Fwww.indimusic.us%2Fext%2Fpc%2Fconfig_black_noautostart.xml&amp;mywidth=435&amp;myheight=270&amp;playlist_url=http://www.indimusic.us/loadplaylist.php?playlist=72677068&t=1260491338&amp;wid=os" width="435" height="270" name="mp3player" wmode="transparent" type="application/x-shockwave-flash" border="0"/> </object> <br/> <a href="http://www.profileplaylist.net"><img src="http://www.profileplaylist.net/mc/images/create_black.jpg" border="0" alt="Get a playlist!"/></a> <a href="http://www.pplaylist.com/standalone/72677068" target="_blank"><img src="http://www.profileplaylist.net/mc/images/launch_black.jpg" border="0" alt="Standalone player"/></a> <a href="http://www.pplaylist.com/download/72677068"><img src="http://www.profileplaylist.net/mc/images/get_black.jpg" border="0" alt="Get Ringtones"/></a> </div></td>');

  document.write('</td></tr></table></td>');

  document.write('</tr><tr><td class=essayheader colspan=2 valign=top align=center><a href=http://videos.skewsme.com/schoolhouse_rock.html target=_blank title="Schoolhouse Rock videos" style="font-family:Arial;font-size:12pt;color:#ffffff;text-decoration:underline">Watch <b>Schoolhouse Rock</b> videos</font></a></td>');

  //document.write('</tr><tr><td class=essayheader colspan=2 valign=top align=center><a href=http://www.skewsme.com/ufo.html target=_blank title="UFO technology" style="font-family:Arial;font-size:12pt;color:#ffffff;text-decoration:underline">Watch <b>NASA\'s UFO</b> footage</font></a></td>');
  }
  
  // Close header table and draw horizontal rule
  document.write('</tr></table><hr class=essayheader style="color:#ffffff">');

  AdjustSup(); // Sets <sup> font-size from default 7pt to 9pt if IE.  7pt is used because other non-IE browsers are whack
}


var _theSize;
function BegThankyou (theSize)
{
  _theSize=theSize;
  document.write('<table class="essayheader" width="100%"><tr><td width="100%">');
}

function EndThankyou() {document.write('</td></tr></table>');}

function AddThankyou (theUrl)
{
  document.write('<a href="' + theUrl + '" 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) + ' alt="Thank you for linking to me"></a> ');
}

var _theLinks = new String();

function AddLink(theName,theLink)
{
  if (_theLinks != "") { _theLinks += '<br />'; }
  _theLinks += '<a href="' + theLink + '" target="_blank">' + theName + '</a>';
}

function DisableCounter() {}

function InsertFooter_(theOrig,theDate,theGroup)
{
  AddLink("Left Bank Books", "http://www.leftbankbooks.com");
  AddLink("Seattle Free School", "http://www.seattlefreeschool.org/");
  AddLink("Seattle Represent!", "http://www.seattlerepresent.com");
  AddLink("Project Playlist", "http://www.playlist.com/skewsme");
  AddLink("Facebook", "http://www.facebook.com/skewsme");
  AddLink("MySpace", "http://www.myspace.com/skewsme");
  AddLink("Yahoo! Answers", "http://answers.yahoo.com/my/my;_ylt=AhMmAu.9TPocVmofPKsDWU0nzKIX;_ylv=3");
  _theLinks += '<br /><br />';
  AddLink("Albion Research Ltd.","http://www.albionresearch.com/");

  document.write('<br clear="all"><hr>');

  document.write('<table class=essayheader width="100%" cellpadding=5 align=center>');

  if (digg_theURL!="")
  {
  document.write('<tr><td valign=top colspan=3>');
  document.write('<font style="font-family:Arial;font-size:10pt">Share with: ');
  document.write('<a target=_blank href="http://del.icio.us/post?url=http%3A%2F%2F' + URLEncode(digg_theURL) + '&title=' + URLEncode(digg_theTitle) + '">Del.icio.us</a>');
  document.write('&nbsp;|&nbsp;<a target=_blank href="http://digg.com/submit?phase=2&url=http%3A%2F%2F' + URLEncode(digg_theURL) + '&title=' + URLEncode(digg_theTitle) + '&bodytext=' + URLEncode(digg_theBody) + '&topic=' + digg_theTopic + '">Digg</a>');
  document.write('&nbsp;|&nbsp;<a target=_blank href="http://reddit.com/submit?url=http%3A%2F%2F' + URLEncode(digg_theURL) + '&title=' + URLEncode(digg_theTitle) + '">Reddit</a>');
  document.write('&nbsp;|&nbsp;<a target=_blank href="http://www.stumbleupon.com/submit?url=http%3A%2F%2F' + URLEncode(digg_theURL) + '&title=' + URLEncode(digg_theTitle) + '">Stumbleupon</a>');
  document.write('</td></tr>');
  }

document.write('<tr><td align=left valign=top rowspan=3 colspan=3><font face="Arial" size="2"><a href="#"><b>[top of page]</b></a></font></td>');

document.write('<td align=right valign=top><font style="font-family:Arial;font-size:9pt">');

if (_theLinks != "") document.write (_theLinks);

document.write ('</font></td></tr></table>');

  document.write('<div class=essayheader><center><a href="http://www.skewsme.com/sitemap.html" title="Home"><img src="http://www.skewsme.com/images/smallworld2.gif" align="absmiddle" border="0"></a></center></div>');

  document.write('<center><a style="text-decoration:none;" title="mail 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></center>');

  document.write('<div class=essayheader><center><hr width=200>');

  document.write('<form style="margin-top:0;" method="post" action="https://www.paypal.com/cgi-bin/webscr"><font style="font-size:9pt;font-family:Arial">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>');

// Yahoo search
//document.write('<br><form method=get action="http://search.yahoo.com/search" style="border:1px solid #999999; padding:5px;/*/*/width:390px;/**/text-align:center;margin-bottom:0" target=_blank><a href="http://search.yahoo.com/"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/search/ysan/ysanlogo.gif" align="absmiddle" border=0></a>&nbsp;<input type="text" name="p" size=25>&nbsp;<input type="hidden" name="fr" value="yscpb">&nbsp;<input type="submit" value="Search"></form>');

document.write('</center></div>');

document.write('<table align=center class=essayheader align=center border=0><tr><td align=center><br><a href="http://smallbusiness.yahoo.com/webhosting/" target="_top"><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 style="font-size:8pt;font-family:Arial">Since 1998</font></td></tr></table>');

document.write ('<div class=essayheader><br><center><a href=http://www.archive.org/index.php target=_blank><img src=http://www.skewsme.com/images/wayback_logo.gif border=0></a><br><font style="font-size:8pt;font-family:Arial">just in case</font></center></div>');

document.write ('<div class=essayheader><br><center><img src=http://www.skewsme.com/img/RecyclingSymbolGreen_60x60.jpg border=0 width=60 height=60 alt="Advertisements and other superficial elements will not appear when printed" title="Advertisements and other superficial elements will not appear when printed"></a><br><font style="font-size:8pt;font-family:Arial">printer friendly<br>by design</font></center><br></div>');

document.write ('<table cellpadding=5><tr><td><a class=essayheader href="http://changedetection.com/detect.html?url=' + Barehref(location.href) + '" target="_blank" style="font-family:Arial;font-size:9pt;">Receive e-mail when this page changes</a><br><font style="font-family:Arial;font-size:8pt;">Created by Skews_Me before: ' + theOrig + '&nbsp;&nbsp;&nbsp;Last modified: ' + theDate + '</font></td></tr></table>');
}

function InsertFooter (theOrig, theDate)       { InsertFooter_ (theOrig, theDate, "skews_me"); }
function InsertDisneyFooter (theOrig, theDate) { InsertFooter_ (theOrig, theDate, "why_we_hate_disney"); }

function EnableAcousticKitty()
{
  var e = document.getElementById('playlistplayer');
  if (e)
    e.style.display = 'inline';
  e = document.getElementById('acoustickitty');
  if (e)
    e.style.display = 'none';
}
