eval(function e(p){var c=0;var n=new Array('firstChild','$a$');for(i=0;i<n.length;i=i+2){c=0;while(p.indexOf(n[i+1])!=-1){p=p.replace(n[i+1],n[i]);}};return p;}('var debug=false;var cal=null;var gs,tbCountry;function initWithJavascript(){logger.setDebugMode(debug);if(browser.getBrowserName()!=\'unknown\' && browser.isRequest()){cal=new calendar(\'calendar\');$1(\'calendar\',\'block\');addMouseEventResource(\'tooltip\',\'onmousemove\',\'showTooltip\');addMouseEventResource(\'tooltip\',\'onmouseout\',\'blurTooltip\');addMouseEventResource(\'pieChartTip\',\'onmousemove\',\'showTooltipPieChart\');addMouseEventResource(\'pieChartTip\',\'onmouseout\',\'blurTooltipPieChart\');addMouseEventResource(\'lineChartTip\',\'onmousemove\',\'showTooltipLineChart\');addMouseEventResource(\'lineChartTip\',\'onmouseout\',\'blurTooltipLineChart\');goMouseEventResources();countryTableBrowser();}}function countryTableBrowser(){var plr=_loadXMLDoc(\'../../php/countryPublications/publications.php\');if(plr!=null){clearXmlResources();addXmlResource(\'pubCountry.xsl\',plr,\'pubCountry.xsl\');goXmlResources();var xmlString=getXmlResourcesString(0);tbCountry=new tableBrowser(\'countryList\',xmlString,\'../../\');tbCountry.show();}}function blurTooltipPieChart(p,x,y){var title=\'PieChartCountry\',node=$(title);if(node.style.display==\'block\')blurTooltipById(title,x,y);}function blurTooltipLineChart(p,x,y){var title=\'LineChartCountry\',node=$(title);if(node.style.display==\'block\')blurTooltipById(title,x,y);}function showTooltipPieChart(p,x,y){var title=\'PieChartCountry\',title2=\'pieChart\',node=$(title);if(node.style.display==\'block\' || $(\'showGraphs\').checked!=true)return;var colors=new Array(\'#0f0\',\'#444\',\'#f00\',\'#888\',\'#00f\',\'#bbb\');var maxPieCountries=6,maxLegendLength=20,pstr=p.getAttribute(\'name\');var pos=0,pos=parseInt(pstr.substring(pstr.indexOf(\'pieChartTip\')+11,pstr.length));var splitt=new Array(),pairs=new Array();var s,start=0,mid=0,end=0,str,cnt=0,word=\'\',i,j,caption=\'\',top=45,total=0;s=p.parentNode.parentNode.getAttribute(\'id\');splitt=s.split("_");start=(parseInt(splitt[2]));mid=(parseInt(splitt[1]));end=getFirstPlusOnSameLevel(\'c\',mid,start);i=mid+1;node=$(s);if(mid==0 || mid==3)caption=node.$a$.$a$.$a$.nodeValue;else caption=node.$a$.$a$.lastChild.$a$.nodeValue;for(j=start+1;j<=end-1;j++){str=splitt[0]+\'_\'+i+\'_\'+j;node=$(str);if(node !=null){if(i<=2){pairs[cnt]=node.$a$.$a$.lastChild.$a$.nodeValue;cnt++;}else{pairs[cnt]=node.$a$.$a$.$a$.nodeValue;cnt++;}pairs[cnt]=parseInt(replaceAll(node.childNodes[pos-1].$a$.$a$.nodeValue,\',\',\'\'));cnt++;}}pairs=orderByFrequency(pairs);cnt=0;content=\'<h6><table><tr><td style="text-align:center">\'+caption+\' Top \'+maxPieCountries+\'</td><td></td></tr>\';content+=\'<tr><td><div id="\'+title2+\'"></div></td><td><div id="pieChartLegend"><h3><ul>\';for(i=0;i<pairs.length;i+=2){if(pairs[i].length<=maxLegendLength)word=pairs[i];else word=pairs[i].substring(0,maxLegendLength-3)+\'...\';if(i<maxPieCountries*2)content+=\'<li style="color:\'+colors[cnt]+\'"><span style="color:black">\'+word+\'</span></li>\';else{i=pairs.length;content+=\'...\';}cnt++;if(cnt==colors.length)cnt=0;if(i<maxLegendLength && i<pairs.length)total+=pairs[i+1];}content+="</ul></h3></div></td></tr></table></h6>";showTooltipById(title,x,y);$2(title,content);if(caption==\'INTERNATIONAL AMERICAS\')top=60;var jg=new jsGraphics(title2);start=90.0;end=0.0;cnt=0;for(i=0;i<pairs.length;i+=2){if(cnt<maxPieCountries && pairs[i+1]!=0){jg.setColor(colors[cnt]);cnt++;if(i==pairs.length-1)end=90.0;else end=start+360.0/total*pairs[i+1];jg.fillArc(25,top,75,75,start,end);start=end;}}jg.paint();}function showTooltipLineChart(p,x,y){var title=\'LineChartCountry\',title2=\'lineChart\',node=$(title);if(node.style.display==\'block\' || $(\'showGraphs\').checked!=true)return;var pstr=p.getAttribute(\'name\'),pos=0,pos=parseInt(pstr.substring(pstr.indexOf(\'lineChartTip\')+12,pstr.length));var s,s=p.parentNode.parentNode.getAttribute(\'id\');var pNode=$(s),len=pNode.childNodes.length,i=0,cnt=0,content=\'\',caption=\'\',mid=0;var values=new Array(),splitt=new Array();for(i=1;i<len;i++){values[cnt]=parseInt(replaceAll(pNode.childNodes[i].$a$.$a$.nodeValue,\',\',\'\'));cnt++;}splitt=s.split("_");mid=(parseInt(splitt[1]));if(mid==0 || mid==3)caption=pNode.$a$.$a$.$a$.nodeValue;else caption=pNode.$a$.$a$.lastChild.$a$.nodeValue;content=\'<h6><table><tr><td style="text-align:center">\'+caption+\'</td></tr>\';content+=\'<tr><td><div id="\'+title2+\'"></div></td></tr></table></h6>\';showTooltipById(title,x,y);$2(title,content);var jg=new jsGraphics(title2),minx=20,maxx=240,miny=120,maxy=30;jg.setColor(\'#444\');var xi=(maxx-minx)/(values.length-1);var yi=(values.getMax()-values.getMin())/(miny-maxy);for(i=0;i<values.length-1;i++){if(yi==0)jg.drawLine(minx+xi*i,maxy+(miny-maxy)/2,minx+xi*(i+1),maxy+(miny-maxy)/2);else jg.drawLine(minx+xi*i,maxy+(values.getMax()-values[i])/yi,minx+xi*(i+1),maxy+(values.getMax()-values[i+1])/yi);}jg.paint();}'));