You cannot use a script tag to load cross-domain JavasScript files (this will result in a timeout if it drops). However, in your code, check that the API objects are null to avoid errors:
eg. instead:
<script type="text/javascript">
google.load("maps", "2");
</script>
:
<script type="text/javascript">
if(google != null)
{
google.load("maps", "2");
}
else
{
}
</script>
, API.