// Copyright 2008 Google Inc. All Rights Reserved. var fileLocation = "http://www.gapminder.org/communityproxy"; var collectionKey = "pCNnWyLHPG75sHTl4Qk8zKg"; var chartTitle = "OECD Factbook 2009"; var titleLink = "http://www.sourceoecd.org/factbook"; var skinColor = "31BBFF"; var defaultChart = "$majorMode=chart$is;shi=t;ly=2003;lb=f;il=t;fs=11;al=30;stl=t;st=t;nsl=t;se=t$wst;tts=C$ts;sp=3.88967741935483;ti=2006$zpv;v=0$inc_x;mmid=XCOORDS;iid=pCNnWyLHPG75Cgd3Ivl9lXw;by=ind$inc_y;mmid=YCOORDS;iid=pCNnWyLHPG77rUPyXd_4qNQ;by=ind$inc_s;uniValue=20;iid=pCNnWyLHPG76muQutLw7XPQ;by=ind$inc_c;uniValue=255;gid=CATID0;by=grp$map_x;scale=log;dataMin=-2.5415;dataMax=8.6$map_y;scale=log;dataMin=1.08;dataMax=6.77$map_s;sma=50;smi=2$cd;bd=0$inds="; var bubbleswf = fileLocation + "/trendalyzer.swf"; var playOnLoadEnabled = false; /** * Called initially by movie */ function getCurrentHash(){ return escape(window.location.href); } /** * Updates the anchor tag with information about the current * chart state. Used to support bookmarking chart state. * This function is called from flash. */ function updateUrl(newUrl){ if (newUrl.length > 1 ) { location.hash=newUrl; } } /** * Returns true if the browser url does not yet * contain a hash string. */ function noChartSpecifiedInUrl(){ return location.hash.length == 0; } /** * Adds the default has defined in the datacollection sheet * to the browser's url. */ function setDefaultChart(){ if (defaultChart.length > 0) location.hash = defaultChart; } /** * Loads the bubble chart and places it in a div called * bubblePanel. This id MUST be present in the embedding * page to work. */ function loadBubbleGraph(){ if (noChartSpecifiedInUrl()) setDefaultChart(); document.title=chartTitle; chart = new SWFObject(bubbleswf, "uid", "100%", "100%", "7", "#FFFFFF", false,"high", null, "noflash.html"); chart.setProxy(null, 'javascript/swfobject_js_gateway.swf'); chart.addVariable('href', escape(window.location.href)); chart.addVariable('skinColor', '0x'+skinColor); chart.addVariable('chartTitle', chartTitle); chart.addVariable('linkToChartUrl', window.location); chart.addVariable('chartLink', titleLink); chart.addParam("scale", "default"); chart.addVariable("playOnLoad", playOnLoadEnabled); chart.addVariable("urlPrefix", fileLocation + "/"); chart.addVariable("collectionKey", collectionKey); chart.write("bubblePanel"); }