/* -- BEGIN SPHERE JS -- */ Sphere = {} Sphere.Tracker = new function() { this.track = function ( ele, site, area ) { if( !ele.href ) return; var imgurl = 'http://stats.sphere.com/widgets/sphereit/?action=click&siteid='+site+'&q='+area+'&url='+ele.href; var trackimg = new Image(); trackimg.src = imgurl; wait(150); } } Sphere.Widget = new function() { var SKELETON_MARKUP = '

Related Blogs

loadingWe\'re getting you the good stuff...
'; var CONTENT_URL = 'http://www.sphere.com/widgets/sphereit/content?siteid=cbsnews'; if(document.characterSet) CONTENT_URL += ('&cset='+escape(document.characterSet)); CONTENT_URL += '&url='; var widget; var widgetContent; var widgetLoading; var content; if(document.getElementsByTagName('base').length>0) { if (window.addEventListener){ window.addEventListener('load', appendStylesheet, false); } else if (window.attachEvent){ window.attachEvent('onload', appendStylesheet); } } else { appendStylesheet(); } var imgurl = 'http://stats.sphere.com/widgets/sphereit/?action=page&siteid=cbsnews'; var trackimg = new Image(); trackimg.src = imgurl; this.search = function( source ) { if( !content || (source && content.source!=source ) ) { requestContent( source ); if( widget ){ widget.parentNode.removeChild(widget); content=null; widget=null; } } if( !widget ) draw(); show(); var reqimgurl = 'http://stats.sphere.com/widgets/sphereit/?action=display&siteid=cbsnews'; reqimg = new Image(); reqimg.src = reqimgurl; reqimg.style.display = 'none'; document.body.appendChild(reqimg); return false; } this.close = function() { if( widget ) widget.style.display ='none'; } this.processContent = function (incomingContent) { content = incomingContent; for(i=0;i<1000;i++){ test='444'}; if( !widgetContent ) return; widgetContent.innerHTML = content.content; widgetContent.style.height = widgetLoading.clientHeight +'px'; widgetLoading.style.display = 'none'; widgetContent.style.display = 'block'; zoomToFull(); } function requestContent( local ) { //alert("requestContent"); Sphere.Widget.script = document.createElement('script'); Sphere.Widget.script.src = CONTENT_URL + escape(local || location.href); setTimeout(function(){ document.body.appendChild(Sphere.Widget.script);}, 1); } function zoomToFull() { //alert("zoomToFull"); Animator.add( { process: function() { if( widgetContent.clientHeight >= widgetContent.scrollHeight-20) { widgetContent.style.height = widgetContent.scrollHeight+'px'; if( iecheck() ) { ieahack(widget.getElementsByTagName("a")); document.getElementById("sphereiframeblock").style.height = (Number(widget.scrollHeight)-24)+'px'; document.getElementById("sphereiframeblock").style.display = 'block'; alphaBackgrounds(); } center(); return false; } widgetContent.style.height = (widgetContent.clientHeight + 20) +'px'; center(); return true; } }); } function ieahack( col ) { for( var i=0; i"); } function iecheck(inc_seven) { if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) { var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); var iever = (inc_seven)?(rslt != null && Number(rslt[1]) >= 5.5):(rslt != null && Number(rslt[1]) >= 5.5 && Number(rslt[1]) < 7 ); } return iever; } function wait(ms){ var now=new Date();var exitTime=now.getTime()+ms;while(true){now=new Date();if(now.getTime()>exitTime){return;}}} function alphaBackgrounds() { //alert('alphaBackgrounds()'); if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) { var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, ''); var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5 && Number(rslt[1]) < 7 ); for (i=0; i