//configuration
OAS_version = 11;
presplit = location.href.toUpperCase();
OAS_url = 'http://ads.southbendtribune.com/RealMedia/ads/';tmpurl = 'www.southbendtribune.com/';cat1="0";cat2="0";tmpurl2="";splittmp2="";
splittmp1=presplit.split("/APPS/PBCS.DLL/"); //Split URL for page detection
if (!splittmp1[1]){splittmp1=presplit.split(".COM/");} //check to see if it's under pbs, if not, set the variable to avoid errors
sbtst = splittmp1[1].toUpperCase(); //Uppercase everything for simpler detection
test1 = presplit.split("AID=/");
if (!test1[1]){
	if (sbtst.indexOf('FRONTPAGE') != -1){tmpurl2="HOME";cat1="0";}}//check to see if its the home page
if (tmpurl2!="HOME"){splittmp2=presplit.split("CATEGORY=");cat1="1";tmpurl2=splittmp2[1];//if not home page, split url for section front detection
if (!splittmp2[1]){splittmp3 = presplit.split("AID=/");cat1="2";tmpurl2=splittmp3[1]; //if it's not a section front, mark it as story
if (!splittmp3[1]){cat1="3";tmpurl2=splittmp1[1];}}}
if (cat1 !="3"){tmpurl2 = tmpurl2.toUpperCase();}else{
	if (tmpurl2.indexOf("NETGUEST") != -1){tmpurl2="CHATS";cat2="2";} else tmpurl2 = "OTHER";} //if it is static, it's "OTHER"
if (cat1=="1"){cat2="1";
//if (tmpurl2.indexOf("GALLERY") != -1){tmpurl2="GALLRY";cat2="2";}
	if (tmpurl2.indexOf("REALESTATE") != -1){tmpurl2="REALESTATE";cat2="2";}
	if (tmpurl2=="NEWS01"){tmpurl2="LOCL";cat2="2";}
	if (tmpurl2=="NEWS03"){tmpurl2="NATION";cat2="2";}
	if (tmpurl2.indexOf("NEWS04") != -1){tmpurl2="COMM";cat2="2";}
	if (tmpurl2=="SPORTS10"){tmpurl2="COLSPRTS";cat2="2";}
	if (tmpurl2=="SPORTS11"){tmpurl2="HSSPRTS";cat2="2";}
	if (tmpurl2=="SPORTS12"){tmpurl2="PROSPRTS";cat2="2";}
	if (tmpurl2=="SPORTS13"){tmpurl2="NDSPRTS";cat2="2";}
	if (tmpurl2.indexOf("COLLSPORTS") != -1){tmpurl2="COLSPRTS";cat2="2";}
	if (tmpurl2.indexOf("HSSPORTS") != -1){tmpurl2="HSSPRTS";cat2="2";}
	if (tmpurl2.indexOf("NDSPORTS") != -1){tmpurl2="NDSPRTS";cat2="2";}
	if (tmpurl2.indexOf("PROSPORTS") != -1){tmpurl2="PROSPRTS";cat2="2";}
	if (tmpurl2.indexOf("SPORTS") != -1){tmpurl2="SPRTS";cat2="2";}
	if (tmpurl2.indexOf("ENT09") != -1){tmpurl2="IDOL";cat2="2";}
	if ((tmpurl2.indexOf("ENT") != -1)&&(cat2!="2")&&(tmpurl2.indexOf("EVENTS") == -1)){tmpurl2="ENT";cat2="2";}
	if (tmpurl2.indexOf("LIVES") != -1){tmpurl2="LIVES";cat2="2";}
	if (tmpurl2.indexOf("OPIN") != -1){tmpurl2="OPIN";cat2="2";}
	if (tmpurl2.indexOf("BIZ") != -1){tmpurl2="BIZ";cat2="2";}
	if (tmpurl2.indexOf("OBITS") != -1){tmpurl2="VITAL";cat2="2";}
	if (tmpurl2.indexOf("VITAL") != -1){tmpurl2="VITAL";cat2="2";}
	if (tmpurl2.indexOf("CONTACT") != -1){tmpurl2="CONTACT";cat2="2";}
	if (tmpurl2.indexOf("NEWS") != -1){tmpurl2="NEWS";cat2="2";}
	if (tmpurl2.indexOf("CHAT") != -1){tmpurl2="CHATS";cat2="2";}
	if (tmpurl2.indexOf("NDSIGN") != -1){tmpurl2="NDSIGN";cat2="2";}
	if (tmpurl2.indexOf("ENT0401") != -1){tmpurl2="ENT0401";cat2="2";}}
else if (cat1=="2"){cat2="1";
	if (tmpurl2.indexOf("UPDATES") != -1){tmpurl2="247news";cat2="2";}
	if (tmpurl2.indexOf("REALESTATE") != -1){tmpurl2="REALESTATE";cat2="2";}
	if (tmpurl2.indexOf("NEIGHBORHOOD") != -1){tmpurl2="NHSTRY";cat2="2";}
	if (tmpurl2.indexOf("ISR") != -1){tmpurl2="ISRSTRY";cat2="2";}
	if (tmpurl2.indexOf("NEWS01") != -1){tmpurl2="LOCLSTRY";cat2="2";}
	if (tmpurl2.indexOf("NEWS03") != -1){tmpurl2="NATIONSTRY";cat2="2";}
	if (tmpurl2.indexOf("NEWS04") != -1){tmpurl2="COMMSTRY";cat2="2";}
	if (tmpurl2.indexOf("SPORTS10") != -1){tmpurl2="COLSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("SPORTS11") != -1){tmpurl2="HSSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("SPORTS12") != -1){tmpurl2="PROSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("SPORTS13") != -1){tmpurl2="NDSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("NEWS") != -1){tmpurl2="NEWSSTRY";cat2="2";}
	if (tmpurl2.indexOf("COLLSPORTS") != -1){tmpurl2="COLSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("HSSPORTS") != -1){tmpurl2="HSSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("NDSPORTS") != -1){tmpurl2="NDSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("PROSPORTS") != -1){tmpurl2="PROSPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("SPORTS") != -1){tmpurl2="SPRTSSTRY";cat2="2";}
	if (tmpurl2.indexOf("ENT09") != -1){tmpurl2="IDOLSTRY";cat2="2";}
	if ((tmpurl2.indexOf("ENT") != -1)&&(cat2!="2")){tmpurl2="ENTSTRY";cat2="2";}
	if (tmpurl2.indexOf("LIVES") != -1){tmpurl2="LIVESSTRY";cat2="2";}
	if (tmpurl2.indexOf("OPIN") != -1){tmpurl2="OPINSTRY";cat2="2";}
	if (tmpurl2.indexOf("BIZ") != -1){tmpurl2="BIZSTRY";cat2="2";}
	if (tmpurl2.indexOf("OBITS") != -1){tmpurl2="VITALSTRY";cat2="2";}
	if (tmpurl2.indexOf("VITAL") != -1){tmpurl2="VITALSTRY";cat2="2";}
	if (tmpurl2.indexOf("ENT0401") != -1){tmpurl2="ENT0401";cat2="2";}}

if (tmpurl2 != "HOME"){if (cat2 != "2"){tmpurl2="OTHER";}} //anything else
if (tmpurl2=="OTHER"){
	cat1="1";
	if (presplit.indexOf('LEGACY.COM')!=-1)
	{
		tmpurl2='VITAL';
	}
}
OAS_sitepage = (tmpurl + tmpurl2); //create final URL for adstream
if (cat1=="1"){OAS_listpos = 'Frame1,TopRight,Top,Right,Middle,Position1,Position2,Position3,Position4,Bottom,Bottom1,Bottom2,Bottom3,x90,x01,x02,x03,x04,x05,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,Frame2';}//Section front ad positions
else if (cat1=="2"){OAS_listpos = 'Frame1,TopRight,Top,Right,Middle,Position1,Position2,Position3,Position4,Bottom,Bottom1,Bottom2,Bottom3,x90,x01,x02,x03,x04,x05,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,Frame2';}//Story ad positions
else {OAS_listpos = 'Frame1,TopRight,Middle,Right,Position1,Position2,Position3,Position4,Bottom,Bottom1,Bottom2,Bottom3,x90,x01,x02,x03,x04,x05,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,Frame2';}//home page ad positions
OAS_query = '';OAS_target = '_top';//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);
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>');
}

//if ((navigator.userAgent.indexOf('Mozilla/3') != -1) || (navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1))

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);
}
