HTML Geolocation not working

<title></title>
<p>Click the Button to get your location.</p>

<input type="button" value="Click me!" onclick="Geolocation()" id="location">

<script type="text/javascript">

    var x = document.getElementById("location");

    function Geolocation() {

        if (navigator.geolocation) {

            navigator.geolocation.getCurrentPosition("showPosition, showError");

        } else {

            x.innerHTML = "Your Browser not support Geolocation API."

        }

    }

    function showPosition(postion) {

        x.innerHTML = "Latitude:- " + postion.coords.latitude + "Longtude:- " + postion.coords.longtude;

    }

    function showError(error) {

        switch (error.coords) {

            case error.PERMISSION_DENIED:

                x = innerHTML = "User has denied required for geolocator."

                break;

            case error.POSITION_UNAVALIBLE:

                x = innerHTML = "API network not avalible."

                break;

            case error.TIMEOUT:

                x.innerHTML = "Time out Please fast. "

                break;

            case error.UNKNOWN_ERROR:

                x.innerHTML = "Unknown error Avalible."

                break;

        }

    }

</script>