var bhawkplt_start=new Date().getTime(); // mandatory, leave this line here and unaltered.

// ############### BH ANALYTICS -- SETUP AND USAGE INSTRUCTIONS ###############

// Copyright (c) 2009 cyScape, Inc. (www.cyscape.com) All rights reserved. Permission is hereby granted to use this
// scipt solely in conjunction with the terms and conditions of the BrowserHawk To-Go service, available at www.cyscape.com.
// Permission is also granted to modify this particular script as necessary to set the configuration parameters.

// ######## STEP 1 of 3 - INCLUDE THE SCRIPT IN ALL YOUR PAGES ########
// This script MUST be included in the HEAD section of each web page you want tracked by BH Analytics.
// The easiest way to do this is to include the script from a common header file shared by all your pages.
// Ideally place this the script tag so that it is the FIRST thing contained within the HEAD section, like so:
// <HEAD>
//    <script src="/some/path/on/your/webserver/to/this/file/bhawkanalytics.js">&nbsp;</script>
//    ... meta tags,  other JS libraries and scripts, and other code/markup for your head section here ...
// </HEAD>

// If it is not possible to include this script as the very first thing in your head section, than at an absolute minimum
// you should remove the "var bhawkplt_start = new Date().getTime();" line of code from the top of this page, and
// add a tiny inline script section to set the bhawkplt_start variable as very first thing within your head section, like so:
// <HEAD>
//   <script>var bhawkplt_start=new Date().getTime(); </script>
//   ... meta tags, JS libraries and scripts, and other code you deem must come before this script here ...
//    <script src="/some/path/on/your/webserver/to/this/file/bhawkanalytics.js">&nbsp;</script>
// </HEAD>


// ######## STEP 2 of 3 - CONFIGURE MANDATORY SETTINGS ########

// ### STEP 2A - Tell BH Analytics who you are
// Set this variable to the account ID assigned to you when opening your BH Analytics account.
var _bhtg_acctid = "northlineexpress";  // TODO - set the _bhtg_acctid variable equal to your BH Analytics account ID

// This checks that you remembered to set your account ID when getting started with this script. You can remove this line after setting the _bhtg_acctid var above. :)
if (_bhtg_acctid == "") alert("Please specify your BH Analytics account iD in your bhawkanalytics.js file.");

// ### STEP 2B - Copy speed test data files to your server and tell BH Analytics where to find them
// BH Analytics uses data files to perform connection speed and latency tests on your visitors. 
// If you are just getting started with BH Analytics and want to try it out quickly, without setting up
// these support files, you can leave the _bhtg_supportfiles variable blank and the data files will be read from our servers.
// However in doing so you will be measuring the speed and latency between your users and OUR servers, not your servers.
// Furthermore the results will be far less accurate because the tests are automatically restricted when the data files are
// served from our network.  Note that the End User License Agreement permits usage of these files from our servers only for
// reasonable development and light testing or evaluation purposes.  Access to these files from our servers is logged by
// account, and accounts not following these guidelines may be subject to bandwith charges and suspended or removed.

// ** IMPORTANT!! ** If you use BH Analytics on secure pages accessed via https, then you MUST put these data files on your server (even for light testing and dev work) and may
// also need to set the _bhtg_supportfiles_https variable below (see notes below for details). Failure to do so will result in a mixed security warning displayed on https pages and/or not stats logged.
// Instructions for setting _bhtg_supportfiles (mandatory for use in production or for use in testing/dev with secure pages)
// To setup these files on your server, download the data files from http://www.cyscape.com/download/bhanalytics-speedfiles.zip
// and follow the instructions found in the readme.txt file included in the zip.  Then set the _bhtg_supportfiles variable  per those instructions.
// Example:  _bhtg_supportfiles = "http://www.example.com/bhanalytics";  // remember, per the above you must install files to this location.
var _bhtg_supportfiles = "http://www.northlineexpress.com/bhanalytics"; // TODO - set this variable per above. Mandatory  for use in production environments or over SSL (https pages).

// Note: If your pages are also accessed via https, BH Analytics will automatically change the "http://" specified in the _bhtg_supportfiles variable
// to "https://" when used on a https page.  Therefore, normally it is not necessary to also set the _bhtg_supportfiles_https variable. However in some server 
// configurations SSL requests are served from a different fully qualified domain (i.e. secure.example.com for https vs. www.example.com for
// non-secure requests).  If you require a different URL for SSL requests (besides the http:// vs. https:// difference ) then  set the _bhtg_supportfiles_https 
//  variable to the full URL where the data files can be retrieved over an https connection.
// var _bhtg_supportfiles_https = "";  // i.e.  var = _bhtg_supportfiles_https = "https://secure.example.com/bhanalytics";  // TODO - set if your secure server uses a diffent fully qualified domain name

// ######## STEP 3 of 3 - CONFIGURE OPTIONAL SETTINGS (if desired) ########
// BH Analytics assigns a unique user ID to each visitor and stores it in a persistent cookie
// for reuse on subsequent visits. It also assigns a new session ID that is used during each session. 
// You can override the user ID by supplying your own value. The session ID cannot be overridden.
// var _bhtg_userid = "";    // set to a unique user id. This should be the same for the same user on each visit. Leave this commented out to use an auto-generated ID.
// Example - assume you have a user ID already in a user's cookie. You can reuse this value instead of an auto-generated value to make it easy to find a specific user's data in your stats.
// var _bhtg_userid = readCookie("myUserIDcookie");   // readCookie function is just an example - replace this with your own cookie function you may be using

// BH Analytics uses the URL of the current page, with the query string removed, as the name of the page reported in the page load time and page error reports. It also removes common
// default page names such as index.php and default.aspx. If the query string is critical for you to uniquely identify each page in the reports, or if you wish to assign any arbitray name,
// you can set the _bhtg_page variable to the value you want used.
// Examples:
//     var _bhtg_page = MyOwnJSFunctionToTranslateURL(window.location.href); // i.e. write your own function that takes the given URL and trims it to down make it as small as possible (such as removing unnecessary parts of the query string ) while still being unique.
//     var _bhtg_page = "My Order Page"; // i.e. you can use descriptive names. In this case you will likely want to dynamically write out this script tag where you can substitute the value of this string on the fly, or you can just set this variable in the head section of each page independant of this script.
// var _bhtg_page = '';

// ##  You can use your BH Analytics account to seperately track different web sites or portions of web sites by setting an arbitrary site ID, such as "Client ABC" or "European Site". Leave blank otherwise.
// var _bhtg_siteid = '';

// TIP: All optional settings can be set via JavaScript running directly in your page rather than setting the variables in this file. For example if you want to
// assign a custom user and session ID which are available in your server-side code, you can dynamically write these values into your pages like so:
//     Example (PHP): echo "<script>var _bhtg_userid = \"" . $userIDFromServer . "\";</script>";
//     Example (ASP.NET / ASP): Response.Write("<script>var _bhtg_userid = \"" + userIDFromServer + "\";</script>)";
// If using this approach, be sure to write this JS out within the HEAD section of your page, prior to where this script is referenced.

// TIP: Once you are up to speed feel free to remove the comments from this file, except for the copyright section at the top,
// to keep its size as small as possible for fastest transmission to your site visitors.
// End Configuration ------------

// Mandatory - leave this line unaltered and do not relocate it.
document.write(unescape("%3cscript src='"+(document.location.protocol=='https:'?'https:':'http:')+"//lib.browserhawk.com/bhtg/bhanalytics.js?acct="+_bhtg_acctid+"'%3e %3c/script%3e"));
