I have a seperate page that serves my mobile visitors. Currently I have set up my main page to redirect to the mobile site like this:

HTML Code:
    <script type="text/javascript">
       <!--
       if (screen.width <= 700) {
       window.location = "http://my-mobile-site.com";
       }
       //-->
    </script>
This causes screens with less than 700px screens (Mobile Phones and stuff) to redirect to my mobile site and this works.

HOWEVER...

I would like to use a Yes/No box or a Ok/cancel box. I have tried doing it like this:

HTML Code:
<script type="javascript">

<!--
if (screen.width <= 700) {

	var answer = confirm("Visit Mobile Site?")
	if (answer){
	window.location = "http://my-mobile-site.com";
	}
	else {
	}
}

 -->

</script>
Only this does not work.

Any Help or sugestions?