google.load('maps','2');google.load('feeds','1');
function initialize(){
if(top.location!=location){top.location.href=document.location.href}
if(GBrowserIsCompatible()){function createMarker(latlng,headline){var icon=new GIcon();icon.image="http://b4in.net/images/pin_red.png";var scale=-4;icon.iconSize=new GSize(Math.floor(50+4*scale),Math.floor(50+4*scale));icon.iconAnchor=new GPoint(Math.floor(25+2*scale),Math.floor(42+2*scale));icon.infoWindowAnchor=new GPoint(Math.floor(25+2*scale),Math.floor(18+2*scale));var marker=new GMarker(latlng,icon);marker.value=headline;GEvent.addListener(marker,"click",function(){var myHtml=headline;map.openInfoWindowHtml(latlng,myHtml,{maxWidth:50});});return marker;}
var point;var youarehere = new GLatLng(38,-97);var map = new GMap2(document.getElementById("map_canvas"));map.addControl(new GSmallMapControl);map.setCenter(youarehere,2);
window.setTimeout(function(){point=new GLatLng(37.0902,-95.7129);map.addOverlay(createMarker(point,"<a href=\"/story/24676/Terrorism:_Defining_a_Tactic.html\">Terrorism: Defining a Tactic</a>"));}, 510);window.setTimeout(function(){point=new GLatLng(32.803,-96.7699);map.addOverlay(createMarker(point,"<a href=\"/story/24008/Consumer_Credit_Counseling_Debt_Consolidation.html\">Consumer Credit Counseling Debt Consolidation</a>"));}, 520);window.setTimeout(function(){point=new GLatLng(38.4407,-90.2095);map.addOverlay(createMarker(point,"<a href=\"/story/24529/CEFs_Week_of_3_12_10:_A_Stutter_Step.html\">CEFs Week of 3/12/10: A Stutter Step</a>"));}, 530);window.setTimeout(function(){point=new GLatLng(39.7555,-105.221);map.addOverlay(createMarker(point,"<a href=\"/story/24319/World_Bicycle_Adventures:_Stan_the_nomadic_road_warrior.html\">World Bicycle Adventures: Stan the nomadic road warrior</a>"));}, 540);window.setTimeout(function(){point=new GLatLng(44.8338,-92.2407);map.addOverlay(createMarker(point,"<a href=\"/story/24683/Florida_on_guard_against_giant_snails_that_carry_Meningitis_Other_Diseases.html\">Florida on guard against giant snails that carry Meningitis Other Diseases</a>"));}, 550);window.setTimeout(function(){point=new GLatLng(30.3037,-97.7696);map.addOverlay(createMarker(point,"<a href=\"/story/24122/Growing_Eastern_Alliance_against_Obama.html\">Growing Eastern Alliance against Obama</a>"));}, 560);window.setTimeout(function(){point=new GLatLng(30.2481,-98.906);map.addOverlay(createMarker(point,"<a href=\"/story/24341/Obamas_Fort_Sumter_moment_approaches.html\">Obama's Fort Sumter moment approaches!</a>"));}, 570);window.setTimeout(function(){point=new GLatLng(41.8796,-87.623);map.addOverlay(createMarker(point,"<a href=\"/story/24372/Follow_ValueExpectations.com_on_Facebook_and_Twitter:_Special_MFP_Early_Release.html\">Follow ValueExpectations.com on Facebook and Twitter: Special MFP Early Release</a>"));}, 580);window.setTimeout(function(){point=new GLatLng(36.1659,-86.7844);map.addOverlay(createMarker(point,"<a href=\"/story/24301/Dependence_on_government_death_of_America.html\">Dependence on government = death of America</a>"));}, 590);window.setTimeout(function(){point=new GLatLng(33.5207,-86.8025);map.addOverlay(createMarker(point,"<a href=\"/story/24298/Stock_Analysis:_The_Coca-Cola_Company_KO.html\">Stock Analysis: The Coca-Cola Company (KO)</a>"));}, 600);window.setTimeout(function(){point=new GLatLng(34.0232,-84.3616);map.addOverlay(createMarker(point,"<a href=\"/story/24333/Terra_Industries_Eventually_Found_Its_Dance_Partner.html\">Terra Industries Eventually Found Its Dance Partner</a>"));}, 610);window.setTimeout(function(){point=new GLatLng(34.3207,-83.8319);map.addOverlay(createMarker(point,"<a href=\"/story/24114/Changes_in_Bankruptcy_Law_and_what_they_mean_to_you.html\">Changes in Bankruptcy Law and what they mean to you</a>"));}, 620);window.setTimeout(function(){point=new GLatLng(41.4995,-81.6954);map.addOverlay(createMarker(point,"<a href=\"/story/24378/Clevelands_Lebron_Suspsended_for_Steroid_Use_--_Wrong_Lebron.html\">Cleveland's Lebron Suspsended for Steroid Use -- Wrong Lebron</a>"));}, 630);window.setTimeout(function(){point=new GLatLng(35.2271,-80.8431);map.addOverlay(createMarker(point,"<a href=\"/story/24532/Prosolution_Pills.html\">Prosolution Pills</a>"));}, 640);window.setTimeout(function(){point=new GLatLng(36.0726,-79.792);map.addOverlay(createMarker(point,"<a href=\"/story/24326/Prosolution_Pills_Review.html\">Prosolution Pills Review</a>"));}, 650);window.setTimeout(function(){point=new GLatLng(43.6702,-79.3868);map.addOverlay(createMarker(point,"<a href=\"/story/24205/Floodgates_open_JP_Morgan_too_files_for_Active_ETFs.html\">Floodgates open &acirc;€“  JP Morgan too files for Active ETFs</a>"));}, 660);window.setTimeout(function(){point=new GLatLng(36.1737,-115.124);map.addOverlay(createMarker(point,"<a href=\"/story/24511/Watch_Pacquiao_vs_Clottey_Live_Stream_Online_Free_Boxing.html\">Watch Pacquiao vs Clottey Live Stream Online Free Boxing</a>"));}, 670);window.setTimeout(function(){point=new GLatLng(35.8007,-78.8748);map.addOverlay(createMarker(point,"<a href=\"/story/24001/Outlining_My_Trading_Strategy.html\">Outlining My Trading Strategy</a>"));}, 680);window.setTimeout(function(){point=new GLatLng(40.802,-77.8564);map.addOverlay(createMarker(point,"<a href=\"/story/24024/Sharing_the_Pain:_Dealing_with_Fiscal_Deficits.html\">&quot;Sharing the Pain: Dealing with Fiscal Deficits&quot;</a>"));}, 690);window.setTimeout(function(){point=new GLatLng(38.8904,-77.0841);map.addOverlay(createMarker(point,"<a href=\"/story/24135/The_Health_Care_Reform_Bill:_Welcome_To_The_Biggest_Tax_Increase_In_U.S._History.html\">The Health Care Reform Bill: Welcome To The Biggest Tax Increase In U.S. History</a>"));}, 700);window.setTimeout(function(){point=new GLatLng(38.8951,-77.0364);map.addOverlay(createMarker(point,"<a href=\"/story/24306/Obama_promotes_E-Verify_game_for_new_amnesty_offensive.html\">Obama promotes E-Verify game for new amnesty offensive</a>"));}, 710);window.setTimeout(function(){point=new GLatLng(38.906,-77.0334);map.addOverlay(createMarker(point,"<a href=\"/story/24374/China_Issues_Statements_Against_Google_and_Human_Rights.html\">China Issues Statements Against Google and Human Rights</a>"));}, 720);window.setTimeout(function(){point=new GLatLng(39.2992,-76.6146);map.addOverlay(createMarker(point,"<a href=\"/story/24658/Why_Inflation_Won_8217;t_Help_to_Reduce_US_Debt.html\">Why Inflation Won&amp;#8217;t Help to Reduce US Debt</a>"));}, 730);window.setTimeout(function(){point=new GLatLng(37.2388,-76.5097);map.addOverlay(createMarker(point,"<a href=\"/story/24505/An_Effective_Method_to_Get_the_Mobility_Radeon_x300_Driver_Installed_Without_Errors.html\">An Effective Method to Get the Mobility Radeon x300 Driver Installed Without Errors</a>"));}, 740);window.setTimeout(function(){point=new GLatLng(33.7397,-116.413);map.addOverlay(createMarker(point,"<a href=\"/story/24673/Inching_Closer_to_the_Gold_Explosion.html\">Inching Closer to the Gold Explosion</a>"));}, 750);window.setTimeout(function(){point=new GLatLng(34.0522,-118.244);map.addOverlay(createMarker(point,"<a href=\"/story/24315/Californias_illegal_aliens_cost_Los_Angeles_County_50_million_in_January.html\">California's illegal aliens cost Los Angeles County $50 million in January</a>"));}, 760);window.setTimeout(function(){point=new GLatLng(34.0416,-118.299);map.addOverlay(createMarker(point,"<a href=\"/story/24317/iPhone_Netflix...Could_It_Be.html\">iPhone &amp; Netflix...Could It Be</a>"));}, 770);window.setTimeout(function(){point=new GLatLng(34.1379,-118.392);map.addOverlay(createMarker(point,"<a href=\"/story/24321/Modern_Warfare_2_DLC_Releases_March_30th.html\">Modern Warfare 2 DLC Releases March 30th</a>"));}, 780);window.setTimeout(function(){point=new GLatLng(51.0833,-114.083);map.addOverlay(createMarker(point,"<a href=\"/story/24585/Official_sentenced_to_death_for_corruption.html\">Official sentenced to death for corruption</a>"));}, 790);window.setTimeout(function(){point=new GLatLng(40.9793,-74.1165);map.addOverlay(createMarker(point,"<a href=\"/story/24677/Value_in_Mean_Reversion.html\">Value in Mean Reversion?</a>"));}, 800);window.setTimeout(function(){point=new GLatLng(40.7143,-74.006);map.addOverlay(createMarker(point,"<a href=\"/story/24457/Jesse_Ventura_meets_friend_of_Obama_celebrity_magnet_Tom_Murro.html\">Jesse Ventura meets friend of Obama celebrity magnet Tom Murro</a>"));}, 810);window.setTimeout(function(){point=new GLatLng(40.5975,-73.9979);map.addOverlay(createMarker(point,"<a href=\"/story/24409/An_Illustration_of_the_Mass_Mindset_in_Action.html\">An Illustration of the Mass Mindset in Action</a>"));}, 820);window.setTimeout(function(){point=new GLatLng(40.7769,-73.9813);map.addOverlay(createMarker(point,"<a href=\"/story/24638/African_Americans_Underrepresented_in_States_Higher_Education_System.html\">African Americans Underrepresented in State's Higher Education System</a>"));}, 830);window.setTimeout(function(){point=new GLatLng(40.6809,-73.9463);map.addOverlay(createMarker(point,"<a href=\"/story/24621/Saturns_Moon_Full_of_Slush.html\">Saturn's Moon Full of Slush</a>"));}, 840);window.setTimeout(function(){point=new GLatLng(26.0102,-80.1465);map.addOverlay(createMarker(point,"<a href=\"/story/24439/1_year_later-Are_we_any_better_off_3_9_10.html\">1 year later-Are we any better off? 3/9/10</a>"));}, 850);window.setTimeout(function(){point=new GLatLng(38.1302,-121.272);map.addOverlay(createMarker(point,"<a href=\"/story/24308/Angel_Labs_eyes_geothermal_for_MYT_Engine_application.html\">Angel Labs eyes geothermal for MYT Engine application</a>"));}, 860);window.setTimeout(function(){point=new GLatLng(37.8959,-122.566);map.addOverlay(createMarker(point,"<a href=\"/story/24668/Use_Gold_to_Protect_Wealth_and_Store_of_Value..html\">Use Gold to Protect Wealth and Store of Value.</a>"));}, 870);window.setTimeout(function(){point=new GLatLng(42.3646,-71.1028);map.addOverlay(createMarker(point,"<a href=\"/story/24178/Karl_Rove:_Im_Darth_Vader,_Cheney_Is_a_Sith_Master.html\">Karl Rove: I'm Darth Vader, Cheney Is a Sith Master</a>"));}, 880);window.setTimeout(function(){point=new GLatLng(42.3584,-71.0598);map.addOverlay(createMarker(point,"<a href=\"/story/24011/March_2010,_Unlock_iPhone_3G_and_3Gs_with_the_most_Reliable_and_Safe_Solution..html\">March 2010, Unlock iPhone 3G and 3Gs with the most Reliable and Safe Solution.</a>"));}, 890);window.setTimeout(function(){point=new GLatLng(45.4871,-122.804);map.addOverlay(createMarker(point,"<a href=\"/story/24371/China_039;s_Golden_Plans_and_Silver_039;s_Long-_and_Short-Term_Trends.html\">China&amp;#039;s Golden Plans and Silver&amp;#039;s Long- and Short-Term Trends</a>"));}, 900);window.setTimeout(function(){point=new GLatLng(47.6062,-122.332);map.addOverlay(createMarker(point,"<a href=\"/story/24360/National_Coffee_Party_to_Contend_with_GOP_and_Dems.html\">National Coffee Party to Contend with GOP and Dems?</a>"));}, 910);window.setTimeout(function(){point=new GLatLng(53.3441,-6.26749);map.addOverlay(createMarker(point,"<a href=\"/story/24297/Gold_Technicals:_Weekly_Loss_Will_be_Bearish_But_Fundamentals_Remain_Positive.html\">Gold Technicals: Weekly Loss Will be Bearish But Fundamentals Remain Positive</a>"));}, 920);window.setTimeout(function(){point=new GLatLng(45.7494,21.2272);map.addOverlay(createMarker(point,"<a href=\"/story/24660/Watch_Alice_in_Wonderland_movie_free_stream:_Box-office_triumph_over_Avatar.html\">Watch Alice in Wonderland movie free stream: Box-office triumph over Avatar</a>"));}, 930);window.setTimeout(function(){point=new GLatLng(32.0667,34.7667);map.addOverlay(createMarker(point,"<a href=\"/story/23966/Truth_About_6-Pack_Abs_Videos_are_here.html\">Truth About 6-Pack Abs Videos are here</a>"));}, 940);window.setTimeout(function(){point=new GLatLng(32.2092,119.434);map.addOverlay(createMarker(point,"<a href=\"/story/23991/Germany_vs_England_Live_stream:_Hockey_World_Cup_2010_Live_online:_Watch_Live_Germany_England_free_online.html\">Germany vs England Live stream: Hockey World Cup 2010 Live online: Watch Live Germany England free online</a>"));}, 950);window.setTimeout(function(){point=new GLatLng(28.6,77.2);map.addOverlay(createMarker(point,"<a href=\"/story/24003/Ati_Video_Card_Drivers_-_Multi_Purpose_Drivers.html\">Ati Video Card Drivers - Multi Purpose Drivers</a>"));}, 960);window.setTimeout(function(){point=new GLatLng(16.45,120.55);map.addOverlay(createMarker(point,"<a href=\"/story/24482/My_Home_Wealth_System.html\">My Home Wealth System</a>"));}, 970);window.setTimeout(function(){point=new GLatLng(14.6042,120.982);map.addOverlay(createMarker(point,"<a href=\"/story/24503/Pacquiao_vs_Clottey_Free_Live_Stream_via_SopCast.html\">Pacquiao vs Clottey Free Live Stream via SopCast</a>"));}, 980);window.setTimeout(function(){point=new GLatLng(-45.8667,170.5);map.addOverlay(createMarker(point,"<a href=\"/story/23865/Download_Xbox_360_Games_24_Hours_A_Day_-_Xbox_360_Game_Downloads_Available_Now.html\">Download Xbox 360 Games 24 Hours A Day - Xbox 360 Game Downloads Available Now!</a>"));}, 990);window.setTimeout(function(){point=new GLatLng(23.0333,72.6167);map.addOverlay(createMarker(point,"<a href=\"/story/24500/Asbestos_Workers_Wanted_Job_Opportunities_in_Toronto_Ontario,_for_asbestos_removal_and_hazardous_materials_removal_Workers_and_Supervisors_Wanted.html\">Asbestos Workers Wanted Job Opportunities in Toronto Ontario, for asbestos removal and hazardous materials removal Workers and Supervisors Wanted</a>"));}, 1000);window.setTimeout(function(){point=new GLatLng(22.3,73.2);map.addOverlay(createMarker(point,"<a href=\"/story/24288/Affordable_Guaranteed_Auto_Loans_at_low_rate.html\">Affordable Guaranteed Auto Loans at low rate</a>"));}, 1010);window.setTimeout(function(){point=new GLatLng(21.2167,81.4333);map.addOverlay(createMarker(point,"<a href=\"/story/24506/How_to_Copy_Xbox_360_Games_Backup_Xbox_Games_Burn_Xbox_Games_without_Modchip_to_Hard_Drive.html\">How to Copy Xbox 360 Games | Backup Xbox Games | Burn Xbox Games without Modchip to Hard Drive</a>"));}, 1020);window.setTimeout(function(){point=new GLatLng(-0.023559,37.9062);map.addOverlay(createMarker(point,"<a href=\"/story/24661/German_Container_Ship_Evades_Pirate_Attack_in_the_Indian_Ocean.html\">German Container Ship Evades Pirate Attack in the Indian Ocean</a>"));}, 1030);window.setTimeout(function(){point=new GLatLng(12.9833,77.5833);map.addOverlay(createMarker(point,"<a href=\"/story/24280/Watch_Six_Nations_France_vs_Italy_Rugby_14th_Mar_Live_Streaming.html\">Watch Six Nations France vs Italy Rugby 14th Mar Live Streaming</a>"));}, 1040);}
var feeds=[{title:'Before It\'s News',url:'http://beforeitsnews.com/rss'}];var options={horizontal:true,title:"Before It's News"};new GFdynamicFeedControl(feeds,'feed',options);replaceChecks();}
google.setOnLoadCallback(initialize);
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='/>';}
document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
function GFdynamicFeedControl(feedUrls,container,options){this.nodes={};this.collapseElements=[];this.feeds=[];this.results=[];if(typeof feedUrls=='string'){this.feeds.push({url:feedUrls});}else if(typeof feedUrls=='object'){for(var i=0;i<feedUrls.length;i++){var entry=feedUrls[i];var o={};var feedUrl;if(typeof entry=='string'){o.url=feedUrls[i];}else if(typeof entry=='object'){o=feedUrls[i];if(o&&o.title){var s=o.title;o.title=s.replace(/</g,'&lt;').replace(/>/g,'&gt;');}}
this.feeds.push(o);}}
if(typeof container=="string"){container=document.getElementById(container);}
this.parseOptions_(options);this.setup_(container);}
GFdynamicFeedControl.DEFAULT_NUM_RESULTS=4;GFdynamicFeedControl.DEFAULT_FEED_CYCLE_TIME=1800000;GFdynamicFeedControl.DEFAULT_DISPLAY_TIME=5000;GFdynamicFeedControl.DEFAULT_FADEOUT_TIME=1000;GFdynamicFeedControl.DEFAULT_TRANSISTION_STEP=40;GFdynamicFeedControl.DEFAULT_HOVER_TIME=100;GFdynamicFeedControl.prototype.parseOptions_=function(options){this.options={numResults:GFdynamicFeedControl.DEFAULT_NUM_RESULTS,feedCycleTime:GFdynamicFeedControl.DEFAULT_FEED_CYCLE_TIME,linkTarget:google.feeds.LINK_TARGET_BLANK,displayTime:GFdynamicFeedControl.DEFAULT_DISPLAY_TIME,transitionTime:GFdynamicFeedControl.DEFAULT_TRANSISTION_TIME,transitionStep:GFdynamicFeedControl.DEFAULT_TRANSISTION_STEP,fadeOutTime:GFdynamicFeedControl.DEFAULT_FADEOUT_TIME,scrollOnFadeOut:true,pauseOnHover:true,hoverTime:GFdynamicFeedControl.DEFAULT_HOVER_TIME,autoCleanup:true,transitionCallback:null,feedTransitionCallback:null,feedLoadCallback:null,collapseable:false,sortByDate:false,horizontal:false,stacked:false,title:null};if(options){for(var o in this.options){if(typeof options[o]!='undefined'){this.options[o]=options[o];}}}
if(!this.options.stacked){this.options.collapseable=false;}
this.options.displayTime=Math.max(200,this.options.displayTime);this.options.fadeOutTime=Math.max(0,this.options.fadeOutTime);var ts=this.options.fadeOutTime/this.options.transitionStep;this.fadeOutDelta=Math.min(1,(1.0/ts));this.started=false;};GFdynamicFeedControl.prototype.setup_=function(container){if(container==null)return;this.nodes.container=container;if(window.ActiveXObject){this.ie=this[window.XMLHttpRequest?'ie7':'ie6']=true;}else if(document.childNodes&&!document.all&&!navigator.taintEnabled){this.safari=true;}else if(document.getBoxObjectFor!=null){this.gecko=true;}
this.feedControl=new google.feeds.FeedControl();this.feedControl.setLinkTarget(this.options.linkTarget);this.expected=this.feeds.length;this.errors=0;for(var i=0;i<this.feeds.length;i++){var feed=new google.feeds.Feed(this.feeds[i].url);feed.setResultFormat(google.feeds.Feed.JSON_FORMAT);feed.setNumEntries(this.options.numResults);feed.load(this.bind_(this.feedLoaded_,i));}};GFdynamicFeedControl.prototype.bind_=function(method){var self=this;var opt_args=[].slice.call(arguments,1);return function(){var args=opt_args.concat([].slice.call(arguments));return method.apply(self,args);}};GFdynamicFeedControl.prototype.feedLoaded_=function(index,result){if(this.options.feedLoadCallback){this.options.feedLoadCallback(result);}
if(result.error){if(++this.errors>=this.expected){this.nodes.container.innerHTML='Feed'+((this.expected>1)?'s ':' ')+'could not be loaded.';}
return;}
if(this.feeds[index].title){result.feed.title=this.feeds[index].title;}
this.results.push(result);if(!this.started){this.createSubContainers_();this.displayResult_(0);}else if(!this.options.horizontal&&this.options.stacked){this.addResult_(this.results.length-1);}};GFdynamicFeedControl.prototype.sortByDate_=function(resultIndex,newTitle,newList){var newEntryDate=this.results[resultIndex].feed.entries[0].publishedDate;var newEntryDateMS=Date.parse(newEntryDate);var insertIndex=null;for(var i=0;i<this.results.length;i++){var mostRecentPost=this.results[i].feed.entries[0].publishedDate;var mostRecentPostMS=Date.parse(mostRecentPost);if(newEntryDateMS>mostRecentPostMS){insertIndex=i;break;}}
if(insertIndex==null){this.nodes.root.appendChild(newTitle);this.nodes.root.appendChild(newList);this.createListEntries_(resultIndex,newList);return;}
var insertBeforeIndex=2+(insertIndex*2);var swapToIndex=insertBeforeIndex+2;var tempSwap=null;var myResultIndex=resultIndex+1;var sectionsToChange=this.nodes.root.childNodes;var nodeToInsertBefore=sectionsToChange[insertBeforeIndex];this.nodes.root.insertBefore(newTitle,nodeToInsertBefore);this.nodes.root.insertBefore(newList,nodeToInsertBefore);this.results.splice(insertIndex,0,this.results[resultIndex]);this.results.splice(myResultIndex,1);var nodesToChangeClick=sectionsToChange[swapToIndex].nextSibling.childNodes;this.createListEntries_(insertIndex,newList);if(insertIndex==0){this.displayResult_(0);}
insertIndex+=1;for(var i=swapToIndex;i<sectionsToChange.length;i+=2){var nodesToChangeClick=sectionsToChange[i].nextSibling.childNodes;for(var j=0;j<nodesToChangeClick.length;j++){nodesToChangeClick[j].onmouseover=this.bind_(this.listMouseOver_,insertIndex,j);nodesToChangeClick[j].onmouseout=this.bind_(this.listMouseOut_,insertIndex,j);}
insertIndex++;}};GFdynamicFeedControl.prototype.addResult_=function(resultIndex){var result=this.results[resultIndex];var newTitle=this.createDiv_('gfg-subtitle');this.setTitle_(result.feed,newTitle);var newList=this.createDiv_('gfg-list');if(this.options.collapseable){var collapseLink=document.createElement('div');newList.style.display='none';collapseLink.className='gfg-collapse-closed';newTitle.appendChild(collapseLink);collapseLink.onclick=this.toggleCollapse(this,newList,collapseLink);this.collapseElements.push({list:newList,collapse:collapseLink});}
var clearFloat=document.createElement('div');clearFloat.className='clearFloat';newTitle.appendChild(clearFloat);if(!this.options.sortByDate){this.nodes.root.appendChild(newTitle);this.nodes.root.appendChild(newList);this.createListEntries_(resultIndex,newList);}else{this.sortByDate_(resultIndex,newTitle,newList);}};GFdynamicFeedControl.prototype.displayResult_=function(resultIndex){this.resultIndex=resultIndex;var result=this.results[resultIndex];if(this.options.feedTransitionCallback){this.options.feedTransitionCallback(result);}
if(this.options.title){this.setPlainTitle_(this.options.title);}else{this.setTitle_(result.feed);}
this.clearNode_(this.nodes.entry);if(this.started&&!this.options.horizontal&&this.options.stacked){this.entries=result.feed.entries;}else{this.createListEntries_(resultIndex,this.nodes.list);}
this.displayEntries_();}
GFdynamicFeedControl.prototype.setPlainTitle_=function(title,opt_element){var el=opt_element||this.nodes.title;el.innerHTML=title;}
GFdynamicFeedControl.prototype.setTitle_=function(resultFeed,opt_element){var el=opt_element||this.nodes.title;this.clearNode_(el);var link=document.createElement('a');link.target=google.feeds.LINK_TARGET_BLANK;link.href=resultFeed.link;link.className='gfg-collapse-href';link.innerHTML=resultFeed.title;el.appendChild(link);}
GFdynamicFeedControl.prototype.toggleCollapse=function(feedControl,listReference,collapseLink){return function(){var els=feedControl.collapseElements;for(var i=0;i<els.length;i++){var el=els[i];el.list.style.display='none';el.collapse.className='gfg-collapse-closed';}
listReference.style.display='block';collapseLink.className='gfg-collapse-open';}}
GFdynamicFeedControl.prototype.createListEntries_=function(resultIndex,node){var entries=this.results[resultIndex].feed.entries;this.clearNode_(node);for(var i=0;i<entries.length;i++){this.feedControl.createHtml(entries[i]);var className='gfg-listentry ';className+=(i%2)?'gfg-listentry-even':'gfg-listentry-odd';var listEntry=this.createDiv_(className);var link=this.createLink_(entries[i].link,entries[i].title,this.options.linkTarget);listEntry.appendChild(link);if(this.options.pauseOnHover){listEntry.onmouseover=this.bind_(this.listMouseOver_,resultIndex,i);listEntry.onmouseout=this.bind_(this.listMouseOut_,resultIndex,i);}
entries[i].listEntry=listEntry;node.appendChild(listEntry);}
if(node==this.nodes.list){this.entries=entries;}}
GFdynamicFeedControl.prototype.displayEntries_=function(){this.entryIndex=0;this.displayCurrentEntry_();this.setDisplayTimer_();this.started=true;}
GFdynamicFeedControl.prototype.displayNextEntry_=function(){if(this.options.autoCleanup&&this.isOrphaned_()){this.cleanup_();return;}
if(++this.entryIndex>=this.entries.length){if(this.results.length>1){if(++this.resultIndex>=this.results.length){this.resultIndex=0;}
this.displayResult_(this.resultIndex);return;}else{this.entryIndex=0;}}
if(this.options.transitionCallback){this.options.transitionCallback(this.entries[this.entryIndex]);}
this.displayCurrentEntry_();this.setDisplayTimer_();}
GFdynamicFeedControl.prototype.displayCurrentEntry_=function(){this.clearNode_(this.nodes.entry);this.current=this.entries[this.entryIndex].html;this.current.style.top='0px';this.nodes.entry.appendChild(this.current);this.createOverlay_();if(this.options.collapseable){var feedTitle=null;for(var i=0;i<this.results.length;i++){if(this.results[i].feed.entries==this.entries){feedTitle=this.results[i].feed.title;}}
var els=this.collapseElements;for(var i=0;i<els.length;i++){var el=els[i];var divfeedTitle=el.collapse.previousSibling.innerHTML;var expandClicker=el.collapse;if(feedTitle==divfeedTitle){if(this.ie){expandClicker.click();}else{expandClicker.onclick();}}}}
if(this.currentList){var className='gfg-listentry ';className+=(this.currentListIndex%2)?'gfg-listentry-even':'gfg-listentry-odd';this.currentList.className=className;}
this.currentList=this.entries[this.entryIndex].listEntry;this.currentListIndex=this.entryIndex;var className='gfg-listentry gfg-listentry-highlight ';className+=(this.currentListIndex%2)?'gfg-listentry-even':'gfg-listentry-odd';this.currentList.className=className;}
GFdynamicFeedControl.prototype.listMouseHover_=function(resultIndex,listIndex){var result=this.results[resultIndex];var listEntry=result.feed.entries[listIndex].listEntry;listEntry.selectTimer=null;this.clearTransitionTimer_();this.clearDisplayTimer_();this.resultIndex=resultIndex;this.entries=result.feed.entries;this.entryIndex=listIndex;this.displayCurrentEntry_();}
GFdynamicFeedControl.prototype.listMouseOver_=function(resultIndex,listIndex){var result=this.results[resultIndex];var listEntry=result.feed.entries[listIndex].listEntry;var cb=this.bind_(this.listMouseHover_,resultIndex,listIndex);listEntry.selectTimer=setTimeout(cb,this.options.hoverTime);}
GFdynamicFeedControl.prototype.listMouseOut_=function(resultIndex,listIndex){var result=this.results[resultIndex];var listEntry=result.feed.entries[listIndex].listEntry;if(listEntry.selectTimer){clearTimeout(listEntry.selectTimer);listEntry.selectTimer=null;}else{this.setDisplayTimer_();}}
GFdynamicFeedControl.prototype.entryMouseOver_=function(e){this.clearDisplayTimer_();if(this.transitionTimer){this.clearTransitionTimer_();this.displayCurrentEntry_();}}
GFdynamicFeedControl.prototype.entryMouseOut_=function(e){this.setDisplayTimer_();}
GFdynamicFeedControl.prototype.createOverlay_=function(){if(this.current==null)return;if(this.overlay==null){var overlay=this.createDiv_('gfg-entry');overlay.style.position='absolute';overlay.style.top='0px';overlay.style.left='0px';this.overlay=overlay;}
this.setOpacity_(this.overlay,0);this.nodes.entry.appendChild(this.overlay);}
GFdynamicFeedControl.prototype.setDisplayTimer_=function(){if(this.displayTimer){this.clearDisplayTimer_();}
var cb=this.bind_(this.setFadeOutTimer_);this.displayTimer=setTimeout(cb,this.options.displayTime);};GFdynamicFeedControl.timeNow=function(){var d=new Date();return d.getTime();};GFdynamicFeedControl.prototype.fadeOutEntry_=function(){if(this.overlay){var delta=this.fadeOutDelta;var ts=this.options.transitionStep;var now=GFdynamicFeedControl.timeNow();var tick=now-this.lastTick;this.lastTick=now;delta*=(tick/ts);var op=this.overlay.opacity+delta;this.setOpacity_(this.overlay,op);if(this.options.scrollOnFadeOut&&(op>.5)){var r=(op-.5)*2;var newTop=Math.round(this.current.offsetHeight*r);this.current.style.top=newTop+'px';}
if(op<1)return;}
this.clearTransitionTimer_();this.displayNextEntry_();};GFdynamicFeedControl.prototype.setFadeOutTimer_=function(){this.clearTransitionTimer_();this.lastTick=GFdynamicFeedControl.timeNow();var cb=this.bind_(this.fadeOutEntry_);this.transitionTimer=setInterval(cb,this.options.transitionStep);};GFdynamicFeedControl.prototype.clearTransitionTimer_=function(){if(this.transitionTimer){clearInterval(this.transitionTimer);this.transitionTimer=null;}};GFdynamicFeedControl.prototype.clearDisplayTimer_=function(){if(this.displayTimer){clearTimeout(this.displayTimer);this.displayTimer=null;}};GFdynamicFeedControl.prototype.createSubContainers_=function(){var nodes=this.nodes;var container=this.nodes.container;this.clearNode_(container);if(this.options.horizontal){container=this.createDiv_('gfg-horizontal-container');nodes.root=this.createDiv_('gfg-horizontal-root');this.nodes.container.appendChild(container);}else{nodes.root=this.createDiv_('gfg-root');}
nodes.title=this.createDiv_('gfg-title');nodes.entry=this.createDiv_('gfg-entry');nodes.list=this.createDiv_('gfg-list');nodes.root.appendChild(nodes.title);nodes.root.appendChild(nodes.entry);if(!this.options.horizontal&&this.options.stacked){var newTitle=this.createDiv_('gfg-subtitle');nodes.root.appendChild(newTitle);this.setTitle_(this.results[0].feed,newTitle);if(this.options.collapseable){var collapseLink=document.createElement('div');collapseLink.className='gfg-collapse-open';newTitle.appendChild(collapseLink);collapseLink.onclick=this.toggleCollapse(this,nodes.list,collapseLink);this.collapseElements.push({list:nodes.list,collapse:collapseLink});nodes.list.style.display='block';}
var clearFloat=document.createElement('div');clearFloat.className='clearFloat';newTitle.appendChild(clearFloat);}
nodes.root.appendChild(nodes.list);container.appendChild(nodes.root);if(this.options.pauseOnHover){nodes.entry.onmouseover=this.bind_(this.entryMouseOver_);nodes.entry.onmouseout=this.bind_(this.entryMouseOut_);}
if(this.options.horizontal){nodes.branding=this.createDiv_('gfg-branding');google.feeds.getBranding(nodes.branding,google.feeds.VERTICAL_BRANDING);container.appendChild(nodes.branding);}};GFdynamicFeedControl.prototype.clearNode_=function(node){if(node==null)return;var child;while((child=node.firstChild)){node.removeChild(child);}};GFdynamicFeedControl.prototype.createDiv_=function(opt_className,opt_text){var el=document.createElement("div");if(opt_text){el.innerHTML=opt_text;}
if(opt_className){el.className=opt_className;}
return el;};GFdynamicFeedControl.prototype.createLink_=function(href,text,opt_target){var link=document.createElement('a');link.href=href;link.innerHTML=text;if(opt_target){link.target=opt_target;}
return link;};GFdynamicFeedControl.prototype.clearResults_=function(){for(var i=0;i<this.results.length;i++){var result=this.results[i];var entries=result.feed.entries;for(var i=0;i<entries.length;i++){var entry=entries[i];entry.html=null;entry.listEntry.onmouseover=null;entry.listEntry.onmouseout=null;if(entry.listEntry.selectTimer){clearTimeout(entry.listEntry.selectTimer);entry.listEntry.selectTimer=null;}
entry.listEntry=null;}}}
GFdynamicFeedControl.prototype.isOrphaned_=function(){var root=this.nodes.root;var orphaned=false;if(!root||!root.parentNode){orphaned=true;}else if(this.options.horizontal&&!root.parentNode.parentNode){orphaned=true;}
return orphaned;}
GFdynamicFeedControl.prototype.cleanup_=function(){this.started=false;this.clearDisplayTimer_();this.clearTransitionTimer_();this.clearResults_();this.clearNode_(this.nodes.root);this.nodes.container=null;}
GFdynamicFeedControl.prototype.setOpacity_=function(node,opacity){if(node==null)return;opacity=Math.max(0,Math.min(1,opacity));if(opacity==0){if(node.style.visibility!='hidden'){node.style.visibility='hidden';}}else{if(node.style.visibility!='visible'){node.style.visibility='visible';}}
if(this.ie){var normalized=Math.round(opacity*100);node.style.filter='alpha(opacity='+normalized+')';}
node.style.opacity=node.opacity=opacity;};GFgadget=GFdynamicFeedControl;
