/*
Instructions: There are 3 things that need to be done to use this properly:
1)On the page where you want to have the number of driveragent drivers displayed, please 
paste the following code into the head of the html:
<script src="http://driveragent.com/drivercount_js.php" type="text/javascript"></script>

2)In your javascript onload initialization, you need to add the function "drivercount()", for example:
<body onload="drivercount();">
NOTICE: Google javascript code can interfere with onload events, in that case, use the following code after any drivercount spans:
<script language="javascript" type="text/javascript">drivercount();</script>

3)and use the following wherever you would like to have the number appear:
<span class="drivercount">more than 120,000</span>
*/

/*
Credits for the function getElementsByClassName:
Written by Jonathan Snook, http://www.snook.ca/jonathan
Add-ons by Robert Nyman, http://www.robertnyman.com
*/
function getElementsByClassName_dacount(oElm, strTagName, strClassName){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\-");
	var oRegExp = new RegExp("(^|\s)" + strClassName + "(\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
}

function drivercount() {
	var countspans = getElementsByClassName_dacount(document, 'span', 'drivercount');
	for (var i = 0; i < countspans.length; i++) {
		countspans[i].innerHTML='126,934';
	}
}