var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); // $Id: main.js.php,v 1.9 2010/12/16 21:27:17 udaya Exp $ var cnnLockToggle = false; function CNN_getCookies() { var hash = new Array; if ( document.cookie ) { var cookies = document.cookie.split( '; ' ); for ( var i = 0; i < cookies.length; i++ ) { var namevaluePairs = cookies[i].split( '=' ); hash[namevaluePairs[0]] = unescape( namevaluePairs[1] ) || null; } } return hash; } function CNN_parseCookieData( cookieDataString ) { var cookieValues = new Object(); var separatePairs = cookieDataString.split( '&' ); for ( var i = 0; i < separatePairs.length; i++ ) { var separateValues = separatePairs[i].split( ':' ); cookieValues[separateValues[0]] = separateValues[1] || null; } return cookieValues; } function CNN_setCookie( name, value, hours, path, domain, secure ) { var numHours = 0; if ( hours) { if ( (typeof(hours) == 'string') && Date.parse(hours) ) { // already a Date string numHours = hours; } else if ( typeof(hours) == 'number' ) { // calculate Date from number of hours numHours = ( new Date((new Date()).getTime() + hours*3600000) ).toGMTString(); } } document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure === true))?'; secure':''); // Set the cookie, adding any parameters that were specified. } function CNN_removeCookie( name, path, domain ) { var allCookies = CNN_getCookies(); var theValue = allCookies[ name ] || null; // We need the value to kill the cookie if ( theValue ) { document.cookie = name + '=' + escape(theValue) + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:''); // set an already-expired cookie } } var allCookies = CNN_getCookies(); var cnnDomainArray = location.hostname.split( '.' ); var cnnCurrDomain = ( cnnDomainArray.length > 1 ) ? '.' + cnnDomainArray[cnnDomainArray.length-2] + '.' + cnnDomainArray[cnnDomainArray.length-1] : ''; function cnnRenderT1TimeStamp(date) { var cnnStoryPublishTime = (date) ? new Date(date) : cnnCurrTime; var cnnTimeStampString; var cnnTimeStampDiff = cnnCurrTime.getTime() - cnnStoryPublishTime.getTime(); var daysDifference = Math.floor(cnnTimeStampDiff/1000/60/60/24); cnnTimeStampDiff -= daysDifference*1000*60*60*24; var hoursDifference = Math.floor(cnnTimeStampDiff/1000/60/60); cnnTimeStampDiff -= hoursDifference*1000*60*60; var minutesDifference = Math.floor(cnnTimeStampDiff/1000/60); cnnTimeStampDiff -= minutesDifference*1000*60; var secondsDifference = Math.floor(cnnTimeStampDiff/1000); var cnnDays = (daysDifference > 1) ? "days" : "day"; var cnnHours = (hoursDifference > 1) ? "hours" : "hour"; var cnnMinutes = (minutesDifference > 1) ? "minutes" : "minute"; var cnnSeconds = (secondsDifference > 1) ? "seconds" : "second"; cnnTimeStampString = 'updated '; if(hoursDifference < 1 && minutesDifference > 0){ cnnTimeStampString += minutesDifference + " "+cnnMinutes+" ago"; } else if(hoursDifference < 1 && minutesDifference < 1) { cnnTimeStampString += secondsDifference + " "+cnnSeconds+" ago"; } else if(hoursDifference >= 1) { return ""; } return cnnTimeStampString; } /* cnn live video popup ===================================================================== */ function cnnLiveVideo( strWhich ) { if(!strWhich) { strWhich = '1'; } var strVidLoc = '/video/live/live.html?stream=stream' + strWhich; if(html5Check) { strVidLoc = '/video/flashLive/live.ipad_nf.html'; } CNN_openPopup(strVidLoc,'liveplayer','scrollbars=yes,resizable=yes,width=672,height=540'); } /* end cnn live video popup ===================================================================== */ function CNN_openPopup( url, name, widgets, openerUrl ) { var host = location.hostname; if (window == top) { window.top.name = "opener"; } var popupWin = window.open( url, name, widgets ); if(popupWin) {cnnHasOpenPopup = 1;} if ( popupWin && popupWin.opener ) { if ( openerUrl ) { popupWin.opener.location = openerUrl; } } if ( popupWin) { popupWin.focus(); } } /* toggle function for advanced search ========================================================================= */ function cnnToggleUGC(el,lnk) { if (cnnLockToggle) { return; } cnnLockToggle = true; var cnnToggleClass = (lnk.parentNode.className.indexOf('Closed') > -1) ? true : false; Effect.toggle(el,'blind', { beforeStart:function(obj) { try { lnk.blur(); } catch(e) {}; if (cnnToggleClass) { switch(lnk.parentNode.className) { case 'cnnOpinionClosed': lnk.parentNode.className = 'cnnOpinion'; break; case 'cnnIReportClosed': lnk.parentNode.className = 'cnnIReport'; break; case 'cnnBlogsClosed': lnk.parentNode.className = 'cnnBlogs'; Sphere.Widget.search(); break; default: } } }, afterFinish:function(obj) { if (!cnnToggleClass) { switch(lnk.parentNode.className) { case 'cnnOpinion': lnk.parentNode.className = 'cnnOpinionClosed'; break; case 'cnnIReport': lnk.parentNode.className = 'cnnIReportClosed'; break; case 'cnnBlogs': lnk.parentNode.className = 'cnnBlogsClosed'; break; default: } } cnnLockToggle = false; } } ); } /* end toggle function for advanced search ========================================================================= */ /* cnn horizontal slider js ========================================================================= */ var cnnHorizontalSlider = (typeof Class == "object") ? Class.create() : {}; cnnHorizontalSlider.prototype = { initialize: function(objName,elContainer,elIdentifier,navContainer,displayWidth) { try { this.locked = false; this.objName = objName; this.elIdentifier = elIdentifier; this.container = elContainer; this.navDiv = navContainer; this.viewPort = displayWidth; this.sliderWidth = this.findPanels(); this.numScreens = Math.round(this.sliderWidth/2); this.negativeOffSetMax = this.setOffSet(); this.positiveOffSetMax = 0; this.currentPanel = 0; this.inactiveDot; this.activeDot; this.setSliderWidth(); this.buildNav(); this.getCurrentOffSet(); } catch(e) {} }, findPanels: function() { var panels = $(this.container).getElementsByTagName('div'); var panelCount = 0; for(var i = 0; i timeOutPointer.currOffSet) ? (finalCoord - timeOutPointer.currOffSet): (timeOutPointer.currOffSet - finalCoord) * -1; var duration = (moveByVal > 0) ? 2 * (moveByVal/timeOutPointer.viewPort) : (2 * (moveByVal/timeOutPointer.viewPort)) * -1; if(duration < 0) { duration = duration * -1; } if(timeOutPointer.currOffSet > timeOutPointer.negativeOffSetMax || timeOutPointer.currOffSet < timeOutPointer.positiveOffSetMax) { new Effect.MoveBy( $(timeOutPointer.container).id, 0, moveByVal, {duration: duration,beforeStart:function() {timeOutPointer.showImages();},afterFinish:function() {timeOutPointer.setCurrentPanel();}} ); } timeOutPointer.locked = false; },300); } } }; // Flipper T1 var CNN_T1Flipper = { // interface prev: function () {}, next: function () {}, play: function () {}, stop: function () {}, imgClick: function () {} }; var cnnT1Flipper = CNN_T1Flipper; // instance if ( typeof Class === "object" ) // check for Prototype { CNN_T1Flipper = Class.create(); CNN_T1Flipper.prototype = { initialize: function () { this.locked = false; this.panels = $$('#cnn_maint1lftf .cnn_flpprt1pnl'); this.navboxes = $$('#cnn_maint1lftf .cnn_flpprt1nvbx'); this.iterator = 0; this.timer; this.autoPlay = false; for ( var i = 1, end = this.panels.length; i < end; ++i ) { this.panels[i].hide(); } }, navigatePanel: function (dir) { var num = this.iterator; // increment/decrement iterator if ( dir === 'prev' ) { if ( num <= 0 ) { num = this.panels.size() - 1; } else { num -= 1; } } else { if ( num >= this.panels.size() -1 ) { num = 0; } else { num += 1; } } this.showPanel( num ); }, showPanel: function (num) { var self = this; if ( self.panels.size() > 0 && self.navboxes.size() > 0 && typeof num === 'number' && num !== self.iterator && 0 <= num && num <= self.panels.size() ) { self.locked = true; Effect.Fade( self.panels[ self.iterator ], { duration: 0.25, afterFinish: function () { // remove 'active' class from panel and navbox self.panels[ self.iterator ].removeClassName('cnn_flpprt1pnl_active'); self.navboxes[ self.iterator ].removeClassName('cnn_flpprt1nvbx_active'); self.iterator = num; // add 'active' class to panel and navbox self.panels[ self.iterator ].addClassName('cnn_flpprt1pnl_active'); self.navboxes[ self.iterator ].addClassName('cnn_flpprt1nvbx_active'); // make new stuff appear Effect.Appear( self.panels[ self.iterator ], { duration: 0.25, afterFinish: function () { self.locked = false; if ( self.autoPlay ) { self.play(); } } } ); } } ); } }, prev: function () { this.stop(); this.navigatePanel( 'prev' ); }, next: function () { this.stop(); this.navigatePanel( 'next' ); }, play: function () { var self = this; if ( self.panels.size() > 0 && self.navboxes.size() > 0 ) { self.autoPlay = true; self.timer = window.setTimeout( function () { self.navigatePanel( 'next' ); }, 8000 ); } }, stop: function () { this.autoPlay = false; window.clearTimeout( this.timer ); }, imgClick: function (url) { if ( url ) { window.location.href = url; } } }; } /* share link functions =============================================================== */ function cnnSetShareLnks() { // mixx var mixxURL = 'http://web.archive.org/web/20121202022044/http://www.mixx.com/submit/story?page_url='+encodeURIComponent(location.href)+'&title='+cnnShareTitle+'&description='+cnnShareDesc+'&partner=CNN'; if($('cnnSBtnMixx')) { $('cnnSBtnMixx').href = mixxURL; $('cnnSBtnMixx').target="_blank"; } if($('cnnSBtnMixxBot')) { $('cnnSBtnMixxBot').href = mixxURL; $('cnnSBtnMixxBot').target="_blank"; } if($('cnnMixxEmbedTop')) { $('cnnMixxEmbedTop').href = mixxURL; $('cnnMixxEmbedTop').target="_blank"; } if($('cnnMixxEmbedBot')) { $('cnnMixxEmbedBot').href = mixxURL; $('cnnMixxEmbedBot').target="_blank"; } // Digg var diggURL = 'http://web.archive.org/web/20121202022044/http://digg.com/submit?phase=2&url='+encodeURIComponent(location.href)+'&title='+cnnShareTitle+'&bodytext='+cnnShareDesc; if($('cnnSBtnDigg')) { $('cnnSBtnDigg').href = diggURL; $('cnnSBtnDigg').target="_blank"; } if($('cnnSBtnDiggBot')) { $('cnnSBtnDiggBot').href = diggURL; $('cnnSBtnDiggBot').target="_blank"; } // Facebook var facebookURL = 'http://web.archive.org/web/20121202022044/http://www.facebook.com/share.php?u='+encodeURIComponent(location.href); if($('cnnSBtnFacebook')) { $('cnnSBtnFacebook').href = facebookURL; $('cnnSBtnFacebook').target="_blank"; } if($('cnnSBtnFacebookBot')) { $('cnnSBtnFacebookBot').href = facebookURL; $('cnnSBtnFacebookBot').target="_blank"; } if($('cnnSBtnFacebookEmbedTop')) { $('cnnSBtnFacebookEmbedTop').href = facebookURL; $('cnnSBtnFacebookEmbedTop').target="_blank"; } if($('cnnSBtnFacebookEmbedBot')) { $('cnnSBtnFacebookEmbedBot').href = facebookURL; $('cnnSBtnFacebookEmbedBot').target="_blank"; } // del.icio.us var deliciousURL = 'http://web.archive.org/web/20121202022044/http://del.icio.us/post?v=4&partner=cnn&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+cnnShareTitle+'delicious'; if($('cnnSBtnDelicious')) { $('cnnSBtnDelicious').href = deliciousURL; $('cnnSBtnDelicious').target="_blank"; } if($('cnnSBtnDeliciousBot')) { $('cnnSBtnDeliciousBot').href = deliciousURL; $('cnnSBtnDeliciousBot').target="_blank"; } // reddit var redditURL = 'http://web.archive.org/web/20121202022044/http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&title='+cnnShareTitle; if($('cnnSBtnReddit')) { $('cnnSBtnReddit').href = redditURL; $('cnnSBtnReddit').target="_blank"; } if($('cnnSBtnRedditBot')) { $('cnnSBtnRedditBot').href = redditURL; $('cnnSBtnRedditBot').target="_blank"; } // stumbleupon var stumbleuponURL = 'http://web.archive.org/web/20121202022044/http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&title='+cnnShareTitle; if($('cnnSBtnStumbleUpon')) { $('cnnSBtnStumbleUpon').href = stumbleuponURL; $('cnnSBtnStumbleUpon').target="_blank"; } if($('cnnSBtnStumbleUponBot')) { $('cnnSBtnStumbleUponBot').href = stumbleuponURL; $('cnnSBtnStumbleUponBot').target="_blank"; } // myspace var myspaceURL = 'http://web.archive.org/web/20121202022044/http://www.myspace.com/Modules/PostTo/Pages/?' + 't=' + cnnShareTitle + '&c=' + cnnShareDesc + '&u=' + encodeURIComponent(location.href); if($('cnnSBtnMyspace')) { $('cnnSBtnMyspace').href = myspaceURL; $('cnnSBtnMyspace').target="_blank"; } if($('cnnSBtnMyspaceBot')) { $('cnnSBtnMyspaceBot').href = myspaceURL; $('cnnSBtnMyspaceBot').target="_blank"; } var twitterURL = 'http://web.archive.org/web/20121202022044/http://cnntweet.appspot.com/articles/' + encodeURIComponent(location.href) + '/' + cnnShareTitle + '/tweet/'; if($('cnnSBtnTwitter')) { $('cnnSBtnTwitter').href = twitterURL; $('cnnSBtnTwitter').target="_blank"; } if($('cnnSBtnTwitterBot')) { $('cnnSBtnTwitterBot').href = twitterURL; $('cnnSBtnTwitterBot').target="_blank"; } if($('cnnSBtnTwitterEmbedTop')) { $('cnnSBtnTwitterEmbedTop').href = twitterURL; $('cnnSBtnTwitterEmbedTop').target="_blank"; } if($('cnnSBtnTwitterEmbedBot')) { $('cnnSBtnTwitterEmbedBot').href = twitterURL; $('cnnSBtnTwitterEmbedBot').target="_blank"; } // linkedIn var linkedInURL = 'http://web.archive.org/web/20121202022044/http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(location.href) + '&title=' + cnnShareTitle + '&summary=' + cnnShareDesc + '&source=CNN'; if($('cnnSBtnLinkedIn')) { $('cnnSBtnLinkedIn').href = linkedInURL; $('cnnSBtnLinkedIn').target="_blank"; } if($('cnnSBtnLinkedInBot')) { $('cnnSBtnLinkedInBot').href = linkedInURL; $('cnnSBtnLinkedInBot').target="_blank"; } // viadeo var viadeoURL = 'http://web.archive.org/web/20121202022044/http://www.viadeo.com/shareit/share/?url=' + encodeURIComponent(location.href) + '&title=' + cnnShareTitle + '&overview=' + cnnShareDesc + '&urllanguage=en&urlaffiliate=40538&encoding=ISO 8859-1'; if($('cnnSBtnViadeo')) { $('cnnSBtnViadeo').href = viadeoURL; $('cnnSBtnViadeo').target="_blank"; } if($('cnnSBtnViadeoBot')) { $('cnnSBtnViadeoBot').href = viadeoURL; $('cnnSBtnViadeoBot').target="_blank"; } } /*_______________________ story image changer ____________________________*/ var cnn_stryichgcrr = 1; var cnn_stryichgmax = 0; function cnn_stryichgS(img_id) { if(img_id != cnn_stryichgcrr) { $('cnn_stryichgnm' + cnn_stryichgcrr).className = 'cnn_stryichgn' + cnn_stryichgcrr; $('cnn_stryichgnm' + img_id).className = 'cnn_stryichgn' + img_id + ' cnn_stryichgn' + img_id + 'on'; $('cnnImageChangerImg').src = CNN_storyImageGallery[img_id-1].image; if($('cnnImageChangerCap')) { $('cnnImageChangerCap').update(CNN_storyImageGallery[img_id-1].caption); $('cnnImageChangerImg').setAttribute("alt",CNN_storyImageGallery[img_id-1].caption); } else { $('cnnImageChangerImg').setAttribute("alt",CNN_storyImageGallery[img_id-1].image); } cnn_stryichgcrr = img_id; } } function cnn_stryichgP() { var temp_i = cnn_stryichgcrr; if(temp_i == 1) { temp_i = cnn_stryichgmax; } else { temp_i--; } cnn_stryichgS(temp_i); } function cnn_stryichgN() { var temp_i = cnn_stryichgcrr; if(temp_i == cnn_stryichgmax) { temp_i = 1; } else { temp_i++; } cnn_stryichgS(temp_i); } function cnn_stryichgInit() { temp_s = ''; cnn_stryichgmax = CNN_storyImageGallery.length; for(i = 1;i <= cnn_stryichgmax;i++) { temp_s += ''; } Element.update('cnn_stryichgnm', temp_s); } function CNN_renderRecommend(obj) { var assetsLength = obj.assets.length; var numResults = 0; var retHTML ='

We recommend<\/h4>