All,

I am a complete newbie to JS and really don't know what I'm diving into. I am trying to use a JS based internet speed test and have it run automatically on page load. I put the window.onload command at the end of the script, but I can't get passed the first instruction listed with in the function. Nothing else happens after the text regarding "test in progress" is displayed. I appreciate any help you folks can provide.

Code:
<html>
<head>
 	<script src="http://speedof.me/api/api.js" type="text/javascript">
    </script>
</head>
<body>
<h2>Rental Xpress Internet Speed Test</h2>


<button id="btnStart" type="button" onclick="btnStartClick()">Start Test</button>
<div id="msg"></div>
<script type="text/javascript">

	SomApi.account = "SOM5326f3c941ee5";   //your API Key here
	SomApi.domainName = "rxserver.no-ip.biz";      //your domain or sub-domain here 
	SomApi.config.sustainTime = 4; 
	SomApi.onTestCompleted = onTestCompleted;
	SomApi.onError = onError;

	var msgDiv = document.getElementById("msg");
	
	function btnStartClick() {
		msgDiv.innerHTML = "<h3>Speed test in progress. Please wait...</h3>";
		SomApi.startTest();
		 
	}
	
	function onTestCompleted(testResult) {
		msgDiv.innerHTML = 
		"<h3>"+
			"Download: "   +testResult.download +"Mbps <br/>"+
			"Upload: "     +testResult.upload   +"Mbps <br/>"+
			"Latency: "    +testResult.latency  +"ms <br/>"+
			"Jitter: "     +testResult.jitter   +"ms <br/>"+
			"Test Server: "+testResult.testServer +"<br/>"+
			"IP: "         +testResult.ip_address +"<br/>"+
			"Hostname: "   +testResult.hostname +"<br/>"+
		"</h3>";
	}
	
	function onError(error) {
		msgDiv.innerHTML = "Error "+ error.code + ": "+error.message;
	}
	
window.onload=btnStartClick();


</script>
</body>
</html>