// include scripts on load
/*
* @requires servers.js
*/

var jsfiles = servers.jsfiles;
var path = servers.path;

/*
 * This code is based on the OpenLayers code base.
 *
 * Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
 * license.  See http://svn.openlayers.org/trunk/openlayers/license.txt for the
 * full text of the license.
 */

(function() {
  var agent = navigator.userAgent;
  var doc_write = (agent.match("MSIE") || agent.match("Safari"));
  if(doc_write) {
    var all_script_tags = new Array(jsfiles.length);
  }
  for(var i=0; i<jsfiles.length; i++) {
    if(doc_write) {
      all_script_tags[i] = "<script type='text/javascript' src='" + path + jsfiles[i] + "'></script>";
    }
    else {
      var s = document.createElement("script");
      s.type = 'text/javascript';
      s.src = path + jsfiles[i];
      var h = document.getElementsByTagName("head").length ? document.getElementsByTagName("head")[0] : document.body;
      h.appendChild(s);
    }
  }
  if(doc_write) {
    document.write(all_script_tags.join(""));
  }
})();

