var videoisdown = false; var videofirstrun = true; var slideshow_interval = 0; var slideshow_item = 0; var slideshow_paused = false; function slideshow_goto (target,isclick) { if(isclick && !slideshow_paused){clearInterval(slideshow_interval); slideshow_interval = setInterval(slideshow_goto,slideshow_swapcount); if(target == -1){target = slideshow_captions.length - 1; }if(target == slideshow_captions.length){target = 0; }} else {target = slideshow_item + 1; if(target == slideshow_captions.length){target = 0; }}if(document.getElementById('sl'+slideshow_item)){document.getElementById('sl'+slideshow_item).className = 'off'; }if(document.getElementById('sl'+target)){document.getElementById('sl'+target).className = 'on'; }slideshow_item = target; $("#sl_main").stop(); $("#sl_caption").stop(); $("#sl_main").css({ opacity: "1" }); $("#sl_caption").css({ opacity: "1" }); $("#sl_caption").fadeOut("fast", function () { document.getElementById('sl_caption').innerHTML = slideshow_captions[target]; $("#sl_caption").fadeIn("fast") }); $("#sl_main").fadeOut("fast", function () { document.getElementById('sl_main').innerHTML = ''; $("#sl_main").fadeIn("fast"); }); } function slideshow_pausemanage () { if(slideshow_paused){ slideshow_paused = false; slideshow_interval = setInterval(slideshow_goto,slideshow_swapcount); document.getElementById("slideshow_pause").style.backgroundColor = "#cc2222"; } else { slideshow_paused = true; clearInterval(slideshow_interval); document.getElementById("slideshow_pause").style.backgroundColor = "#4e8dd4"; }} function videotoggle () { if(videoisdown){ if(document.getElementById('videoshow')){ document.getElementById('videoshow').style.backgroundColor = '#ff0000'; document.getElementById('videoshow').innerHTML = 'OPEN VIDEO »'; } $('#videospace').slideUp("fast", function () { document.getElementById('videospace').style.display = 'none'; }); videoisdown = false; } else { if(videofirstrun){ var varcheck = new Array(); if(typeof(currentchapter) != 'undefined'){ varcheck.current = currentchapter; } if(document.getElementById('videospace')){ document.getElementById('videospace').innerHTML = '
'; _papobject.embedSWF('../view/viewer.swf','videospaceflash','100%','125','9.0.0',null,varcheck,{menu: "false",wmode: "transparent"}); } } if(document.getElementById('videoshow')){ document.getElementById('videoshow').innerHTML = 'CLOSE VIDEO »'; document.getElementById('videoshow').style.backgroundColor = '#666666'; } $('#videospace').slideDown("fast"); videoisdown = true; } } window.onload = function () { if(document.getElementById('videoshow')){ document.getElementById('videoshow').style.display = 'block'; document.getElementById('videoshow').onclick = videotoggle; } if(typeof(currentchapter) != 'undefined' || (document.referrer && document.referrer != '' && document.referrer.indexOf('pbs.org') == -1)){ videotoggle(); } } function makenextlink () { if(currentchapter < 10){ if(document.getElementById('charea')){ document.getElementById('charea').innerHTML = ''; $('#charea').hide(); } if(document.getElementById('nextthing')){ document.getElementById('nextthing').innerHTML = '
NEXT CHAPTER ' + nextchtitle + '
'; $('#nextthing').fadeIn(300); } } } function localchapters () { document.write('

You\'ll need Flash 9 or better to view this content. Download it now

'); var h= { }; var i= { wmode:"opaque",allowScriptAccess:"always" }; h.pap_brandcode='frol'; h.pap_program='2701'; _papobject.embedSWF("http://www.pbs.org/wgbh/pages/frontline/video/flv/clocal0.swf","pap_chapters","100%","218","9",null,h,i, { id:'pap_chapters',name:'pap_chapters' } ) }