function doClear(theText) 
{
     if (theText.value == theText.defaultValue)
 {
         theText.value = ""
     }
 }
function addCommas(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
	x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
}
var testnumber = 400123;
OropezaDate = new Date(2006,08,01,19,00,00);
BradfordDate = new Date(2009,08,01,19,00,00);
RoderickDate = new Date(1996,08,01,19,00,00);
RomeroDate = new Date(2001,08,01,19,00,00);
LieuDate = new Date(2005,08,13,12,00,00);
BassDate = new Date(2004,11,05,12,00,00);
FeuerDate = new Date(2006,11,05,12,00,00);
PriceDate = new Date(2006,11,05,12,00,00);
SteinbergDate = new Date(1998,11,05,12,00,00);
var one_day = 1000*60*60*24;
var one_minute = 1000*60;
var one_second = 1000;
function calctime()
{
var avg_dropouts = .157915;
now = new Date();
OropezaDropouts=((now.getTime()-OropezaDate.getTime())/(one_minute))*avg_dropouts;
BradfordDropouts=((now.getTime()-BradfordDate.getTime())/(one_minute))*avg_dropouts;
LieuDropouts=((now.getTime()-LieuDate.getTime())/(one_minute))*avg_dropouts;
PriceDropouts=((now.getTime()-PriceDate.getTime())/(one_minute))*avg_dropouts;
RoderickDropouts=((now.getTime()-RoderickDate.getTime())/(one_minute))*avg_dropouts;
RomeroDropouts=((now.getTime()-RomeroDate.getTime())/(one_minute))*avg_dropouts;
BassDropouts=((now.getTime()-BassDate.getTime())/(one_minute))*avg_dropouts;
FeuerDropouts=((now.getTime()-FeuerDate.getTime())/(one_minute))*avg_dropouts;
SteinbergDropouts=((now.getTime()-SteinbergDate.getTime())/(one_minute))*avg_dropouts;
var clocklocation = document.getElementById('digitalclock');
clocklocation.innerHTML = " <font size='3'><b>Democrat Steve Bradford was elected to the 51st Assembly District just " + 
"<font color='red'>" + Math.ceil((now.getTime() - BradfordDate.getTime() ) / one_day) + "</font> days ago. During his short tenure " +
"<font color='red'>" + addCommas(BradfordDropouts.toFixed(0)) + "</font> California high school students have dropped out. When will it stop?</font></b>" +
"<br /><br />Here are our other LOCAL representatives that we have entrusted our childrens education to and the number of dropouts during their tenure." +
"<br /><br /><table border='1' cellspacing='0'>"+
"<tr><td width='300px'><font size='2' color='#666666'><strong>Legislator</strong></font></td>"+
"<td width='150px'><font size='2'><strong>In office since</strong></font></td>"+
"<td width='100px'><font size='2'><strong>Drop outs</strong></font></td></tr>" +
"<tr><td><font size='2'><strong>Ted Lieu</strong> (Assembly)</font></td><td><font size='2'>" + "2005" +"</font></td><td><font size='2' color='red'><b>" + addCommas(LieuDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Curren Price</strong> (State Senate)</font></td><td><font size='2'>"  + "2006" +"</font></td><td><font size='2' color='red'><b>" + addCommas(PriceDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Roderick Wright</strong> (State Senate)</font></td><td><font size='2'>" + "1996" +"</font></td><td><font size='2' color='red'><b>" + addCommas(RoderickDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Jenny Oropeza</strong> (State Senate)</font></td><td><font size='2'>" + "2006" +"</font></td><td><font size='2' color='red'><b>" + addCommas(OropezaDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Gloria Romero</strong> (State Senate)</font></td><td><font size='2'>" + "2001" +"</font></td><td><font size='2' color='red'><b>" + addCommas(RomeroDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Karen Bass</strong> (Speaker of the CA Assembly)</font></td><td><font size='2'>" + "2004" +"</font></td><td><font size='2' color='red'><b>"  + addCommas(BassDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Mike Feuer</strong> (Assembly)</font></td><td><font size='2'>" + "2006" +"</font></td><td><font size='2' color='red'><b>" + addCommas(FeuerDropouts.toFixed(0))+"</b></font></td></tr>"+
"<tr><td><font size='2'><strong>Darrell Steinberg</strong> (Senate pro Tem)</font></td><td><font size='2'>" + "1998" +"</font></td><td><font size='2' color='red'><b>" + addCommas(SteinbergDropouts.toFixed(0))+"</b></font></td></tr>"+
"</table><font size='1'>As of " + now.toLocaleDateString()+ " at " + now.toLocaleTimeString()+ "</font><br />";


//--------------------------------------------------------------
setTimeout("calctime()", 1000);
}

 