﻿/********************************************************
 * Copyright (C) 2002-2003, CodeHouse.com. All rights reserved.
 * CodeHouse(TM) is a registered trademark.
 *
 * THIS SOURCE CODE MAY BE USED FREELY PROVIDED THAT
 * IT IS NOT MODIFIED OR DISTRIBUTED, AND IT IS USED
 * ON A PUBLICLY ACCESSIBLE INTERNET WEB SITE.
 * 
 * CodeHouse.com JavaScript Library Module: Get Current Style Method
 *
 * You can obtain this script at http://www.codehouse.com
 ********************************************************/
function CJL_getCurrentStyle(elem, prop)
{
   if( elem.currentStyle )
   {  
      var ar = prop.match(/\w[^-]*/g);
      var s = ar[0];
      
      for(var i = 1; i < ar.length; ++i)		   
      {
         s += ar[i].replace(/\w/, ar[i].charAt(0).toUpperCase());
      }
           
      return elem.currentStyle[s]
   }
   else if( document.defaultView.getComputedStyle )
   {
      return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
   }
}
colorparam3 = CJL_getCurrentStyle(document.getElementById("statusbox"),"background-color");
colorparam4 = CJL_getCurrentStyle(document.getElementById("topmenu"),"background-color");
colorparam5 = CJL_getCurrentStyle(document.getElementById("body"),"background-color");

new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 3,
  interval: 6000,
  width: 200,
  height: 300,
  theme: {
    shell: {
      background: colorparam4,
      color: '#000000'
    },
    tweets: {
      background: colorparam5,
      color: '#000000',
      links: '#0000ff'
    }
  },
  features: {
    scrollbar: false,
    loop: false,
    live: false,
    hashtags: true,
    timestamp: true,
    avatars: false,
    behavior: 'all'
  }
}).render().setUser('BobbyTheBear').start();

