<!--  HIDE ME FROM THAT BROWSER// This script was written with the assistance of webmaster@drugsense.org// for the great Drug War Clock, http://www.drugsense.org/wodclock.htm// Link to this page instead of using this script. The variables must be updated// when new data is available, although I've modified it to survive beyond // december 31 // most recent update  Nov 04 with new figures from bjs prisoners in 2003// most recent update  Apr 05 with new figures from bjs prisoners at midyear 2004// most recent update Oct 05 with new figures from BJS prisoners in 2004// most recent update jan 2010 with new figures from bjs prisoners in 2008// most recent update dec 2011 with new corr pop in us 2010 figures var timerID = nullvar timerRunning = falsevar lastpop =  2266800 // Total inc pop, table 1 corr pop in us, 2010 http://bjs.ojp.usdoj.gov/content/pub/pdf/cpus10.pdf //// Federal and State prisoners and prisoners in local jails, See table 9.// When using the midyear statistics, I take this number plus half of the annual growth to arrive at a projected year end figure.var tpjpopgrow =  -25100 // the numerical growth in figure over previous 12 months period var yearbasedon = 2011 // lastpop figure is as of jan 1 of what yearfunction stopclock(){ // cannot directly test timerID on DEC OSF/1 in beta 4. if(timerRunning)  clearTimeout(timerID) timerRunning = false}function startclock(){ // Make sure the clock is stopped stopclock() showtime()}function separate(input) {  var output = ""; // initialise output string  for (var i=0; i < input.length; i++) {   if (i != 0 && (input.length - i) % 3 == 0) output += ",";   output += input.charAt(i);  } return output;}function calc(total,month,day,hours,minutes,seconds,year) { var num = 0; num = month * (total/12); num = num + (day * (total/365)); num = num + (hours * (total/365/24)); num = num + (minutes * (total/365/24/60));//next line makes the estimates valid beyond december 31 of each year num = num + ((year-yearbasedon)*tpjpopgrow); num = "" + Math.ceil(num + (seconds * total/365/24/60/60)); return num;}function takeYear(theDate){        x = theDate.getYear();        var y = x % 100;        y += (y < 38) ? 2000 : 1900;        return y;}function showtime(){ var now = new Date() var today = now var month = now.getMonth() var day = now.getDate() var hours = now.getHours() var minutes = now.getMinutes() var seconds = now.getSeconds() var year =  takeYear(today) var popgrow = calc(tpjpopgrow,month,day,hours,minutes,seconds,year)if (hours < 1) {hours=12} // solve the midnight aesthetic problem? var timeValue = "" + ((hours > 12) ? hours - 12 : hours) timeValue  += ((minutes < 10) ? ":0" : ":") + minutes timeValue  += ((seconds < 10) ? ":0" : ":") + seconds timeValue  += (hours >= 12) ? " P.M." : " A.M." var pop = (popgrow*1)+(lastpop*1)+"" pop = separate(pop)// document.clock.face.value = timeValue // document.sidebar.pop.value = pop//timeValue = timeValue + ' today'document.getElementById ("clockface").firstChild.nodeValue= timeValuedocument.getElementById ("prisonpop").firstChild.nodeValue= pop timerID = setTimeout("showtime()",1000) timerRunning = true}//-->
