<%
Properties props;
String pathname = "";
String useragent;
boolean hasXML = true;
File f;
useragent = (request.getHeader("user-agent"));
if (useragent.indexOf("Safari")!= -1){
hasXML = false;
}
try {
//props = loadProperties("amgendotcom.properties");
InputStream propsFile;
props = new Properties();
try {
propsFile = new FileInputStream("amgendotcom.properties");
props.load(propsFile);
propsFile.close();
} catch (IOException ioe) {
//ignore this exception; properties file will be empty and user will have to assume responsibility
}
/* check for each of the five xml files. default to the traditional names in the current directory */
pathname = props.getProperty("flash.xml.map", "home_map.xml");
f = new File(pathname);
hasXML = hasXML && f.exists();
pathname = props.getProperty("flash.xml.disease", "home_dis.xml");
f = new File(pathname);
hasXML = hasXML && f.exists();
pathname = props.getProperty("flash.xml.product", "home_prod.xml");
f = new File(pathname);
hasXML = hasXML && f.exists();
pathname = props.getProperty("flash.xml.news", "home_news.xml");
f = new File(pathname);
hasXML = hasXML && f.exists();
pathname = props.getProperty("flash.xml.misc", "home_misc.xml");
f = new File(pathname);
hasXML = hasXML && f.exists();
} catch (Exception ex) {}
if (hasXML) {
%>
<% } %>