How to call on confirm box ?

<html>
<head>
<script type=”text/javascript”>
<!–
function confirmation() {
var answer = confirm(“Action?”)
if (answer){
alert(“ok!”)
window.location = “http://www.google.com/”;
}
else{
alert(“Cancel”)
}
}
//–>
</script>
</head>
<body>
<form>
<input type=”button” onclick=”confirmation()” value=”Submit”>
</form>
</body>
</html>