Using jquery, how to redirect to a page based on whether target page is available?
<p>Looking for some quick help to what is likely a well known problem.</p>

<p>I have two pages to access an application, one public with a log in box and one on our intranet with a auto authentication via network id. Our goal is to automatically connect to the page with the login box only IFF a user is not on the network (e.g. at home and not on VPN). What I'd like to do is use jquery to check if the auto authenticated page is available and if so use it, otherwise use the other page.</p>

<p>pseudo code:</p>

<pre>

on page load{
  if ( get http://autoautheticated.page status =! 404) 
  {
 document.location = http://autoautheticated.page
  }
  else
  {
 document.location = http://login.page
  } 
}

</pre>

<p>More - I don't have access to the target pages, and the launch page is static plain old html so javascript (jquery) seems to be a good fit for this problem.</p>
