//no document ready for a reason...
//we dont want to wait untill document is ready as we are notifying of a loading sequence
//once the page is loaded the loading is done!
$("#largeMap").html('<img id="loader" src="'+deriveRoot()+'media/img/loader.gif" title="Loading Bar" alt="Loading Bar" /><span id="update">Loading Map...</span>');

function deriveRoot()
{
  var root = window.location.protocol+'//'+window.location.hostname+'/';
  
  if ( ( pos = window.location.pathname.search('public_html') ) != -1 )
  {
    root += window.location.pathname.substring(1,pos+12);
  }
  
  if ( window.location.pathname.search('demo') != -1 )
  {
    root += 'demo/';
  }
  
  return root;
}
