//carousel.js - see ../carousel.js for a non-compressed version of this file
//include "jsdebug=true" in the query string of the calling page to 
//include the non-compressed version of this document for debugging
if(!dbugScripts("http://c18-x-publish1.cnet.com:8100/html/js/ne/",["storypage_100106_uncompressed.js"])){

var relPanes=[];relPanes.push("bigPic");relPanes.push("relatedStories");relPanes.push("whatsHot");relPanes.push("latestHeds");function changePaneDisplay(paneID){$A($('contextContent').childNodes).each(function(aNode){if(aNode.id){if(aNode.id==paneID)$(aNode).show();else $(aNode).hide()}});$A($('contextHeader').getElements('a')).each(function(aNode){if(aNode.id==paneID+'Tab')$(aNode).addClassName('selected');else $(aNode).removeClassName('selected')})};function revealPane(paneID,opts){paneID=paneID.replace('Tab','');Cookie.set('contextPane',paneID,31);opts=(opts)?opts:{};var track=new Image();track.src="http://dw.com.com/redir?destUrl=http%3A%2F%2Fwww%2Ecnet%2Ecom%2Fi%2Fb%2Egif&edId=3&siteId=3&oId=&ontId=&lop=ne.st."+paneID+"."+((opts.loadMethod)?opts.loadMethod:'click');if($(paneID)){changePaneDisplay(paneID)}else{var url;var initCode=false;var newPane=document.createElement('DIV');newPane.id=paneID;$(newPane).hide();$('contextContent').appendChild(newPane);switch(paneID){case'whatsHot':url='/5910-1_3-0.html';initCode=function(){setUpMap();if(Cookie.get('whatshot'))changeHotView(Cookie.get('whatshot'));else changeHotView('Graphic')};break;case'latestHeds':url='/2133-12-0.html';break;case'bigPic':getBigPic(bigPicInfo);return};new ajax(url,{method:'get',update:paneID,fireNow:false,onComplete:function(){if(initCode)initCode();changePaneDisplay(paneID)},evalScripts:true}).request()}};function initContextTabs(){var selPane=(Cookie.get('contextPane'));var loadVia='cookie';if(!selPane){selPane=relPanes[Math.floor(Math.random()*relPanes.length)];loadVia='random'}revealPane(selPane,{loadMethod:loadVia})};Event.onDOMReady(initContextTabs);function fireBigPic(opts){getBigPic(opts.assetID,opts.pageType,opts.nodeID)};function makeContextTab(id,txt){var newTab=document.createElement('A');newTab.href='javascript:void(0)';newTab.onclick=function(){revealPane(this.id)};newTab.setAttribute('id',id+'Tab');newTab.appendChild(document.createTextNode(txt));return newTab};function initContextBox(){var tabDiv=$('contextHeader');tabDiv.insertBefore(makeContextTab('bigPic','The big picture'),$('relatedStoriesTab'));tabDiv.insertBefore(makeContextTab('whatsHot',"What's hot"),$('contextTabClear'));tabDiv.insertBefore(makeContextTab('latestHeds',"Latest headlines"),$('contextTabClear'))};function moreInfoImg(){var moInfo=document.createElement("IMG");moInfo.className="moreInfoImg";moInfo.setAttribute("alt","More info");moInfo.setAttribute("src","http://i.n.com.com/i/ne05/fmwk/xpromo_arrow.gif");return moInfo};function initRelatedProds(){var cpLinks=$S('#contentPane .rpLink');var relLinks=[];cpLinks.each(function(cpLink){if((!document.all)||(document.all&&cpLink.parentNode.nodeName=="LI")){var testRel;if(testRel=cpLink.getAttribute("rel")){if(testRel.indexOf("product")==0)relLinks.push(cpLink)}}});relLinks.each(function(aLink){var parSpan=document.createElement("SPAN");parSpan.className="relProd";aLink.parentNode.insertBefore(parSpan,aLink);parSpan.appendChild(aLink.parentNode.removeChild(aLink));parSpan.appendChild(moreInfoImg());parSpan.onmouseover=function(){showProdInfo(this)};parSpan.onmouseout=function(){this.removeClassName('show');$E('.moreInfoImg',this).setAttribute("src","http://i.n.com.com/i/ne05/fmwk/xpromo_arrow.gif")}})};function showProdInfo(parSpan){parSpan=$(parSpan);if(!parSpan.hasClassName('populated')){var prodLink=$E('.rpLink',parSpan);var idRE=/[0-9]+/;var conDiv=document.createElement("DIV");conDiv.className="rpContent";conDiv.style.top=(prodLink.offsetTop+prodLink.offsetHeight)+"px";conDiv.style.left="75px";conDiv.style.position="absolute";parSpan.appendChild(conDiv);var prodID=idRE.exec(prodLink.getAttribute("rel"));new ajax('/2900-12-'+prodID+'.html',{method:'get',fireNow:false,update:conDiv}).request();parSpan.addClassName('populated')}parSpan.addClassName('show');$E('.moreInfoImg',parSpan).setAttribute("src","http://i.n.com.com/i/ne05/fmwk/xpromo_arrow_hover.gif")};Event.onDOMReady(initRelatedProds);

}
