var hideInterval=null;var showInterval=null;var oldToHide=null;var onhide=function(toHide)
{if(oldToHide)
{oldToHide.style.display='none';}
oldToHide=toHide;toHide.style.position='absolute';toHide.style.width='330px';$(toHide).fade('out');}
var onshow=function(toShow)
{toShow.style.position='absolute';toShow.style.width='330px';setTimeout(function(){$(toShow).fade('in');toShow.style.display='block';},100);}
new Rotator("RotatorContent",5000,true,true,"h3",onshow,onhide);;var theNewHTML="";var theTimeout=null;function ShowRecentBlog(toShow)
{if(theTimeout!=null)
{return false;}
var theListItems=document.getElementById('BlogTypesList').getElementsByTagName("li");var theTabs=["Featured","Insider","Members"];var parentDiv=document.getElementById("RecentBlogPosts");parentDiv.style.height=parentDiv.scrollHeight;var theLoadingArea=document.createElement("img");theLoadingArea.src="http://www.whydowork.com/images/ajax-loader.gif";theLoadingArea.style.paddingTop="30px";theLoadingArea.style.paddingLeft="270px";for(i=0;i<theTabs.length;i++)
{var theDiv=document.getElementById(theTabs[i]);theDiv.style.display="none";theListItems[i].className=(toShow==theTabs[i])?"Selected":"";parentDiv.appendChild(theLoadingArea);}
var fakeLoadingTimeWeb20sucks=(Math.random()*(900-75))+75;theTimeout=setTimeout(function(){theTimeout=null;parentDiv.style.height="";theLoadingArea.parentNode.removeChild(theLoadingArea);document.getElementById(toShow).style.display="block";},fakeLoadingTimeWeb20sucks);return false;}