var jsmd;

/* set the default "tcm_metadata" */
var tcm_metadata = window.tcm_metadata||{
   section: window.location.pathname.substring(1).replace(".html","").split('/'),
   friendly_name: window.location.pathname.substring(1),
   db: {
      title: "",
      participant: ""
   },
   search: {
      number_results: "",
      internal_controls: ""
   },
   shopping_home: "",
   template_type: template_type||"",
   content_type: "none"
};

/* used in /js/wa/www.js. value is over-written in 404.html to indicate error */
var template_type = "";
/* for whether or not pages use AJAX to get data used in tcm_metadata */
var isAjaxPage = false;
var pathname = window.location.pathname.substring(1);
var path_array = pathname.split("/");
if ((path_array[0] == "tcmdb" && (path_array[1] == "title" || path_array[1] == "person")) ||
     pathname.indexOf("guest-programmer") > -1){
   isAjaxPage = true; //ghhg
} else if (document.URL.indexOf("tcmarcp") > -1) {
   isAjaxPage = true;
   // http://localhost.tcm.com:8080/tcmdb/archives/index.html#tcmarcp-385312
} else if (path_array[0] == "shop" && path_array[1] == "index.html") {
   isAjaxPage = true;
   // /shop/index.html
}

