function OpenWin(U,N,W,H,A,F,L,T,C){
  //args Url(r),Name(r),Width(opt),Height(opt),Attributes(opt),Focus(opt),Left(opt),Top(opt),Center(opt)
  var WO,WA=new Array(),a=new Array("directories","location","menubar","resizable","scrollbars","status","titlebar","toolbar")
  A=(A)?"".concat(A):"on"
  for(i=0;i<a.length;i++){;WA[WA.length]=a[i]+"="+((A.indexOf(a[i].substring(0,2))>-1||A=="on")?"yes":"no");}
  if(W){;WA[WA.length]="width="+W;}
  if(H){;WA[WA.length]="height="+H;}
  if(C&&W&&H){;T=(screen.height-H)/2;L=(screen.width-W)/2;}
  if(L){;WA[WA.length]="left="+L;WA[WA.length]="screenX="+L;}
  if(T){;WA[WA.length]="top="+T;WA[WA.length]="screenY="+T;}
  A=(WA.length)?WA.join(","):""
  WO=window.open(U,N,A)
  if(F&&WO){;WO.focus();}
}

function setVarsInit(){
  //configuration
//  var Keyword;
  OAS_url      = 'http://oascentral.bostonherald.com/RealMedia/ads/';
  OAS_sitepage = Page;
  OAS_listpos  = Positions;
  if (typeof Keyword == 'undefined') {
    OAS_query = ''; 
  } else { 
    OAS_query = Keyword; 
//    document.write('*');
  }

  var result   = Page.match(/(.*)\/(.*)\/(.*$)/);
  if (result != null) { var basePage = result[1] +"/"+ result[2]; } else { var basePage = Page; }

  // BOSTONHERALD.COM featured links // Add new basePage with temporary tags
     //  if (basePage == "www.bostonherald.com/news")                { OAS_listpos = OAS_listpos + ",Left,Left1,Left2,Left3"; }
     //  if (basePage == "www.bostonherald.com/entertainment")       { OAS_listpos = OAS_listpos + ",Left,Left1"; }
     //  if (basePage == "www.bostonherald.com/business")            { OAS_listpos = OAS_listpos + ",Left"; }
     //  if (basePage == "www.bostonherald.com/inside_track")        { OAS_listpos = OAS_listpos + ",Left"; }
     //  if (basePage == "www.bostonherald.com/sports")              { OAS_listpos = OAS_listpos + ",Left"; }


   // TOL DAILIES FEATURED LINKS // FOR EXTREMELY GENERAL //
       var tolAll  = Page.match(/(www\.townonline\.com)\/.*$/);             if (tolAll != null) { OAS_listpos = OAS_listpos + ",Left,Left1,Left2"; }
   //  var tolPnK  = Page.match(/(www\.townonline\.com\/parentsandkids)/);  if (tolPnK != null) { OAS_listpos = OAS_listpos + ",x04"; }
       var mwdAll  = Page.match(/(www\.metrowestdailynews\.com)\/.*$/);  if (mwdAll != null) { OAS_listpos = OAS_listpos + ",Left,Left1,Left2"; }
       var mdnAll  = Page.match(/(www\.milforddailynews\.com)\/.*$/);    if (mdnAll != null) { OAS_listpos = OAS_listpos + ",Left,Left1,Left2"; }
       var dntAll  = Page.match(/(www\.dailynewstribune\.com)\/.*$/);    if (dntAll != null) { OAS_listpos = OAS_listpos + ",Left,Left1,Left2"; }
       var nvdAll  = Page.match(/(www\.dailynewstranscript\.com)\/.*$/); if (nvdAll != null) { OAS_listpos = OAS_listpos + ",Left,Left1,Left2"; }
       var ldiAll  = Page.match(/(www\.thedailyitemoflynn\.com)\/.*$/);  if (ldiAll != null) { OAS_listpos = OAS_listpos + ",Left"; }
  
  //  document.write(basePage);
  //  document.write(OAS_listpos);

  // For Full Domain Matching; Simply Comment out a line when not appropriate
  
  // FOR A SPECIFIC PAGE // THIS STILL CALLS ON STORY PAGES AND INDEX PAGES 

    //   var bhNews  = Page.match(/(www\.bostonherald\.com\/news\/local_regional)/);    if (bhNews != null)   { OAS_listpos = OAS_listpos + ",x30"; }

    //   var bhBusi  = Page.match(/(www\.bostonherald\.com\/business\/business)/);      if (bhBusi != null)   { OAS_listpos = OAS_listpos + ",x30"; }

    //   var bhSpor  = Page.match(/(www\.bostonherald\.com\/sports\/home)/);            if (bhSpor != null) { OAS_listpos = OAS_listpos + ",x05"; }

       var bhTrak  = Page.match(/(www\.bostonherald\.com\/inside_track\/home)/);      if (bhTrak != null) { OAS_listpos = OAS_listpos + ",x05,x96"; }
              
    //   var bhEdge  = Page.match(/(www\.bostonherald\.com\/entertainment\/home)/);     if (bhEdge != null) { OAS_listpos = OAS_listpos + ",x05"; }

 


//  OAS_query = ''; // Commented out 2/23/2005 by Bill Gaffney testing passing of keywords and keynames
  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>');
}


