/*
$Id: movies_v1.1.js 15301 2008-09-15 13:57:16Z david $
*/

addMetaTag("WT.z_mid",  getMetaTag("MID"));
addMetaTag("WT.z_mti",  getMetaTag("MTI"));
addMetaTag("WT.z_mpid", getMetaTag("MPID"));
addMetaTag("WT.z_mpn",  getMetaTag("MPN"));
addMetaTag("WT.z_tszc", getMetaTag("TSZC"));

var subcontentGroup = getMetaTag("WT.cg_s");
var pageType        = getMetaTag("WT.z_gpt");
var pageSubType     = getMetaTag("WT.z_gpst");
var gcom            = getMetaTag("WT.gcom");

if(/\/critics_picks\.html/.test(nyt_path)
   && getQueryParameter("critic") != "") {
  subcontentGroup = "Critics Picks";
  pageType    = "Topic";
  pageSubType = "Critics";
} else if(/\/critics-picks\.html/.test(nyt_path)) {
  subcontentGroup = "Critics Picks";
  pageType    = "Section Front";
  pageSubType = "Subsection Front";
} else if(/\/critics-picks/.test(nyt_path)) { 
  subcontentGroup = "Critics Picks";
  pageType    = "Section Front";
  pageSubType = "Subsection Front";
} else if(/\/timespulse\.html/.test(nyt_path)) {
  subcontentGroup = "Times Pulse";
  pageType    = "Section Front";
  pageSubType = "Subsection Front";
  clearMoviesArticleTags();
} else if(/\/1000best\.html/.test(nyt_path)) {
  subcontentGroup = "1000";
  pageType    = "Section Front";
  pageSubType = "Subsection Front";
  clearMoviesArticleTags();
} else if(/\/homevideo\/index\.html/.test(nyt_path)) {
  subcontentGroup = "DVD";
  pageType    = "Section Front";
  pageSubType = "Subsection Front";
} else if(/\/shopping_cart\.html/.test(nyt_path)) {
  subcontentGroup = "Shopping Cart";
  pageType    = "Ecommerce";
  pageSubType = "Cart";
} else if(/\/continue_shopping\.html/.test(nyt_path)) {
  subcontentGroup = "Shopping Cart";
  pageType    = "Ecommerce";
  pageSubType = "Continue";
} else if(/\/boxoffice\/weekend_us\/index\.html/.test(nyt_path) ||
          /\/boxoffice\/alltime_us\/index\.html/.test(nyt_path) ||
          /\/boxoffice\/weekend_ny\/index\.html/.test(nyt_path) ||
          /\/boxoffice\/alltime_ny\/index\.html/.test(nyt_path) ||
          /\/boxoffice\/weekend_uk\/index\.html/.test(nyt_path) ||
          /\/boxoffice\/alltime_uk\/index\.html/.test(nyt_path)) {
  subcontentGroup = "Box Office";
  pageType    = "Reference";
  pageSubType = "Box Office";
} else if(/\/highlyrated\/alltime\/index\.html/.test(nyt_path) ||
          /\/highlyrated\/currentreleases\/index\.html/.test(nyt_path)) {
  pageType    = "Community";
  pageSubType = "Highest Rated";
  gcom        = "Com";
} //else {
	//subcontentGroup = "DAVE";
//}

overwriteMetaTag("WT.cg_s", subcontentGroup);
overwriteMetaTag("WT.z_gpt", pageType);
overwriteMetaTag("WT.z_gpst", pageSubType);
overwriteMetaTag("WT.gcom", gcom);

function clearMoviesArticleTags() {
  overwriteMetaTag("WT.z.gsg", "");
  overwriteMetaTag("WT.z_aid", "");
  overwriteMetaTag("WT.z_clmst", "");
  overwriteMetaTag("WT.z_gat", "");
  overwriteMetaTag("WT.z_hdl", "");
  overwriteMetaTag("WT.z_pua", "");
  overwriteMetaTag("WT.z_pud", "");
  overwriteMetaTag("WT.z_put", "");
  overwriteMetaTag("WT.z_puv", "");
}
