World Economic Forum Ranks U.S. Competitiveness

The World Economic Forum is an independent organization that has been around since the early 1970s. It\’s perhaps best-known for the annual shindig that it holds in Davos, but the organization also puts out a number of reports on aspects of the global economy. The WEF\’s 2011-2012 Global Competitiveness Report evaluates 142 countries on more than 100 different indicators.

Here, I focus on the WEF evaluation of the U.S. economy. Overall, the U.S. economy ranks fifth in the WEF\’s Global Competitiveness Index–behind Switzerland, Singapore, Sweden, and Finland. Clearly this ranking is one of those weighted averages of a lot of stuff, and one can raise questions about the both individual components and weights used. But it\’s also true that when you look at the indicators as a group, it tells useful story. For the U.S. economy, the story is one of real and deep strengths in areas like the size of its markets, the flexibility of its labor markets, its potential for innovation and technology, the overall competence of business management, and its higher education system. It\’s also a story of real and deep weaknesses in secondary education, making widespread use of web-based and wireless technologies, and macroeconomic problems of too little saving and too much government borrowing.

Here\’s the U.S. story in more detail. The WEF groups its 100-plus indicators into 12 \”pillars,\” with the overall U.S. ranking among the 142 countries for that \”pillar\” shown in parenthesis–and then a few words about the underlying components.

Market size (1st of the 142 countries evaluated)
Many Americans take the benefits of our huge domestic economy for granted, but it allows U.S. firms to take advantage of economies of scale and focus on innovation and productivity. Firms with smaller markets need either to operate at a smaller scale, or else spend the time and money to break into a number of foreign markets.

Labor Market Efficiency (4)
In this category, the U.S. economy gets credit for flexibility in hiring and firing, and for being an economy with relatively little \”brain drain\”–that is, where highly skilled people want to work. The professionalism of U.S. management also gets some credit.

Innovation (5)
This category emphasizes research institutes, R&D spending, scientists and engineers, patents, and capacity for innovation–all categories where the U.S. ranks among the world leaders.

Business sophistication (10)
This category includes distribution, marketing, quantity and quality of local suppliers, delegating responsibility within firms, and clusters of excellence, where the U.S. economy has considerable strengths.

Higher Education and Training (13) 

From a world point of view, \”higher education\” includes secondary school–not just colleges and universities. And here we begin to see some hard issues for the U.S. economy.When it comes to college (\”tertiary\”) enrollment, the U.S. does well. But when it comes to secondary education, and quality of math and science education, the U.S. slips way down the rankings.

Infrastructure (16)
The U.S. doesn\’t do super-well in roads, railroads, ports, or air transport infrastructure. It falls even a little lower in these rankings in the quality of its electricity supply. And the U.S. has been a slow adopter by world standards of mobile phone technology, which is surely one of the technologies with the broadest implications for re-structuring our economic and personal interactions in the years ahead.  

Technological readiness (20)
Color me skeptical on this one. Sure, the U.S. ranks low in \”Foreign Direct Investment and Technology Transfer,\” but given the huge U.S. domestic economy and the fact that it\’s near the front edge of technology in so many areas, the lower level of getting technology from elsewhere doesn\’t seem all that worrisome. But this list again emphasize that when it comes to connectivity and the internet, the U.S. is not at the tip-top of the world rankings.

Financial market development (22)
This lower ranking is probably a bit misleading, too. Much of this low ranking is because of difficulties with U.S. banks in the aftermath of the housing price bubble collapse, and is certainly less of a worry in 2011 than it was in early 2009. The same with \”ease of access to loans.\” I haven\’t dug into the fine print to see how the WEF ranks \”regulation of securities exchanges\” or \”Legal rights index,\” but these are subjective and potentially controversial. 

Goods market efficiency (24)
The overall ranking here is probably too low, because some of the lower-ranking elements in this category aren\’t as important in the U.S. economy, with its technological edge and its huge domestic market, as they would be for many other economies: imports/GDP, customs procedures, trade barriers, and foreign ownership. But the rankings are flagging the dysfunctional U.S. tax code, which has too many legal loopholes and as a result ends up imposing higher-than-necessary rates. There are also some strengths in this area, like the degree of local competition and the sophistication of buyers.

Institutions (39)
Almost all of the underlying facts in this \”pillar\” are based on an Executive Opinion Survey done by the World Economic Forum. Thus, the rankings are based on the opinions of that group. This approach is fraught with difficulties: business people are being asked about their own countries, and so comparisons across countries are tricky. Also, some will use surveys like this to boost their own country or to bash others. Personally, I\’m not so sure that a business community which is critical of its politicians is such a bad thing. I\’d worry a bit if the business community felt too cozy with the government! But for what it\’s worth, here\’s the breakdown.

Health and primary education (42)
Again, I mistrust some of these rankings of effects of disease because they measure responses of executives on a survey about how these will affect their company, not actual measures of costs. thus, for example, a country in which business executives worry more about the impact of HIV/AIDS shows up here with a lower ranking. But these rankings also show some well-known difficulties of the U.S. in terms of infant mortality, life expectancy, and even primary education.   

Macroeconomic environment (90)This ranking is based on the very low level of U.S. savings, compared with the enormous budget deficits and high levels of accumulated government debt. Oddly enough, what saves this ranking from being even worse is that the U.S. still ranked 9th best in the world for \”credit rating\” at the time these rankings were done. One suspects that particular ranking won\’t last.

Overall, here\’s the two-paragraph summary about the U.S. economy from the WEF report:

\”The United States continues the decline that began three years ago, falling one more position to 5th place. While many structural features continue to make its economy extremely productive, a number of escalating weaknesses have lowered the US ranking in recent years. US companies are highly sophisticated and innovative, supported by an excellent university system that collaborates admirably with the business sector in R&D. Combined with flexible labor markets and the scale opportunities afforded by the sheer size of its domestic economy—the largest in the world by far—these qualities continue to make the United States very competitive. On the other hand, there are some weaknesses in particular areas that have deepened since past assessments. The business community continues to
be critical toward public and private institutions (39th). In particular, its trust in politicians is not strong (50th), it remains concerned about the government’s ability to maintain arms-length relationships with the private sector (50th), and it considers that the government spends its resources relatively wastefully (66th). In comparison with last year, policymaking is assessed as less transparent
(50th) and regulation as more burdensome (58th).

A lack of macroeconomic stability continues to be the United States’ greatest area of weakness (90th). Over the past decade, the country has been running repeated fiscal deficits, leading to burgeoning levels of public indebtedness that are likely to weigh heavily on the country’s future growth. On a more positive note, after having declined for two years in a row, measures
of financial market development are showing a hesitant recovery, improving from 31st last year to 22nd overall this year in that pillar.\”

I\’ve noted some of my qualms about this index. But taken as a whole, this seems to me a fair-minded broad sketch of the strengths and weaknesses of the U.S. economic situation.

Narayana Kocherlakota on Rigidities, Adjustments, and Monetary Oolicy

Narayana Kocherlakota writes on \”Labor Markets and Monetary Policy\” in the 2010 Annual Report of the Minneapolis Fed.

Monetary policy can address nominal rigidities, but should not seek to overcome standard economic adjustments

\”Suppose that the cost of energy rises suddenly. This increase influences the economy through rather standard demand-and-supply forces. With higher input costs, firms cut back on production and demand less labor, creating higher unemployment. The first lesson from the modern macroeconomic research is that trying to use monetary policy to eliminate this increase in unemployment, generated by the firms’ natural market response to changes in input costs, leads to rates of inflation that are too high relative to the Federal Reserve’s price stability mandate.
     But the modern macroeconomic research also emphasizes that this standard demand-and-supply story captures only part of the effects of the energy price shock. Implicitly, the standard story assumes that the fall in labor demand triggers an immediate fall in wages. This assumption is contradicted by considerable evidence that firms are often unwilling to cut wages by much in response to shocks. Since wages don’t fall sufficiently quickly in response to the change in energy prices, firms cut back even more on labor, and unemployment is even higher than would be implied by the standard demand-and-supply story.
     The second lesson from the modern macroeconomic research is that accommodative monetary policy can offset this additional increase in unemployment, caused by sluggish wage adjustment, without generating unduly high inflation. Intuitively, the additional increase in unemployment occurs only because of the downward pressure on wages, which eventually manifests itself as downward pressure on prices of goods. Accommodative monetary policy is able to offset this increase in unemployment and keep inflation from being too low.
     This story about the consequences of a change in energy prices is only an example, but its lessons apply much more generally. The impact of any macroeconomic shock can be divided into two components. One component is the effect of the natural demand and supply adjustments that would occur if prices and their expectations were to adjust continuously. Monetary policy cannot be used to offset this natural consequence of the shock without creating inflation that is either too high or too low. The other component is the consequence of what economists call nominal rigidities—the sluggish adjustment of prices (including wages, the price of labor) and price expectations. Monetary policy can be used to offset this latter component of the shock’s impact without creating undue pressures on inflation. The challenge for monetary policymakers is to figure out how to divide the observed movements in the unemployment rate into these two components.\”

Core inflation is more informative than labor market data in setting monetary policy

\”Is the unemployment rate high because of nominal rigidities, or is it high because of other factors? That is a central question that confronts monetary policymakers seeking to set the appropriate course of monetary policy. In this essay, I’ve argued that data on aggregate labor market variables like unemployment rates and vacancies are insufficient to reach a sharp answer. Other information, including survey responses and inflation data, suggests that nominal rigidities are having a substantial impact. This conclusion, combined with the low level of inflation itself, implies that it is appropriate for monetary policy to be highly accommodative—as indeed it was at the end of 2010.
     As always, monetary policy will need to evolve in response to ongoing shocks and new information. But I suspect that information about aggregate labor market quantities like unemployment will remain—at best—a noisy indicator about the appropriate stance of policy. Instead, I will be paying close attention to the behavior of core inflation. As the preceding analysis suggests, the changes in this variable appear to provide critical information about the empirical relevance of nominal rigidities, and therefore about the appropriate stance of monetary policy.\”

In the August meeting of the Open Market Committee, Kocherlakota was one of three dissenters against announcing a policy that near-zero interest rates would continue for the next two years. For my post agreeing with his dissent and laying out how I see the evolution of monetary policy in recent years, see \”Can Bernanke Unwind the Fed\’s Policies?\”

Will U.S. Housing Prices Finally Bottom Out in 2012?

John V. Duca, David Luttrell and Anthony Murphy of the Dallas Fed ask: \”When Will the U.S. Housing Market Stabilize?  Their answer, like that of the August CBO report I posted about a few weeks ago, is that housing prices are likely to bottom out in 2012. 

In describing patterns of construction and building permits in recent decades, they write: \”During the subprime boom, construction of single-family homes surged to a high of 1.8 million units per year, far above the 1.1 million units required to cover population growth and physical depreciation of structures. Construction then collapsed, falling roughly 75 percent from the peak by mid-2009.\” As their figure shows, this decline appears to have bottomed out at a level fairly similar to that experienced in the deep recessions of the early 1980s.

They emphasize the role of swings in the loan-to-value ratio: \”More people qualified for a mortgage during the so-called subprime boom because lenders eased the minimum down-payment ratios, maximum debt-payment-to-income ratios, minimum credit scores and other criteria. The relaxed credit standards can be seen in a new survey-based data series on the average mortgage-loanto-
house-price ratio, or loan-to-value (LTV) ratio, for first-time homebuyers (Chart 3), or its counterpart, the downpayment ratio. The average, cyclically adjusted LTV ratio rose to as high as
94 percent (that is, a 6 percent down payment) at the height of the subprime boom, before retreating during the bust. The ratio was about 88 percent (12 percent down payment) during the 1990s.\”

Their simulation results suggest that housing prices will bottom out in late 2011 or 2012. \”During the boom and subsequent bust, house prices were affected by unusual factors, including large swings
in mortgage financing standards and tax credits for first-time homebuyers. … Our econometric models of U.S. house prices, estimated using data through third quarter 2009, take account of these factors, as well as conventional drivers of housing demand. This exercise, carried out in early 2010, predicted
that house prices would resume declining after the expiration of the U.S. tax credit in mid-2010, falling about 5 to 6 percent after third quarter 2010 before likely hitting bottom in late 2011 or early 2012 (Chart 4). … Since early 2010, our simulation has tracked the actual movement in the Freddie Mac purchase-only home price index.\”

Is China\’s Economic Dominance in the Long Run a Sure Thing?

Arvind Subramanian writes \”The Inevitable Superpower: Why China\’s Dominance is a Sure Thing\” in the September/October 2011 issue of Foreign Affairs. The article is available at the Peterson Institute website here or (free registration may be needed ) from the Foreign Affairs website here. It is adapted from his book Eclipse: Living in the Shadow of China\’s Economic Dominance.

The United States used its economic power against the United Kingdom in the 1956 Suez crisis

\”During the 1956 Suez crisis, the United States threatened to withhold financing that the United Kingdom desperately needed unless British forces withdrew from the Suez Canal. Harold Macmillan, who, as the British chancellor of the exchequer, presided over the last, humiliating stages of the crisis, would later recall that it was \”the last gasp of a declining power.\” He added, \”perhaps in 200 years the United States would know how we felt.\” Is that time already fast approaching, with China poised to take over from the United States?\”

Measuring China\’s forthcoming dominance

\”My forthcoming book develops an index of dominance combining just three key factors: a country\’s GDP, its trade (measured as the sum of its exports and imports of goods), and the extent to which it is a net creditor to the rest of the world. …No other gauge of dominance is as instructive as these three: the others are largely derivative (military strength, for example, depends on the overall health and size of an economy in the long run), marginal (currency dominance), or difficult to measure consistently across countries (fiscal strength).     I computed this index going back to 1870 (focusing on the United Kingdom\’s and the United States\’ economic positions then) and projected it to 2030 (focusing on the United States\’ and China\’s positions then). The projections are based on fairly conservative assumptions about China\’s future growth …  To take account of these costs, I project that China\’s growth will slow down considerably: it will average seven percent a year over the next 20 years, compared with the approximately 11 percent it has registered over the last decade. … Meanwhile, I assume that the U.S. economy will grow at about 2.5 percent per year, as it has over the last 30 years….
     The upshot of my analysis is that by 2030, relative U.S. decline will have yielded not a multipolar world but a near-unipolar one dominated by China. China will account for close to 20 percent of global GDP (measured half in dollars and half in terms of real purchasing power), compared with just under 15 percent for the United States. At that point, China\’s per capita GDP will be about $33,000, or about half of U.S. GDP. In other words, China will not be dirt poor, as is commonly believed. Moreover, it will generate 15 percent of world trade — twice as much as will the United States. By 2030, China will be dominant whether one thinks GDP is more important than trade or the other way around; it will be ahead on both counts.
     According to this index and these projections, China\’s ascendancy is imminent. Although the United States\’ GDP is greater than China\’s today and the two countries\’ respective trade levels are close, the United States is a very large and vulnerable debtor — it hogs about 50 percent of the world\’s net capital flows — whereas China is a substantial net creditor to the world. In 2010, the United States\’ lead over China was marginal: there was less than one percentage point difference between their respective indices of dominance. In fact, if one weighed these factors slightly differently, giving slightly less weight to the size of the economy relative to trade, China was already ahead of the United States in 2010.
     China\’s ascendancy in the future will also apply to many more issues than is recognized today. The Chinese economy will be larger than the economy of the United States and larger than that of any other country, and so will its trade and supplies of capital. The yuan will be a credible rival to the dollar as the world\’s premier reserve currency. …
     My projections suggest that the gap between China and the United States in 2030 will be similar to that between the United States and its rivals in the mid-1970s, the heyday of U.S. hegemony, and greater than that between the United Kingdom and its rivals during the halcyon days of the British Empire, in 1870. In short, China\’s future economic dominance is more imminent and will be both greater and more varied than is currently supposed.

China is already exercising its economic power

\”In fact, despite China\’s relatively low per capita GDP today, it is already dominant in several ways. China convinced the African countries in which it invests heavily to close down the Taiwanese embassies they were hosting. With $3 trillion in foreign reserves, it has offered to buy Greek, Irish, Portuguese, and Spanish debt to forestall or mitigate financial chaos in Europe. … China has also used its size to strengthen its trade and financial relationships in Asia and Latin America: for example, trade transactions among several countries in both regions can now be settled in yuan. …
     Beijing is already exercising other forms of dominance. For example, it can require that U.S. and European firms share their technology with Chinese firms before granting them access to its market. And it can pursue policies that have systemic effects, despite opposition from much of the world. Its policy of undervaluing its exchange rate is a classic beggar-thy-neighbor strategy that undermines the openness of the world\’s trading and financial systems while also creating the conditions for easy liquidity, which contributed to the recent global economic crisis. Chinese dominance is not looming. In some ways, it is already here.\”

How vulnerable will the U.S. be to Chinese economic pressure in the future?

\”Now, imagine a not-so-distant future in which the United States has recovered from the crisis of 2008-10 but remains saddled with structural problems: widening income gaps, a squeezed middle class, and reduced economic and social mobility. Its financial system is still as fragile as before the crisis, and the government has yet to come to grips with the rising costs of entitlements and the buildup of bad assets in the financial system, which the government might have to take over. … China has an economy and a trade flow twice as large as the United States\’. The dollar has lost its sheen; demand for the yuan as a reserve currency is growing.
    Much as in 1956, when Washington was suspected of orchestrating massive sales of sterling in New York to force the British government to withdraw its troops from the Suez Canal, rumors are swirling that China is planning to wield its financial power; it has had enough of the United States\’ naval presence in the Pacific Ocean. … A repeat of the Suez crisis may seem improbable today. But the United States\’ current economic situation does leave the country fundamentally vulnerable in the face of China\’s inescapable dominance.\”

Paul Krugman Critiques Modern Macro

Paul Krugman\’s Presidential Address to the Eastern Economic Association, \”The Profession and the Crisis,\” has been published in the Eastern Economic Journal. Some excerpts:

On the shortcomings of economics in recent years: 

\”There is a real sense in which times like these are what economists are for, just as wars are what career military officers are for. OK, maybe I can let microeconomists off the hook. But macroeconomics is, above all, about understanding and preventing or at least mitigating economic downturns. This crisis was the time for the economics profession to justify its existence, for us academic scribblers to show what all our models and analysis are good for. We have not, to put it mildly, delivered.\”
On the failure of many economists to see the housing bubble:

Well, from my point of view — which, because I’m like everyone else, is that what I saw and no more is what everyone should have seen — it still seems bizarre how many economists failed to see that we were experiencing a monstrous housing bubble. As Robert Shiller has documented — and, crucially, was documenting in real time circa 2004–5–6 [Shiller 2005] — the rise in real housing prices after 2002 or so took them into completely unprecedented territory. It was the clearest market mispricing I’ve seen in my professional life, even more obviously out of line than the dot-com bubble, which at least had the excuse that it involved novel technologies with unknown potential; houses have been with us for 7,000 years or so, and we should have a reasonable idea of what they’re worth. …
     What about what would happen when the bubble burst? I personally failed to realize how big the “knock-on” effects would be; and according to the self-justifying principle, I’m tempted to say that nobody could reasonably have been expected to get that right. But actually, we should have seen that coming too — maybe not in full detail, but even a casual walk through historical crises should have indicated that a housing bust was likely to bring large financial and balance-sheet problems in its wake. I kick myself every once in a while for failing to think that part through.  …
     Still, as Yogi Berra said, it\’s tough to make predictions, especially about the future. There are so many things going on in the world, many of them off any modeler\’s radar, that the profession\’s failure to see this crisis coming is not, in my mind, anything close to its biggest sin.\”

A return to the macroeconomic Dark Ages?
\”But what became clear in the policy debate after the 2008 crisis was that many economists — including many macroeconomists — don’t know the simplest multiplier analysis. They literally know nothing about models in which aggregate demand can be determined by more than the quantity of money. I’m not saying that they have looked into such models and rejected them; they are unaware that it\’s even possible to tell a logically consistent Keynesian story. We’ve entered a Dark Age of macroeconomics, in which much of the profession has lost its former knowledge, just as barbarian Europe had lost the knowledge of the Greeks and Romans. …
     All of this would have been OK if the triumph of anti-Keynesianism was justified by superior empirical success. But it wasn’t. As I read the history of the equilibrium approach, it\’s a story of failing upward. Lucas-type models clearly failed to account for the duration of slumps; rather than reconsider flexible prices and rational expectations, Lucas\’s followers moved on to real business cycles (RBC). RBC models failed to generate any strikingly successful predictions, and in fact lost whatever plausibility they had once productivity started becoming pro-cyclical rather than counter-cyclical. But by that time the people doing these models didn’t know that there was any alternative.
     And the result was that faced with a severe economic crisis, the profession spoke with a cacophony of voices. Or maybe a better way to put it is that the policy debate of 2009–2010 was virtually indistinguishable from the policy debate of 1931–1932. Long-refuted doctrines that should have been consigned to the dustbin of history were stated as if they were fresh new ideas — and they were fresh and new to many economists, because our profession had lost so much of its heritage.
     In short, in responding to the crisis, the profession presented a sorry spectacle of unnecessary ignorance that didn’t even recognize itself as ignorance, of bitter debate over issues that were resolved many decades earlier. And all of this, of course, made the profession mostly useless at a time when it could and should have been of great service. Put it this way: we would have responded better to this crisis if macroeconomics had been frozen at the level of knowledge it had in 1948, when Paul Samuelson published the first edition of his famous textbook. And the result has been to leave actual policy discussion without any discipline from the people who should be shaping that discussion: politicians and officials have been free to follow their prejudices and intuitions, never mind the lessons of history and analysis. Economists have failed to fulfill their social function.\”

createInlineScriptElement(\”var%20LEO_HIGHLIGHTS_DEBUG%20%3D%20true%3B%0Avar%20LEO_HIGHLIGHTS_DEBUG_POS%20%3D%20false%3B%0Avar%20LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT%20%3D%20300%3B%0Avar%20LEO_HIGHLIGHTS_MAX_HIGHLIGHTS%20%3D%20200%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_ID%20%3D%20%22leoHighlights_iframe%22%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_DIV_ID%20%3D%20%22leoHighlights_iframe_modal_div_container%22%3B%0Avar%20LEO_HIGHLIGHTS_SHOW_DELAY_MS%20%3D%20300%3B%0Avar%20LEO_HIGHLIGHTS_HIDE_DELAY_MS%20%3D%20750%3B%0Avar%20LEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT%20%3D%20%22transparent%20none%20repeat%20scroll%200%25%200%25%22%3B%0Avar%20LEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER%20%3D%20%20%20%22rgb%28245%2C245%2C0%29%20none%20repeat%20scroll%200%25%200%25%22%3B%0Avar%20_leoHighlightsPrevElem%20%3D%20null%3B%0A%0A/**%0A%20*%20General%20method%20used%20to%20debug%20exceptions%0A%20*%20%0A%20*%20@param%20location%0A%20*%20@param%20e%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsReportExeception%28location%2Ce%29%0A%7B%0A%20%20%20if%28LEO_HIGHLIGHTS_DEBUG%29%0A%20%20%20%7B%0A%20%20%20%20%20%20alert%28%22EXCEPTION%3A%20%22+location+%22%3A%20%22+e+%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%5Cn%5Ct%22+e.name+%22%5Cn%5Ct%22+%28e.number%260xFFFF%29+%22%5Cn%5Ct%22+e.description%29%3B%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20dimensions%20object%0A%20*%20%0A%20*%20@param%20width%0A%20*%20@param%20height%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsDimension%28width%2Cheight%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.width%3Dwidth%3B%0A%20%20%20%09this.height%3Dheight%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22+this.width+%22%2C%22+this.height+%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsDimension%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20is%20a%20Position%20object%0A%20*%20%0A%20*%20@param%20x%0A%20*%20@param%20y%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPosition%28x%2Cy%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.x%3Dx%3B%0A%20%20%20%09this.y%3Dy%3B%0A%20%20%20%09this.toString%3Dfunction%28%29%20%7B%20return%20%28%22%28%22+this.x+%22%2C%22+this.y+%22%29%22%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPosition%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0Avar%20LEO_HIGHLIGHTS_ADJUSTMENT%20%3D%20new%20LeoHighlightsPosition%283%2C3%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28394%2C236%29%3B%0Avar%20LEO_HIGHLIGHTS_IFRAME_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28394%2C512%29%3B%0Avar%20LEO_HIGHLIGHTS_CLOSE_BAR_HEIGHT%20%3D%2040%3B%0Avar%20LEO_HIGHLIGHTS_DIV_HOVER_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_HOVER_SIZE.width%2C%0A%09%09%09LEO_HIGHLIGHTS_IFRAME_HOVER_SIZE.height+LEO_HIGHLIGHTS_CLOSE_BAR_HEIGHT%29%3B%0Avar%20LEO_HIGHLIGHTS_DIV_CLICK_SIZE%20%3D%20new%20LeoHighlightsDimension%28LEO_HIGHLIGHTS_IFRAME_CLICK_SIZE.width%2C%0A%09%09LEO_HIGHLIGHTS_IFRAME_CLICK_SIZE.height+LEO_HIGHLIGHTS_CLOSE_BAR_HEIGHT%29%3B%0A%0A%0A/**%0A%20*%20Sets%20the%20size%20of%20the%20passed%20in%20element%0A%20*%20%0A%20*%20@param%20elem%0A%20*%20@param%20dim%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSetSize%28elem%2Cdim%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09//%20Set%20the%20popup%20location%0A%20%20%20%09elem.style.width%20%3D%20dim.width%20+%20%22px%22%3B%0A%20%20%20%09if%28elem.width%29%0A%20%20%20%09%09elem.width%3Ddim.width%3B%0A%20%20%20%09elem.style.height%20%20%3D%20dim.height%20+%20%22px%22%3B%0A%20%20%20%09if%28elem.height%29%0A%20%20%20%09%09elem.height%3Ddim.height%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20can%20be%20used%20for%20a%20simple%20one%20argument%20callback%0A%20*%0A%20*%20@param%20callName%0A%20*%20@param%20argName%0A%20*%20@param%20argVal%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsSimpleGwCallBack%28callName%2CargName%2C%20argVal%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20if%28argName%29%0A%20%20%20%20%20%20%09gwObj.addParam%28argName%2CargVal%29%3B%0A%20%20%20%20%20%20gwObj.callName%28callName%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsSimpleGwCallBack%28%29%20%22+callName%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20gets%20a%20url%20argument%20from%20the%20current%20document.%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetUrlArg%28url%2C%20name%20%29%0A%7B%0A%09%20%20name%20%3D%20name.replace%28/[%5C[]/%2C%22%5C%5C%5C[%22%29.replace%28/[%5C]]/%2C%22%5C%5C%5C]%22%29%3B%0A%09%20%20var%20regexS%20%3D%20%22[%5C%5C?%26]%22+name+%22%3D%28[^%26%23]*%29%22%3B%0A%09%20%20var%20regex%20%3D%20new%20RegExp%28%20regexS%20%29%3B%0A%09%20%20var%20results%20%3D%20regex.exec%28url%29%3B%0A%09%20%20if%28%20results%20%3D%3D%20null%20%29%0A%09%20%20%20%20return%20%22%22%3B%0A%09%20%20else%0A%09%20%20%20%20return%20results[1]%3B%0A%7D%0A%0A%0A/**%0A%20*%20This%20allows%20to%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsRedirectTop%28url%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%20%20%20%09%0A%20%20%20%09top.location%3Durl%3B%09%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsRedirectTop%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20is%20used%20to%20report%20events%20to%20the%20plugin%0A%20*%20@param%20key%0A%20*%20@param%20sub%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsEvent%28key%2C%20sub%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22key%22%2C%20key%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22sub%22%2C%20sub%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22leoHighlightsEvent%22%29%3B%09%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsEvent%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20find%20an%20element%20by%20Id%0A%20*%20%0A%20*%20@param%20elemId%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsFindElementById%28elemId%29%0A%7B%0A%09try%0A%09%7B%0A%09%09var%20elem%3Ddocument.getElementById%28elemId%29%3B%0A%09%09if%28elem%29%0A%09%09%09return%20elem%3B%0A%09%09%0A%09%09/*%20This%20is%20the%20handling%20for%20IE%20*/%0A%09%09if%28document.all%29%0A%09%09%7B%0A%09%09%09elem%3Ddocument.all[elemId]%3B%0A%20%20%20%20%20%20%20%20%20if%28elem%29%0A%20%20%20%20%20%20%20%20%20%09return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20for%20%28%20var%20i%20%3D%20%28document.all.length-1%29%3B%20i%20%3E%3D%200%3B%20i–%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09elem%3Ddocument.all[i]%3B%0A%20%20%20%20%20%20%20%20%20%09if%28elem.id%3D%3DelemId%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20elem%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%09%09%7D%0A%09%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsFindElementById%28%29%22%2Ce%29%3B%0A%20%20%20%7D%0A%09return%20null%3B%0A%7D%0A%0A/**%0A%20*%20Get%20the%20location%20of%20one%20element%20relative%20to%20a%20parent%20reference%0A%20*%0A%20*%20@param%20ref%0A%20*%20%20%20%20%20%20%20%20%20%20%20the%20reference%20element%2C%20this%20must%20be%20a%20parent%20of%20the%20passed%20in%0A%20*%20%20%20%20%20%20%20%20%20%20%20element%0A%20*%20@param%20elem%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetLocation%28ref%2C%20elem%29%20%7B%0A%20%20%20var%20count%20%3D%200%3B%0A%20%20%20var%20location%20%3D%20new%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20var%20walk%20%3D%20elem%3B%0A%20%20%20while%20%28walk%20%21%3D%20null%20%26%26%20walk%20%21%3D%20ref%20%26%26%20count%20%3C%20LEO_HIGHLIGHTS_INFINITE_LOOP_COUNT%29%20%7B%0A%20%20%20%20%20%20location.x%20+%3D%20walk.offsetLeft%3B%0A%20%20%20%20%20%20location.y%20+%3D%20walk.offsetTop%3B%0A%20%20%20%20%20%20walk%20%3D%20walk.offsetParent%3B%0A%20%20%20%20%20%20count++%3B%0A%20%20%20%7D%0A%0A%20%20%20return%20location%3B%0A%7D%0A%0A/**%0A%20*%20This%20is%20used%20to%20update%20the%20position%20of%20an%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20IFrame%0A%20*%20@param%20anchor%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsUpdatePopupPos%28iFrame%2Canchor%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20//%20Gets%20the%20scrolled%20location%20for%20x%20and%20y%0A%20%20%20%20%20%20var%20scrolledPos%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20if%28%20self.pageYOffset%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20self.pageXOffset%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20self.pageYOffset%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.scrollTop%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.documentElement.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.documentElement.scrollTop%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20scrolledPos.x%20%3D%20document.body.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20scrolledPos.y%20%3D%20document.body.scrollTop%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Get%20the%20total%20dimensions%20to%20see%20what%20scroll%20bars%20might%20be%20active%20*/%0A%20%20%20%20%20%20var%20totalDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%0A%20%20%20%20%20%20if%20%28document.all%20%26%26%20document.documentElement%20%26%26%20%0A%20%20%20%20%20%20%09document.documentElement.clientHeight%26%26document.documentElement.clientWidth%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09totalDim.width%20%3D%20document.documentElement.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.documentElement.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%20if%20%28document.all%29%0A%20%20%20%20%20%20%7B%20/*%20This%20is%20in%20IE%20*/%0A%20%20%20%20%20%09%20%09totalDim.width%20%3D%20document.body.scrollWidth%3B%0A%20%20%20%20%20%20%09totalDim.height%20%3D%20document.body.scrollHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20else%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%09%20totalDim.width%20%3D%20document.width%3B%0A%20%20%20%20%20%20%09%20totalDim.height%20%3D%20document.height%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20//%20Gets%20the%20location%20of%20the%20available%20screen%20space%0A%20%20%20%20%20%20var%20centerDim%3Dnew%20LeoHighlightsDimension%280%2C0%29%3B%0A%20%20%20%20%20%20if%28self.innerWidth%20%26%26%20self.innerHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20self.innerWidth-%28totalDim.height%3Eself.innerHeight?16%3A0%29%3B%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20self.innerHeight-%28totalDim.width%3Eself.innerWidth?16%3A0%29%3B%20%20//%20subtracting%20scroll%20bar%20offsets%20for%20firefox%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.documentElement%20%26%26%20document.documentElement.clientHeight%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.documentElement.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.documentElement.clientHeight%3B%0A%20%20%20%20%20%20%7D%20else%20if%28%20document.body%20%29%20%7B%0A%20%20%20%20%20%20%20%20%20centerDim.width%20%3D%20document.body.clientWidth%3B%0A%20%20%20%20%20%20%20%20%20centerDim.height%20%3D%20document.body.clientHeight%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20//%20Get%20the%20current%20dimension%20of%20the%20popup%20element%0A%20%20%20%20%20%20var%20iFrameDim%3Dnew%20LeoHighlightsDimension%28iFrame.offsetWidth%2CiFrame.offsetHeight%29%0A%20%20%20%20%20%20if%20%28iFrameDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.width%20%3D%20iFrame.style.width.substring%280%2C%20iFrame.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20if%20%28iFrameDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%09iFrameDim.height%20%3D%20iFrame.style.height.substring%280%2C%20iFrame.style.height.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Calculate%20the%20position%2C%20lower%20right%20hand%20corner%20by%20default%20*/%0A%20%20%20%20%20%20var%20position%3Dnew%20LeoHighlightsPosition%280%2C0%29%3B%0A%20%20%20%20%20%20position.x%3DscrolledPos.x+centerDim.width-iFrameDim.width-LEO_HIGHLIGHTS_ADJUSTMENT.x%3B%0A%20%20%20%20%20%20position.y%3DscrolledPos.y+centerDim.height-iFrameDim.height-LEO_HIGHLIGHTS_ADJUSTMENT.y%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20if%28anchor%21%3Dnull%29%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20//centerDim%20in%20relation%20to%20the%20anchor%20element%20if%20available%0A%20%20%20%20%20%20%20%20%20var%20topOrBottom%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorPos%3D_leoHighlightsGetLocation%28document.body%2C%20anchor%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorScreenPos%20%3D%20new%20LeoHighlightsPosition%28anchorPos.x-scrolledPos.x%2CanchorPos.y-scrolledPos.y%29%3B%0A%20%20%20%20%20%20%20%20%20var%20anchorDim%3Dnew%20LeoHighlightsDimension%28anchor.offsetWidth%2Canchor.offsetHeight%29%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.width%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.width%20%3D%20anchor.style.width.substring%280%2C%20anchor.style.width.indexOf%28%27px%27%29%29%3B%0A%20%20%20%20%20%20%20%20%20if%20%28anchorDim.height%20%3C%3D%200%29%0A%20%20%20%20%20%20%20%20%20%09anchorDim.height%20%3D%20anchor.style.height.substring%280%2C%20anchor.style.height.indexOf%28%27px%27%29%29%3B%0A%0A%20%20%20%20%20%20%20%20%20//%20Check%20if%20the%20popup%20can%20be%20shown%20above%20or%20below%20the%20element%0A%20%20%20%20%20%20%20%20%20if%20%28centerDim.height%20-%20anchorDim.height%20-%20iFrameDim.height%20-%20anchorScreenPos.y%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20below%2C%20formula%20above%20calculates%20space%20below%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20+%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20if%20%28anchorScreenPos.y%20-%20anchorDim.height%20-%20iFrameDim.height%20%3E%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%09//%20Show%20above%2C%20formula%20above%20calculates%20space%20above%20open%20iFrame%0A%20%20%20%20%20%20%20%20%20%09position.y%20%3D%20anchorPos.y%20-%20iFrameDim.height%20-%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20topOrBottom%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20if%20%28topOrBottom%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20We%20attempt%20top%20attach%20the%20window%20to%20the%20element%0A%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20iFrameDim.width%20/%202%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28position.x%20%3C%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28position.x%20+%20iFrameDim.width%20%3E%20scrolledPos.x%20+%20centerDim.width%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20scrolledPos.x%20+%20centerDim.width%20-%20iFrameDim.width%3B%0A%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20//%20Attempt%20to%20align%20on%20the%20right%20or%20left%20hand%20side%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28centerDim.width%20-%20anchorDim.Width%20-%20iFrameDim.width%20-%20anchorScreenPos.x%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.x%20%3D%20anchorPos.x%20+%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20if%20%28anchorScreenPos.x%20-%20anchorDim.width%20-%20iFrameDim.width%20%3E%200%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%09position.x%20%3D%20anchorPos.x%20-%20anchorDim.width%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20else%20%20//%20default%20to%20below%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20position.y%20%3D%20anchorPos.y%20+%20anchorDim.height%3B%0A%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%20%20/*%20Make%20sure%20that%20we%20don%27t%20go%20passed%20the%20right%20hand%20border%20*/%0A%20%20%20%20%20%20if%28position.x+iFrameDim.width%3EcenterDim.width-20%29%0A%20%20%20%20%20%20%09position.x%3DcenterDim.width-%28iFrameDim.width+20%29%3B%0A%20%20%20%20%20%20%09%09%0A%20%20%20%20%20%20//%20Make%20sure%20that%20we%20didn%27t%20go%20passed%20the%20start%0A%20%20%20%20%20%20if%28position.x%3C0%29%0A%20%20%20%20%20%20%20%20%20position.x%3D0%3B%0A%20%20%20%20%20%20if%28position.y%3C0%29%0A%20%20%20%20%20%20%09position.y%3D0%3B%0A%0A%20%20%20%20%20%20if%20%28LEO_HIGHLIGHTS_DEBUG_POS%26%26LEO_HIGHLIGHTS_DEBUG%29%20%7B%0A%20%20%20%20%20%20%20%20%20alert%28%22%20Popup%20info%20id%3A%20%20%20%20%20%20%20%22%20+iFrame.id+%22%20-%20%22+anchor.id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5Cnscrolled%20%20%20%20%20%20%20%20%20%20%22%20+%20scrolledPos%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5Cncenter/visible%20%20%20%20%22%20+%20centerDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5Cnanchor%20%28absolute%29%20%22%20+%20anchorPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5Cnanchor%20%28screen%29%20%20%20%22%20+%20anchorScreenPos%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5CnSize%20%28anchor%29%20%20%20%20%20%22%20+%20anchorDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5CnSize%20%28popup%29%20%20%20%20%20%20%22%20+%20iFrameDim%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+%20%22%5CnResult%20pos%20%20%20%20%20%20%20%20%22%20+%20position%29%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20//%20Set%20the%20popup%20location%0A%20%20%20%20%20%20iFrame.style.left%20%3D%20position.x%20+%20%22px%22%3B%0A%20%20%20%20%20%20iFrame.style.top%20%20%3D%20position.y%20+%20%22px%22%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsUpdatePopupPos%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20show%20the%20passed%20in%20element%20as%20a%20popup%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09var%20popup%3Dnew%20LeoHighlightsPopup%28anchorId%2Csize%29%3B%0A%20%20%20%09popup.show%28%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22_leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A%0A/**%0A%20*%20This%20will%20transform%20the%20passed%20in%20url%20to%20a%20rover%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@return%0A%20*/%0Afunction%20_leoHighlightsGetRoverUrl%28url%29%0A%7B%0A%09var%20rover%3D%22711-36858-13496-14%22%3B%0A%09var%20roverUrl%3D%22http%3A//rover.ebay.com/rover/1/%22+rover+%22/4?%26mpre%3D%22+encodeURI%28url%29%3B%0A%09%0A%09return%20roverUrl%3B%0A%7D%0A%0A/**%0A%20*%20Class%20for%20a%20Popup%20%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20LeoHighlightsPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09this.anchorId%3DanchorId%3B%0A%20%20%20%09this.anchor%3D_leoHighlightsFindElementById%28this.anchorId%29%3B%0A%20%20%20%09this.iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_ID%29%3B%0A%20%20%20%09this.iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%20%20%20%09%0A%20%20%20%09var%20url%3Dunescape%28this.anchor.getAttribute%28%27leoHighlights_url%27%29%29%3B%0A%0A%20%20%20%09this.iFrame.src%3Durl%3B%0A%0A%20%20%20%09leoHighlightsSetSize%28size%29%3B%0A%20%20%20%09%0A%20%20%20%09this.updatePos%3Dfunction%28%29%20%7B%20_leoHighlightsUpdatePopupPos%28this.iFrameDiv%2Cthis.anchor%29%7D%3B%0A%20%20%20%09this.show%3Dfunction%28%29%20%7Bthis.updatePos%28%29%3B%20this.iFrameDiv.style.visibility%20%3D%20%22visible%22%3B%20this.iFrameDiv.style.display%20%3D%20%22block%22%3B%20this.updatePos%28%29%3B%7D%20%20%20%09%09%0A%20%20%20%09this.scroll%3Dfunction%28%29%20%7B%20this.updatePos%28%29%3B%7D%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22new%20LeoHighlightsPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsSetSize%28size%2CclickId%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20appropriate%20sizes%20*/%0A%20%20%09%09var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_ID%29%3B%0A%20%20%09%09var%20iFrameDiv%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Figure%20out%20the%20correct%20sizes%20*/%0A%20%20%09%09var%20iFrameSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_IFRAME_CLICK_SIZE%3ALEO_HIGHLIGHTS_IFRAME_HOVER_SIZE%3B%0A%20%20%09%09var%20divSize%3D%28size%3D%3D1%29?LEO_HIGHLIGHTS_DIV_CLICK_SIZE%3ALEO_HIGHLIGHTS_DIV_HOVER_SIZE%3B%0A%0A%20%20%09%09/*%20Refresh%20the%20iFrame%27s%20url%2C%20by%20removing%20the%20size%20arg%20and%20adding%20it%20again%20*/%0A%20%20%09%09var%20url%3DiFrame.src%3B%0A%20%20%09%09var%20idx%3Durl.indexOf%28%22%26size%3D%22%29%3B%0A%20%20%09%09if%28idx%3E%3D0%29%0A%20%20%09%09%09url%3Durl.substring%280%2Cidx%29%3B%0A%09%09url+%3D%28%22%26size%3D%22+size%29%3B%0A%09%09if%28clickId%29%0A%09%09%09url+%3D%28%22%26clickId%3D%22+clickId%29%3B%0A%09%09%0A%20%20%09%09iFrame.src%3Durl%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Clear%20the%20hover%20flag%2C%20if%20the%20user%20shows%20this%20at%20full%20size%20*/%0A%20%20%09%09if%28size%3D%3D1%26%26_leoHighlightsPrevElem%29%0A%20%20%09%09%09_leoHighlightsPrevElem.hover%3Dfalse%3B%0A%20%20%09%09%0A%20%20%09%09_leoHighlightsSetSize%28iFrame%2CiFrameSize%29%3B%0A%20%20%09%09_leoHighlightsSetSize%28iFrameDiv%2CdivSize%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsSetSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20Start%20the%20popup%20a%20little%20bit%20delayed.%0A%20*%20Somehow%20IE%20needs%20some%20time%20to%20find%20the%20element%20by%20id.%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@param%20size%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsShowPopup%28anchorId%2Csize%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09if%28_leoHighlightsPrevElem%26%26%28_leoHighlightsPrevElem%21%3Delem%29%29%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09elem.shown%3Dtrue%3B%0A%09%09_leoHighlightsPrevElem%3Delem%3B%0A%20%20%20%09%0A%20%20%20%09/*%20FF%20needs%20to%20find%20the%20element%20first%20*/%0A%20%20%20%09_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%20%09%0A%20%20%20%09setTimeout%28%22_leoHighlightsShowPopup%28%5C%27%22+anchorId+%22%5C%27%2C%5C%27%22+size+%22%5C%27%29%3B%22%2C10%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsShowPopup%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe%0A*%0A*%20@param%20id%0A*%20@return%0A*/%0Afunction%20leoHighlightsHideElem%28id%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Get%20the%20appropriate%20sizes%20*/%0A%20%20%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%20%20%09%09if%28elem%29%0A%20%20%09%09%09elem.style.visibility%3D%22hidden%22%3B%0A%20%20%09%09%0A%20%20%09%09/*%20Clear%20the%20page%20for%20the%20next%20run%20through%20*/%0A%20%20%09%09var%20iFrame%3D_leoHighlightsFindElementById%28LEO_HIGHLIGHTS_IFRAME_ID%29%3B%0A%20%20%09%09if%28iFrame%29%0A%20%20%09%09%09iFrame.src%3D%22about%3Ablank%22%3B%0A%20%20%09%09%0A%20%20%09%09%0A%20%20%09%09if%28_leoHighlightsPrevElem%29%0A%20%20%09%09%7B%0A%20%20%09%09%09_leoHighlightsPrevElem.shown%3Dfalse%3B%0A%20%20%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%20%20%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHideElem%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A*%0A*%20This%20can%20be%20used%20to%20close%20an%20iframe.%0A*%20Since%20the%20iFrame%20is%20reused%20the%20frame%20only%20gets%20hidden%0A*%0A*%20@return%0A*/%0Afunction%20leoHighlightsIFrameClose%28%29%0A%7B%0A%20%20try%0A%20%20%7B%0A%09%20%20_leoHighlightsSimpleGwCallBack%28%22LeoHighlightsHideIFrame%22%29%3B%0A%20%20%7D%0A%20%20catch%28e%29%0A%20%20%7B%0A%09%20%20_leoHighlightsReportExeception%28%22leoHighlightsIFrameClose%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20should%20handle%20the%20click%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleClick%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dfalse%3B%0A%20%20%09%09if%28anchor.startTimer%29%0A%20%20%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%20%20%20%09%0A%20%20%09%09leoHighlightsEvent%28%22clicked%22%29%3B%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C1%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleClick%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20should%20handle%20the%20hover%20events%0A%20*%20%0A%20*%20@param%20anchorId%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleHover%28anchorId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%09%09var%20anchor%3D_leoHighlightsFindElementById%28anchorId%29%3B%0A%20%20%09%09anchor.hover%3Dtrue%3B%0A%20%20%09%09%0A%20%20%09%09leoHighlightsEvent%28%22hovered%22%29%3B%0A%20%20%20%09leoHighlightsShowPopup%28anchorId%2C0%29%3B%0A%20%20%20%09return%20false%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlightsHandleHover%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%09%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOver%28id%29%0A%7B%0A%09try%0A%09%7B%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%09%09%0A%0A%09%09/*%20Clear%20the%20end%20timer%20if%20required%20*/%0A%09%09if%28anchor.endTimer%29%0A%09%09%09clearTimeout%28anchor.endTimer%29%3B%0A%09%09anchor.endTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_HOVER%3B%0A%09%09%0A%09%09/*%20The%20element%20is%20already%20showing%20we%20are%20done%20*/%0A%09%09if%28anchor.shown%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.startTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHandleHover%28anchor.id%29%3B%0A%09%09%09anchor.hover%3Dtrue%3B%0A%09%09%09%7D%2C%0A%09%09%09LEO_HIGHLIGHTS_SHOW_DELAY_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20handle%20the%20mouse%20over%20setup%20timers%20for%20the%20appropriate%20timers%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleMouseOut%28id%29%0A%7B%0A%09try%0A%09%7B%09%0A%09%09var%20anchor%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%0A%09%09/*%20Clear%20the%20start%20timer%20if%20required%20*/%0A%09%09if%28anchor.startTimer%29%0A%09%09%09clearTimeout%28anchor.startTimer%29%3B%0A%09%09anchor.startTimer%3Dnull%3B%0A%09%09%0A%09%09anchor.style.background%3DLEO_HIGHLIGHTS_BACKGROUND_STYLE_DEFAULT%3B%0A%09%09if%28%21anchor.shown||%21anchor.hover%29%0A%09%09%09return%3B%0A%09%09%0A%09%09/*%20Setup%20the%20start%20timer%20if%20required%20*/%0A%09%09anchor.endTimer%3DsetTimeout%28function%28%29%7B%0A%09%09%09leoHighlightsHideElem%28LEO_HIGHLIGHTS_IFRAME_DIV_ID%29%3B%0A%09%09%09anchor.shown%3Dfalse%3B%0A%09%09%09_leoHighlightsPrevElem%3Dnull%3B%0A%09%09%09%7D%2CLEO_HIGHLIGHTS_HIDE_DELAY_MS%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOver%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%26%26_leoHighlightsPrevElem.endTimer%29%0A%09%09%09clearTimeout%28_leoHighlightsPrevElem.endTimer%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOver%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0A/**%0A%20*%20This%20handles%20the%20mouse%20movement%20into%20the%20currently%20opened%20window.%0A%20*%20Just%20clear%20the%20close%20timer%0A%20*%20%0A%20*%20@param%20id%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsHandleIFrameMouseOut%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09if%28_leoHighlightsPrevElem%29%0A%09%09%09leoHighlightsHandleMouseOut%28_leoHighlightsPrevElem.id%29%3B%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsHandleIFrameMouseOut%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A/**%0A%20*%20This%20is%20a%20method%20is%20used%20to%20make%20the%20javascript%20within%20IE%20runnable%0A%20*/%0Avar%20leoHighlightsRanUpdateDivs%3Dfalse%3B%0Afunction%20leoHighlightsUpdateDivs%28%29%0A%7B%0A%09try%0A%09%7B%0A%09%09/*%20Check%20if%20this%20is%20an%20IE%20browser%20and%20if%20divs%20have%20been%20updated%20already%20*/%0A%09%09if%28document.all%26%26%21leoHighlightsRanUpdateDivs%29%0A%09%09%7B%0A%09%09%09leoHighlightsRanUpdateDivs%3Dtrue%3B%20//%20Set%20early%20to%20prevent%20running%20twice%0A%09%09%09for%28var%20i%3D0%3Bi%3CLEO_HIGHLIGHTS_MAX_HIGHLIGHTS%3Bi++%29%0A%09%09%09%7B%0A%09%09%09%09var%20id%3D%22leoHighlights_Underline_%22+i%3B%0A%09%09%09%09var%20elem%3D_leoHighlightsFindElementById%28id%29%3B%0A%09%09%09%09if%28elem%3D%3Dnull%29%0A%09%09%09%09%09break%3B%0A%09%09%09%09%0A%09%09%09%09if%28%21elem.leoChanged%29%0A%09%09%09%09%7B%0A%09%09%09%09%09elem.leoChanged%3Dtrue%3B%0A%09%09%09%09%0A%09%09%09%09%09/*%20This%20will%20make%20javaScript%20runnable%20*/%09%09%09%09%0A%09%09%09%09%09elem.outerHTML%3Delem.outerHTML%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%09catch%28e%29%0A%09%7B%0A%09%09_leoHighlightsReportExeception%28%22leoHighlightsUpdateDivs%28%29%22%2Ce%29%3B%20%20%20%09%0A%09%7D%0A%7D%0A%0Aif%28document.all%29%0A%09setTimeout%28leoHighlightsUpdateDivs%2C200%29%3B%0A%0A/**%0A%20*%20This%20is%20used%20to%20report%20events%20to%20the%20plugin%0A%20*%20@param%20key%0A%20*%20@param%20sub%0A%20*%20@return%0A%20*/%0Afunction%20leoHighlightsEvent%28key%2C%20sub%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22key%22%2C%20key%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22sub%22%2C%20sub%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsEvent%22%29%3B%09%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHighlights%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/*———————————————————————-*/%0A/*%20Methods%20provided%20to%20the%20highlight%20providers…%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20*/%0A/*———————————————————————-*/%0A%0A/**%0A%20*%20This%20will%20redirect%20the%20top%20window%20to%20the%20passed%20in%20url%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20@return%0A%20*/%0Afunction%20leoHL_RedirectTop%28url%2CparentId%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%09%09leoHighlightsEvent%28%22clicked.2eBay%22%29%3B%0A%20%20%20%09_leoHighlightsRedirectTop%28url%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHL_RedirectTop%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A%0A/**%0A%20*%20This%20will%20set%20the%20size%20of%20the%20iframe%0A%20*%20%0A%20*%20@param%20url%0A%20*%20@param%20parentId%0A%20*%20%0A%20*%20@return%0A%20*/%0Afunction%20leoHl_setSize%28size%2Curl%29%0A%7B%0A%20%20%20try%0A%20%20%20%7B%0A%20%20%20%09/*%20Get%20the%20clickId%20*/%0A%20%20%20%09var%20clickId%3D_leoHighlightsGetUrlArg%28%20url%2C%22clickId%22%29%0A%20%20%20%09%0A%20%20%20%20%20%20var%20gwObj%20%3D%20new%20Gateway%28%29%3B%0A%20%20%20%20%20%20gwObj.addParam%28%22size%22%2Csize%29%3B%0A%20%20%20%20%20%20if%28clickId%29%0A%20%20%20%20%20%20%20%20%20gwObj.addParam%28%22clickId%22%2CclickId+%22_blah%22%29%3B%0A%20%20%20%20%20%20gwObj.callName%28%22LeoHighlightsSetSize%22%29%3B%0A%20%20%20%7D%0A%20%20%20catch%28e%29%0A%20%20%20%7B%0A%20%20%20%09_leoHighlightsReportExeception%28%22leoHl_setSize%28%29%22%2Ce%29%3B%20%20%20%09%0A%20%20%20%7D%0A%7D%0A\”);

Air Passenger Security: Tradeoffs in the Decade after 9 /11

K. Jack Riley of RAND has been thinking over the time and cost tradeoffs of airline passenger security. A short overview is here; a chapter-length discussion can be found in the RAND book, The Long Shadow of 9/11: America’s Response to Terrorism, which can be read as an e-book here. Riley points out how the costs of air security could be reduced–and how doing so could save hundreds or thousands of American lives each year by encouraging people to fly rather than drive. Here are a few excerpts (with footnotes deleted) from the book chapter:

The overall safety of air travel since 9/11:
\”In the ten years since 9/11, about 6 billion enplanements (instances of passengers boarding a commercial plane) have occurred in the United States, and perhaps an additional 14 billion have occurred worldwide. Among those 20 billion passengers, according to the Aviation Safety Network, 7,019 died in aviation accidents between 2001 and 2009. In addition, roughly 200 more have died on airplanes or at airports as a result of terrorism since 9/11…. And since 9/11, no passengers have died in terrorist acts from enplanements originating in the United States. In short, despite the tragedy and loss of life on 9/11, air transportation is overwhelmingly a secure means of transportation, especially in the United States. At least three factors contribute substantially to the improved security since 9/11. First, and perhaps most importantly, passengers know now that they must be vigilant. … Second, airlines have reinforced cockpit doors in a way that strictly limits access to the cockpit. Most crews have also modified their procedures to ensure that there is a barrier between the cockpit door and
the passengers when the cockpit door needs to be opened. … Third, changes to the visa approval process represent a relatively unheralded but important contribution to air transportation security.
All 19 of the terrorists involved in the 9/11 attacks were in the United States on legitimate visas.\”
What about inspecting air cargo and TSA employees?
\”Until recently, though, the starkest contrast of all to the treatment of U.S. airline passengers was the treatment of U.S. commercial cargo on those same flights boarded by the passengers. It was not
until August 2010 that all of the commercial cargo loaded onto domestic passenger planes was scanned or searched. Shipments on cargo jets from international destinations are not all currently screened, although the date for implementing the plan for screening them has been moved
up from 2013 to 2011. Another departure from the “inspect everyone and everything” approach involves TSA’s own workforce at the airports. TSA employees are not screened when they enter the secure area of an airport throughout the course of the day, because they are trusted employees who have had a background check. They are thought to be at particularly low risk for coercion or conversion to radicalism. At many airports, certain other employees also have all-access badges that allow them to bypass security. Thus, what is considered the “sterile area” of the airport is in fact
not sterile. Substantial volumes of people (and, until recently, cargo) have made it into the sterile area without inspection. There have been no terrorist incidents associated with these leakages, however, suggesting that the cargo and employee risks have been appropriately managed for years (even before full cargo screening began) and begging the question of what kinds of risk management improvements might be available for passengers.\”

The case for scaling back security checks for planes originating in the United States:
\”There is very little reason to be concerned about suicide bombers being present on flights originating in the United States. The security improvements noted above—passenger vigilance, cockpit security, and visa screening—go a long way toward preventing radical jihadists from entering the country or, having entered, from being able to commandeer a plane to conduct a spectacular attack. Moreover, the radical threat resident in and willing to conduct a suicide attack on the United States is extremely small. … Recognizing the security of flights originating in the United States and thus returning all passengers to the domestic procedures that existed before the recent additions would save, at minimum, about $1.2 billion annually. … It would also reduce the deadweight losses that domestic travelers incur from arriving at airports early, waiting in lines, and undergoing intensive scrutiny.\”

The case for a \”trusted traveller\” program:
\”The current security regime applies the same procedures to all 700 million passengers who board planes each year in the United States. That we have not developed a reasonable way to reduce that inspection workload is perhaps the biggest missed opportunity of the past decade. A trusted traveler program could be configured in a variety of ways. Recent conversations with airline industry executives suggest that a very small fraction of fliers account for a very large proportion of trips. In all likelihood, then, a trusted traveler program could be relatively small (with 5 million enrollees or less) and could still provide significant benefits. No program will be bulletproof, but such a program does not need to be given the extremely low odds of encountering a suicide terrorist on a flight originating in the United States. A trusted  traveler program could initially be organized around these characteristics or combinations of characteristics:
• Possession of a security clearance issued by a U.S. government agency. …
• A profile that involves frequent travel. An individual traveling
100,000 miles per year is, conservatively, spending 200 hours on airplanes a year. That is 10 percent of a standard 2,000-hour work year, suggesting that such travelers can be trusted with the basic screening that was in place prior to the deployment of WBI [whole body image] machines and pat-downs. …
• Willingness to submit to the equivalent of a security-clearance process. Some travelers would find it well worth the time and expense to obtain such a credential in exchange for the ability to move
through an airport more quickly. Several programs, including Global Entry, NEXUS, and SENTRI, already allow certain travelers to be pre-approved for expedited clearance for entry at U.S. borders. Global Entry members pay a fee, undergo an interview and background check, and provide fingerprints as part of seeking approval. SENTRI and NEXUS operate in a similar fashion at Mexican and Canadian ports of entry, respectively. The combined programs cover hundreds of thousands of frequent travelers. The marginal costs of implementing this approach would be relatively low, since more than a million travelers have already paid for these entry/exit credentials. Extending the privileges of these programs from entry into the United States to security at U.S.airports would be a relatively trivial and easily justified action.\”

The opportunity cost of not taking such measures is measured in preventable deaths: 
\”Researchers have estimated that the 9/11 attacks generated nearly 2,200 additional road traffic deaths in the United States through mid-2003 from a relative increase in driving and reduction in flying resulting from fear of additional terrorist attacks and associated reductions in the convenience of flying.20 If the new security measures are generating similar, or even smaller, substitutions and the driving risk has grown as hypothesized, the new methods could be contributing to more deaths  annually on U.S. roads than have been experienced cumulatively since 9/11 from terrorism against air transportation targets around the world.\”

I Want to Be Your Weak Tie

\”I want to be your weak tie.\” Sounds like a country music classic! But after posting at this blog for a little over three months now, I think it answers that question which sometimes came up on long-ago teenage dates: \”What do you want to be with me?\” As the academic year gets underway, it\’s perhaps worth saying what I hope to accomplish by doing this blog.

\”Weak ties,\” of course, refers to a classic paper by Mark Granovetter called \”The Strength of Weak Ties,\” published in May 1973 issue of the American Journal of Sociology and available at Granovetter\’s website. The original paper is only modestly technical, but for a quick summary of the argument, I\’ll offer Granovetter\’s own explanation in a 1983 paper in Sociological Theory, \”The Strength of Weak Ties: A Network Theory Revisited.\” Granovetter writes (parenthetical citations omitted):   

\”The overall social structural picture suggested by this argument can be seen by considering the situation of some arbitrarily selected individual-call him Ego. Ego will have a collection of close friends, most of whom are in touch with one another-a densely knit clump of social structure. Moreover, Ego will have a collection of acquaintances, few of whom know one another. Each of these acquaintances, however, is likely to have close friends in his own right and therefore to be enmeshed in a closely knit clump of social structure, but one different from Ego\’s. The weak tie between Ego and his acquaintance, therefore, becomes not merely a trivial acquaintance tie but rather a crucial bridge between the two densely knit clumps of close friends. To the
extent that the assertion of the previous paragraph is correct, these clumps would not, in fact, be connected to one another at all were it not for the existence of weak ties.

It follows, then, that individuals with few weak ties will be deprived of information from distant parts of the social system and will be confined to the provincial news and views of their close friends. This deprivation will not only insulate them from the latest ideas and fashions but may put them in a disadvantaged position in the labor market, where advancement can depend, as I have documented elsewhere (1974), on knowing about appropriate job openings at just the right time. Furthermore, such individuals may be difficult to organize or integrate into political movements of any kind, since membership in movements or goal-oriented organizations typically results from being recruited by friends. While members of one or two cliques may be efficiently recruited, the problem is that, without weak ties, any momentum generated in this way does not spread beyond the clique. As a result, most of the population will be untouched.

The macroscopic side of this communications argument is that social systems lacking in weak ties will be fragmented and incoherent. New ideas will spread slowly, scientific endeavors will be handicapped, and subgroups separated by race, ethnicity, geography, or other characteristics will have difficulty reaching a modus vivendi.\”

I\’m hoping that this blog will be a weak tie for a number of readers: that is, it will offer connections and information that are outside your usual network, and thus potentially more valuable. This blog is mostly a reaction to the question that might arise if you and I worked down the hall from each other, and on the way over to lunch or to pick up the mail, you asked me: \”Read any interesting comments or seen any interesting figures and tables lately?\”  In the blog, I\’ll typically mention an essay or report I\’ve seen, link to it, maybe quote a paragraph or two, and maybe put up a few figures or tables that seem interesting to me (in jpeg format, so they are easy to copy over to your own powerpoints if you wish). Sometimes I\’ll add a few thoughts of my own; sometimes not.

As I explain in the FAQ page on this website, I will try to serve as a bridge between what the philosopher David Hume labeled as the \”learned\” and the \”conversable\” world. In Hume\’s words, I will \”consider myself as a kind of resident or ambassador from the dominions of learning to those of conversation, and shall think it my constant duty to promote a good correspondence betwixt these two states, which have so great a dependence on each other.” I will avoid questions like: \”Have any opinions about what\’s in the headlines today?\” or \”Why is everyone who disagrees with me a big fat idiot?\” or \”What\’s my personal philosophy of life?\”

I\’m clearly not trying to be anyone\’s one-stop shop for economic news. I\’m only planning to post on work-days, and usually only once a day. In part, my goal with this blog is just to create a  system for myself of storing and categorizing the articles I run across so that I can find them again when I want them! But I also  hope  to build up a collection of information and figures and readings that may serve broader uses.  I hope that this note may encourage some readers new to the blog to surf back through postings over the past three months, because if you\’re interested in economics, almost every one of these posts is a potential port of entry to a broader subject area.

Bruce Yandle on environmental economics

David A. Price of the Richmond Fed has an interview with Bruce Yandle.

On the difference between a “systems approach” and a “process approach” to environmental policy issues: 
\”A systems approach is where the “brightest and best” get together and look at a problem and come up with
what they believe to be the best solution. They describe the system that can be installed that will lead to a solution of the problem and so it tends to be top-down.  In a process approach, you identify goals and outcomes, develop some rules of the game, and then let the process take hold, holding accountability with respect to outcome. You don’t tell people how to do things; you say this is the outcome that must be achieved, or it’s going to be costly for you.\”

On problems of transactions costs:
\”Transaction costs are large under either approach. The transaction costs are high in a technology-based

systems approach on the input side. The difficulty is no one is keeping score on the output side and we literally
have rivers that come close to dying, even though every discharger is meeting the requirements of the law. So you have a community of legal polluters killing a river. You can say we saved a lot of transaction costs. Well, I would say, “But you didn’t save the river!” Should we be concerned with transaction costs or outcomes? You do have a trade-off there.  I looked at the level of litigation under common law and statute law. We looked at the amount of litigation in the post-1970 world and the pre-1970 world and it looks like you get about the same amount of litigation with the statutes as you do at common law. It’s not an apples-to-apples comparison because all we’re looking at are counts of cases that are brought. Statute law generates a huge amount of litigation, and litigation costs are transaction costs in a way. That’s an important consideration, but I think the more important consideration is outcomes, and then to look, in some way, at the costs.\”

The start of the \”environmental saga\”:
\”From 1970 through last year, we had 2.5 million pages of the Federal Register published during that period; from 1940 to 1970, about 350,000. What I call the environmental saga begins in the United States in about
1970 and that’s when the world changes dramatically.\”

On  \”bootlegger and Baptist\” coalitions: 

\”That was the story of two groups who favor restrictions on the sale of alcoholic beverages on Sunday. The Baptists take the moral high ground; they would like to see a diminution in the consumption of alcoholic beverages. The bootlegger just wants to get rid of competition one day a week. I called it bootlegger and Baptists  for alliterative purposes. It could  have been called “bootlegger and Methodists” and you would have the same story. … I was working on the White House staff reviewing newly proposed regulations during the end of the Ford administration and the first part of the Carter administration, in a unit of the Council on Wage and Price Stability. My beat was the EPA. I reviewed the copper smelter standards. I would get their big regulatory bundles and review them, and we would make comments in an attempt to try to reduce the cost of accomplishing the goal. EPA had an excellent economic analysis. The last section said when this regulation becomes final, there will never be another copper smelter built in the United States of America. How would you feel if you had a copper smelter? You’d just been told you will never have any new competition.\”

For a short and readable recent article by Yandle, see my post of July 1 on \”The Accumulation of Regulations.\”

Optimism in a Terrible Economy from John Maynard Keynes

In 1930, John Maynard Keynes wrote a remarkable little essay called \”Economic Possibilities for our Grandchildren.\” Stock markets have collapsed all over the world, but amidst the opening blasts of the Great Depression, Keynes dared to offered an optimistic view of where the standard of living was headed over time. The full essay, which is short and readable, is available here and there on the web. As the U.S. economy staggers through a time when recession technically ended in June 2009, but robust growth is nowhere in sight, it\’s intriguing to look at some snippets of his essay, and consider the modern echoes.
Here\’s Keynes:

\”We are suffering just now from a bad attack of economic pessimism. It is common to hear people say that the epoch of enormous economic progress which characterised the nineteenth century is over; that the rapid improvement in the standard of life is now going to slow down –at any rate in Great Britain; that a decline in prosperity is more likely than an improvement in the decade which lies ahead of us.

I believe that this is a wildly mistaken interpretation of what is happening to us. We are suffering, not from the rheumatics of old age, but from the growing-pains of over-rapid changes, from the painfulness of readjustment between one economic period and another. The increase of technical efficiency has been taking place faster than we can deal with the problem of labour absorption; the improvement in the standard of life has been a little too quick…

At the same time technical improvements in manufacture and transport have been proceeding at a greater rate in the last ten years than ever before in history. In the United States factory output per head was 40 per cent greater in 1925 than in 1919. In Europe we are held back by temporary obstacles, but even so it is safe to say that technical efficiency is increasing by more than 1 per cent per annum compound. …

For the moment the very rapidity of these changes is hurting us and bringing difficult problems to solve. Those countries are suffering relatively which are not in the vanguard of progress. We are being afflicted with a new disease of which some readers may not yet have heard the name, but of which they will hear a great deal in the years to come–namely, technological unemployment. This means unemployment due to our discovery of means of economising the use of labour outrunning the pace at which we can find new uses for labour.

But this is only a temporary phase of maladjustment. All this means in the long run that mankind is solving its economic problem. I would predict that the standard of life in progressive countries one hundred years hence will be between four and eight times as high as it is to-day. There would be nothing surprising in this even in the light of our present knowledge. It would not be foolish to contemplate the possibility of afar greater progress still.\”

Of course, no economic moment is precisely the same as any other economic moment, but Keynes\’ perspective is worth reflecting on today. Of course, his essay was not about short-term economic optimism. Things can and often do get worse before they get better. He is writing about the long run.

To some, a prediction that the standard of life will be four to eight times as high in 100 years may seem foolhardy. But remember the arithmetic of compound growth. The old rule-of-thumb is that if you want to know how many years it will take something to double, take 72 and divide by the annual growth rate. Thus, if you have $100 and can get an 8% rate of return, your money will double in (roughly) 72/8=9 years.

If the standard of living grows at 2% per year on average over time, then it will double in 36 years, quadruple in 72 years, and octuple in 108 years–about eight-fold growth in a century. If the standard of living grows at 1.5% per year, then it will double in 72/1.5=48 years, and will roughly quadruple in a century. Thus, Keynes prediction in 1930, in the teeth of the Great Depression, was nonetheless for a long-run growth rate of 1.5-2% per year. It\’s a reasonable prediction for 2011, in the teeth of the Long Slump that has followed the Great Recession, as well.

The Origins of Labor Day

It\’s clear that the first Labor Day celebration was held on Tuesday, September 5, 1882, and organized by the Central Labor Union, an early trade union organization operating in the greater New York City area in the 1880s. By the early 1890s, more than 20 states had adopted the holiday. On June 28, 1894, President Grover Cleveland signed into law: \’\’The first Monday of  September in each year, being the day celebrated and known as Labor\’s Holiday, is hereby made a legal public holiday, to all intents and purposes,  in the same manner as Christmas, the first day of January, the twenty-second day of February, the thirtieth day of May, and the fourth day of July are now made by law public holidays.\” 

What is less well-known, at least to me, is that the very first Labor Day parade almost didn\’t happen, and that historians now dispute which person is most responsible for that first Labor Day.

U.S. Department of Labor tells how first Labor Day almost didn\’t happen, for lack of a band: 

\”On the morning of September 5, 1882, a crowd of spectators filled the sidewalks of lower Manhattan near city hall and along Broadway. They had come early, well before the Labor Day Parade marchers, to claim the best vantage points from which to view the first Labor Day Parade. A newspaper account of the day described \”…men on horseback, men wearing regalia, men with society aprons, and men with flags, musical instruments, badges, and all the other paraphernalia of a procession.\”

The police, wary that a riot would break out, were out in force that morning as well. By 9 a.m., columns of police and club-wielding officers on horseback surrounded city hall.

By 10 a.m., the Grand Marshall of the parade, William McCabe, his aides and their police escort were all in place for the start of the parade. There was only one problem: none of the men had moved. The few marchers that had shown up had no music.

According to McCabe, the spectators began to suggest that he give up the idea of parading, but he was determined to start on time with the few marchers that had shown up. Suddenly, Mathew Maguire of the Central Labor Union of New York (and probably the father of Labor Day) ran across the lawn and told McCabe that two hundred marchers from the Jewelers Union of Newark Two had just crossed the ferry — and they had a band!

Just after 10 a.m., the marching jewelers turned onto lower Broadway — they were playing \”When I First Put This Uniform On,\” from Patience, an opera by Gilbert and Sullivan. The police escort then took its place in the street. When the jewelers marched past McCabe and his aides, they followed in behind. Then, spectators began to join the march. Eventually there were 700 men in line in the first of three divisions of Labor Day marchers.

With all of the pieces in place, the parade marched through lower Manhattan. The New York Tribune reported that, \”The windows and roofs and even the lamp posts and awning frames were occupied by persons anxious to get a good view of the first parade in New York of workingmen of all trades united in one organization.\”

At noon, the marchers arrived at Reservoir Park, the termination point of the parade. While some returned to work, most continued on to the post-parade party at Wendel\’s Elm Park at 92nd Street and Ninth Avenue; even some unions that had not participated in the parade showed up to join in the post-parade festivities that included speeches, a picnic, an abundance of cigars and, \”Lager beer kegs… mounted in every conceivable place.\”

From 1 p.m. until 9 p.m. that night, nearly 25,000 union members and their families filled the park and celebrated the very first, and almost entirely disastrous, Labor Day.\”

As to the originator of Labor Day, the traditional story I learned back in the day gave credit to Peter McGuire, the founder of the Carpenters Union and a co-founder of the American Federation of Labor. At a meeting of the Central Labor Union of New York on May 8, 1882, the story went, he recommended that Labor Day be designated to honor \”those who from rude nature have delved and carved all the grandeur we behold.\” McGuire also typically received credit for suggesting the first Monday in September for the holiday, \”as it would come at the most pleasant season of the year, nearly midway between the Fourth of July and Thanksgiving, and would fill a wide gap in the chronology of legal holidays.\” He envisioned that the day would begin with a parade, \”which would publicly show the strength and esprit de corps of the trade and labor organizations,\” and then continue with \”a picnic or festival in some grove.

But in recent years, the International Association of Machinists have also staked their claim, because one of their members named Matthew Maguire, a machinist, was serving as secretary of the Central Labor Union in New York in 1882 and who clearly played a major role in organizing the day. The U.S. Department of Labor has a quick summary of the controversy.

 \”According to the New Jersey Historical Society, after President Cleveland signed into law the creation of a national Labor Day, The Paterson (N.J.) Morning Call published an opinion piece entitled, \”Honor to Whom Honor is Due,\” which stated that \”the souvenir pen should go to Alderman Matthew Maguire of this city, who is the undisputed author of Labor Day as a holiday.\” This editorial also referred to Maguire as the \”Father of the Labor Day holiday. …

According to The First Labor Day Parade, by Ted Watts, Maguire held some political beliefs that were considered fairly radical for the day and also for Samuel Gompers and his American Federation of Labor. Allegedly, Gompers did not want Labor Day to become associated with the sort of \”radical\” politics of Matthew Maguire, so in a 1897 interview, Gompers\’ close friend Peter J. McGuire was assigned the credit for the origination of Labor Day.\”