PHP is executed on the server before anything is sent to the browser
Javascript is executed on the client side after everything is sent to the browser.
Here is how you would have to accomplish this:
<?php
if(!array_key_exists('inc',$_GET)) {
?>
<html>
<body>
<script>
if(confirm('Include file: somefile.php'))
document.location='thisfile.php?inc=somefile.php';
else
document.location='thisfile.php?inc=someotherfile.php';
</script>
die();
<?php
} //end if
include($_GET['inc']);
?>
but be forwarned that if you do this hackers can use this to execute all kinds of code on your server.