// JavaScript Document

var interval = false;

var content1 = '<div id="tooltip"><div style="padding-bottom:5px;">Click <a href="feed.xml">SUBSCRIBE</a> to add this RSS feed.</div><a href="javascript:TTexpand(\'what\');" ><h2>What is RSS?</h2></a><div id="rss-what"></div><a href="javascript:TTexpand(\'how\');" ><h2>How Does RSS Work?</h2></a><div id="rss-how"></div></div>';

var what = 'RSS stands for Real Simple Syndication. In short, RSS enables you to have content, such as press releases, new headlines and announcements, sent to your computer as they are posted to the Web. You choose which Web sites you would like to receive RSS feeds from (such as CambridgeClaims.com). Then, you can view them through an RSS reader, which will allow you to manage all of your feeds in one place.';

var how = 'An RSS feed is typically an XML-based file, which cannot be read within a regular Web browser, so an RSS reader is needed. Some browsers, such as Firefox, have plug-ins you can download that will enable you to read RSS feeds. You can use free RSS reader software on the Web, such as Google Reader, Bloglines, or My Yahoo!. Once you set up your reader, you can subscribe to feeds from the sites most important to you and manage them all through one application.';

var podcontent = '<img src="images/podcast_header.gif" align="left" width="148" height="16"><a href="javascript://" onclick="closePodcast()" width="18" height="16" style="padding:0px; margin:0px 0px 0px 0px;"/><img src="images/podcast_close.gif" border="0" align="left"></a><br><h2 style="width:166px; height:56px; font-size:10px; margin:0px 0px 0px 2px; padding:10px 2px 5px 2px; line-height:13px;"><img src="images/podcast_wesley.jpg" align="left">The Future of Claims Management <span style="font-weight:normal">with Wesley O&#39;Brien</span></h2><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="166" height="26">  <param name="movie" value="http://www.cambridgeclaims.com/podcasts/mp3_player.swf?file=cambridgepodcast4.mp3"><param name="quality" value="high"><param name="allowScriptAccess" value="always" /><embed src="http://www.cambridgeclaims.com/podcasts/mp3_player.swf?file=cambridgepodcast4.mp3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="166" height="26" allowScriptAccess="always"></embed></object>';

/*function TTalign() {
	offsetTop = document.getElementById('subscribe').offsetTop;
	offsetLeft = document.getElementById('subscribe').offsetLeft;
	
	height = document.getElementById('tooltip').offsetHeight;
	
	document.getElementById('tooltip').style.left = offsetLeft + "px";
	document.getElementById('tooltip').style.top = (offsetTop + 20) + "px";
}
*/
function TTdisplay() {
	document.getElementById('tooltipContainer').style.display = '';

}

function TTdelay() {
	if(interval) {
		clearInterval(interval);	
	}
	interval = setInterval(TThide, 500);
}

function TThide() {

	if(interval) {
		document.getElementById('tooltipContainer').style.display = 'none';
		document.getElementById('tooltipContainer').innerHTML = content1;
		clearInterval(interval);
	}
}

function TTclear() {
	if(interval) {
		clearInterval(interval);	
	}
}

function TTexpand(div) {
	
	switch(div) {
		case 'what':
			document.getElementById('rss-what').innerHTML = what;
			document.getElementById('rss-how').innerHTML = '';
			break;
		case 'how':
			document.getElementById('rss-how').innerHTML = how;
			document.getElementById('rss-what').innerHTML = '';
			break;
	}	
}

function openPodcast(){
  document.getElementById('podcastHolder').style.display = "block";
  document.getElementById('podcastHolder').innerHTML = podcontent;
}

function closePodcast(){
	document.getElementById('podcastHolder').style.display = "none";
  document.getElementById('podcastHolder').innerHTML = "";
}