 var BrowserCheckFailMessage='<ul><table border="1" cellspacing="0" cellpadding="0">';BrowserCheckFailMessage+='<tr><th align="center" valign="top"><b>Platform</b></th><th align="center" valign="top"><b>Internet Explorer</b></th><th align="center" valign="top"><b>Netscape</b></th><th align="center" valign="top"><b>Mozilla</b></th><th align="center" valign="top"><b>Opera<sup>1</sup></b></th></tr>';BrowserCheckFailMessage+='<tr><td valign="top"><b>Windows 95/98/NT</b></td><td valign="top">5.5 or higher</td><td valign="top">6.x or higher</td><td valign="top">1.x or higher</td><td valign="top">6.x or higher</td></tr>';BrowserCheckFailMessage+='<tr><td valign="top">&nbsp;</td><td valign="top">4.x (Limited<sup>2</sup>)</td><td valign="top">4.x (Limited<sup>2</sup>)</td><td valign="top">&nbsp;</td><td valign="top">&nbsp;</td></tr>';BrowserCheckFailMessage+='<tr><td valign="top"><b>Unix (IRIX/Solaris/Linux/etc.)</b></td><td valign="top">N/A</td><td valign="top">6.x or higher</td><td valign="top">6.x or higher</td><td valign="top">6.x or higher</td></tr>';BrowserCheckFailMessage+='<tr><td valign="top"><b>Macintosh (OS-X)</b></td><td valign="top">5.x or higher (Limited<sup>2</sup>)</td><td valign="top">6.x or higher</td><td valign="top">6.x or higher</td><td valign="top">6.x or higher</td></tr>';BrowserCheckFailMessage+='<tr><td colspan="5" valign="top">&nbsp;</td></tr>';BrowserCheckFailMessage+='<tr><td colspan="5" valign="top"><small><sup>1</sup>Opera works only if the User-Agent (under the quick preferences) is set to identify the browser as a recent version of Mozilla or Internet Explorer.</small></td></tr>';BrowserCheckFailMessage+='<tr><td colspan="5" valign="top"><small><sup>2</sup>Older browsers will be able to display the map to a limited extent, but may not have access to the full functionality to interact with the map.  Also, macintosh versions of the older browsers are extremely slow.</small></td></tr>';BrowserCheckFailMessage+='</table></ul>  You may try to <a href="MapFrame.htm">continue</a> to load the viewer, but this is not recommended or supported.';var BrowserSizeFailMessage='Your browser window is smaller than 800x600.  You may try to <a href="MapFrame.htm">continue</a> to load the viewer, but this is not recommended as your map area will be extremely small.';var lastURL='';function processAuthXML(theReplyIn){var theReply='';if(doURLencode){theReplyIn=replacePlus(theReplyIn);theReply=unescape(theReplyIn);}else{theReply=theReplyIn;};var theError=getXMLErrorMessage(theReply);if(theError!=""){writePage(theError,lastURL);}else{theError=checkForbiddenGetImageTag(theReply);if(theError==""){switch(XMLMode){case 1201:processAuthorization(theReply,1201);break;case 1202:processAuthorization(theReply,1202);break;default:writePage("Process XML Mode incorrect! (XML Reply: "+theReply,"-");}}else{writePage(theError,lastURL);}}};function checkAuthorization(theType){var URLString=imsURL;if(theType==1202){URLString=imsOVURL;};var XMLRequest='<ARCXML version="1.1">\n<REQUEST>\n<GET_SERVICE_INFO renderer="false" extensions="false" fields="false" />\n</REQUEST>\n</ARCXML>\n';sendToServer(URLString,XMLRequest,theType);};function processAuthorization(theReply,theType){var pos=theReply.indexOf("ERROR");if(pos!=-1){writePage("Error code found in Authorization response. ("+theType+" - "+getXMLErrorMessage(theReply));}else{if((theType==1201)&&(imsOVURL!="")&&(imsURL!=imsOVURL)){checkAuthorization(1202);}else{parent.MapFrame.checkParams();}}};function writePage(errorString,theURL){parent.USGSContinueCheck=true;document.open();document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"');document.writeln('    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');document.writeln('');document.writeln('<html xmlns="http://www.w3.org/1999/xhtml">');document.writeln('  <head>');document.writeln('    <meta http-equiv="Pragma" content="no-cache" />');document.writeln('    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />');document.writeln('    <title>Error Page</title>');document.writeln('    <script type="text/javascript" language="JavaScript" src="/JS_Library/ArcIMS_Template/Authorize.js"></script>');document.writeln('    <style type="text/css">');document.writeln('    /*<![CDATA[*/');document.writeln('      .title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16pt; font-weight: bold; font-style: italic; }');document.writeln('      body { font-family: Verdana, Arial, Helvetica, sans-serif; margin-left: 5px; margin-right: 5px; color: #000000; background-color: #FFFFFF; background-repeat: no-repeat; font-size: 8pt; }');document.writeln('      a { text-decoration: none; color: #0000FF; }');document.writeln('      a:hover { text-decoration: underline; color: #CCCCFF; }');document.writeln('      a.visited { color: #5555CC; }');document.writeln('      br { line-height: 50%; }');document.writeln('      h2 { margin: 0px; }');document.writeln('      form { margin: 0px; }');document.writeln('      address { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; }');document.writeln('    /*]]>*/');document.writeln('    </style>');document.writeln('  </head>');document.writeln('  <body bgcolor="#FFFFFF">');document.writeln('    <h2>Error:</h2>');document.writeln('    <blockquote>');document.writeln(errorString);document.writeln('    </blockquote>');if(theURL!="-"){document.writeln('    <h2>Request URL:</h2>');document.writeln('    <blockquote>');document.writeln(theURL);document.writeln('    </blockquote>');};document.writeln('  The USGS HTML Interactive Map Viewer is unable to continue loading.  Questions regarding this interface may be directed to the  ');document.writeln('  the USGS National Center for EROS Customer support.  Contact information is available at ');document.writeln('  <a href="http://edc.usgs.gov/includes/contactform.html" target="_blank">http://edc.usgs.gov/includes/contactform.html</a>.  Please be ready');document.writeln('  to provide them with information about the URL of this page, and how you navigated to this page with your browser.');document.writeln('  </body>');document.writeln('</html>');document.close();};function checkForbiddenGetImageTag(theString){var theError="";var dQuote='"';var startpos=theString.indexOf("CAPABILITIES forbidden=");if(startpos!=-1){startpos=startpos+24;endpos=theString.indexOf(dQuote,startpos);var forbiddenTags=theString.substring(startpos,endpos);if(forbiddenTags.indexOf("GET_IMAGE")!=-1){theError=msgList[119];}};return theError;};function checkBrowser(){var BrowserPass=false;var BrowserSizePass=true;if(!parent.USGSContinueCheck){if(parent.is_opera){if((parent.is_ie||parent.is_nn)&&parent.is_major>4){BrowserPass=true};}else if(parent.is_ie){if((parent.is_major>4&&!parent.is_mac)||(parent.is_major>5&&parent.is_mac)){BrowserPass=true};}else if(parent.is_nn){if(parent.is_major>4){BrowserPass=true};};if(!BrowserPass){writePage("Failed Browser Compatibility test! (Current UserAgent: "+parent.ua+", "+parent.is_major+", "+parent.is_minor+") "+BrowserCheckFailMessage,"-");}else{if(parent.is_ie&&!parent.is_opera){if((parent.document.elementFromPoint(10,500)==null)||(parent.document.elementFromPoint(600,10)==null)){writePage(BrowserSizeFailMessage,"-");BrowserSizePass=false;}}else{if((window.outerHeight<600)||(window.outerWidth<800)){writePage(BrowserSizeFailMessage,"-");BrowserSizePass=false;}};if(BrowserSizePass){if(!parent.USGSskipMapAuthorizationCheck){checkAuthorization(1201);}else{checkParams();}}}}else{if(!parent.USGSskipMapAuthorizationCheck){checkAuthorization(1201);}else{checkParams();}}}

