/**
 * Copyright 2009 Lime Labs LLC
 *
 * This file is part of AXIS.
 *
 * AXIS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * version 3 as published by the Free Software Foundation.
 *
 * AXIS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with AXIS.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * Determine the load path for the AXIS.js files, which will be the path
 * of AXISLoader.js
 */
(function() {

var APath   = '';
var scripts = document.getElementsByTagName("*");

for(var i=0; i < scripts.length; i++) 
  {
    var src = scripts[i].getAttribute("src");
    if(src && src.match('AXISLoader.js')) 
      {
        APath = src.substring(0,src.lastIndexOf('/')+1) + 'AXIS.js';
        break;
      }
  }

document.write('<' + 'script' + ' id="__AXIS__" type="text/javascript" src="' + APath + '"> </' + 'script' + '>');

})();




