
function setVarsInit(){
  //configuration
  OAS_url      = 'http://oascentral.bostonherald.com/RealMedia/ads/';
  OAS_sitepage = Page;
  OAS_listpos  = Positions;
  var result   = Page.match(/(.*)\/(.*)\/(.*$)/);
  if (result != null) { var basePage = result[1] +"/"+ result[2]; } else { var basePage = Page; }

  // Add new basePage with temporary tags
  if (basePage == "www.bostonherald.com/news") { OAS_listpos = OAS_listpos + ",Left1,Left2,Left3,x02,x03"; }
  if (basePage == "www.bostonherald.com/sports") { OAS_listpos = OAS_listpos + ",x01,Left1"; }
  if (basePage == "www.bostonherald.com/entertainment") { OAS_listpos = OAS_listpos + ",Left1,Left2"; }

  // For Full Domain Matching; Simply Comment out a line when not appropriate
  var tolAll  = Page.match(/(www\.townonline\.com)\/.*$/);          if (tolAll != null) { OAS_listpos = OAS_listpos + ",x01"; }
  var mwdAll  = Page.match(/(www\.metrowestdailynews\.com)\/.*$/);  if (mwdAll != null) { OAS_listpos = OAS_listpos + ",x01,x02"; }
  var mdnAll  = Page.match(/(www\.milforddailynews\.com)\/.*$/);    if (mdnAll != null) { OAS_listpos = OAS_listpos + ",x01,x02"; }
  var dntAll  = Page.match(/(www\.dailynewstribune\.com)\/.*$/);    if (dntAll != null) { OAS_listpos = OAS_listpos + ",x01,x02"; }
  var nvdAll  = Page.match(/(www\.dailynewstranscript\.com)\/.*$/); if (nvdAll != null) { OAS_listpos = OAS_listpos + ",x01,x02"; }
  var ldiAll  = Page.match(/(www\.thedailyitemoflynn\.com)\/.*$/);  if (ldiAll != null) { OAS_listpos = OAS_listpos + ",x01,x02"; }

  // Pattern Match for TownOnline News Home Pages
  //   When campaign is complete remove '/,Right2' from inside the quotes 
  var tolHome  = Page.match(/www\.townonline\.com\/(.*)\/news\/home/);
  if (tolHome != null) { OAS_listpos = OAS_listpos + ",Right2"; }

  OAS_query = '';
  OAS_target = '_blank';
  //end of configuration

  OAS_version = 10;
  OAS_rn = '001234567890'; OAS_rns = '1234567890';
  OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);

  OAS_version = 11;
  if (navigator.userAgent.indexOf('Mozilla/3') != -1 || navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1)
    OAS_version = 10;
  if (OAS_version >= 11)
    document.write('<SCR' + 'IPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '?' + OAS_query + '"><\/SCRIPT>');//-->

  document.write('');
}

function OAS_AD(pos) {
  if (OAS_version >= 11)
    OAS_RICH(pos);
  else
    OAS_NORMAL(pos);
}

function OAS_NORMAL(pos) {
  document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" TARGET=' + OAS_target + '>');
  document.write('<IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" BORDER=0></A>');
}

