html 5 code is not working on android using phonegap
===

    <html>
      <head>
        <title>Cordova Offline Example</title>
    
        <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>
        <script type="text/javascript" charset="utf-8">
    
        // Call onDeviceReady when Cordova is loaded.
        //
        // At this point, the document has loaded but cordova-1.9.0.js has not.
        // When Cordova is loaded and talking with the native device,
        // it will call the event `deviceready`.
        //
     
        function Network(){
    	    if(navigator.onLine)
    		    {
    		      alert('You are Online');
    		    }
    	    else
    		    {
    		      alert('You are Offline')
    		    }
    	 }
        </script>
      </head>
      <body >
      <input type="button" value="Check Network" onclick="Network()" />
      </body>
    </html>

I am trying to check network connection using html code. It is working if i run this code on crome on my local machine but why it is not working on android.
