//number of links to be set
var x=12;

//preload images
if (document.images)
{
  pic1= new Image(10,50); 
  pic2= new Image(10,50); 
  pic3= new Image(10,50);
  pic4= new Image(10,50);
  pic5= new Image(1,1);
  pic6= new Image(1,1);
  pic1.src="/graphics/menu/left-off.gif"; 
  pic2.src="/graphics/menu/right-off.gif"; 
  pic3.src="/graphics/menu/left-on.gif";
  pic4.src="/graphics/menu/right-on.gif";
  pic5.src="/graphics/menu/nav-bg.gif";
  pic6.src="/graphics/menu/nav-bg-on.gif";
}

//tab headers
var containers=new Array("home","news","sports","biz","ent","lives","obits","class","jobs","autos","homes","market");

//link names
var home_names=new Array("Weather","Lottery","Multimedia","Podcasts","Blogs","Live Chats","Contact Us","Subscribe","Photo Store");
var news_names=new Array("SBT 24/7 News","Local","Elections","Community","Opinion","Nation/World","National Politics","Columnists","Special Reports","Multimedia","Talk About It","Send a News tip");
var sports_names=new Array("Notre Dame","High School","College Sports","Pro Sports","Irish Sports Report","Columnists","Latest Sports headlines","Blog: Far Afield");
var biz_names=new Array("Investor Center","Money Markets","Latest Business News","Columnists","Blog: Market Basket");
var ent_names=new Array("Latest Entertainment News","Movie Listings","TV Listings","Events Calendar","Submit your event","Blog: Reality Check");
var lives_names=new Array("Vows","Food","Faith","at Home","ourHealth","ourFamilies","Quests","Submit announcement");
var obits_names=new Array();
var class_names=new Array("Search Classifieds","Place an Ad","Deadlines","Rates","Contact Us");
var jobs_names=new Array("Search Jobs","Top Jobs","JobMatch TV","Place an Ad");
var autos_names=new Array();
var homes_names=new Array();
var market_names=new Array("Bookstore &amp; Gift Shop","Today's Ads","SBTPhoto Store","Coupons","Advertise with us");

//link addresses
var home_links=new Array("http://www.wsbt.com/weather","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=LOTTERY","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=GALLERYARCHIVE","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=PODCASTS","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=BLOGS","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=CHAT","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=CONTACT","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=OTHER6","http://pictopia.com/perl/gal?provider_id=525");
var news_links=new Array("http://www.southbendtribune.com/apps/pbcs.dll/section?category=247news","http://www.southbendtribune.com/apps/pbcs.dll/section?category=NEWS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=ELECTIONS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=COMMUNITY","http://www.southbendtribune.com/apps/pbcs.dll/section?category=OPINION","http://www.southbendtribune.com/apps/pbcs.dll/section?category=apnationworld","http://www.southbendtribune.com/apps/pbcs.dll/section?category=appolitics","http://www.southbendtribune.com/apps/pbcs.dll/section?category=COLUMNISTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=REPORTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=GALLERYARCHIVE","http://www.southbendtribune.com/apps/pbcs.dll/news_themes?Category=PHPForums&ShowGroups=1","http://www.southbendtribune.com/apps/pbcs.dll/frontpage#newstip");
var sports_links=new Array("http://www.southbendtribune.com/apps/pbcs.dll/section?category=NOTREDAME","http://www.southbendtribune.com/apps/pbcs.dll/section?category=HIGHSCHOOL","http://www.southbendtribune.com/apps/pbcs.dll/section?category=COLLEGE","http://www.southbendtribune.com/apps/pbcs.dll/section?category=approsports","http://www.irishsportsreport.com","http://www.southbendtribune.com/apps/pbcs.dll/section?category=COLUMNISTS","http://hosted.ap.org/dynamic/fronts/SPORTS?SITE=INSBT&SECTION=SPORTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=BLOGS12");
var biz_links=new Array("http://hosted.ap.org/dynamic/files/static/moneywire-basic/dc_tables/mwh.html?SITE=INSBT&SECTION=HOME&TEMPLATE=DEFAULT","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=BIZ#moneymarkets","http://hosted.ap.org/dynamic/fronts/BUSINESS?SITE=INSBT&SECTION=BUSINESS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=COLUMNISTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=BLOGS06");
var ent_links=new Array("http://hosted.ap.org/dynamic/fronts/ENTERTAINMENT?SITE=INSBT&SECTION=ENTERTAINMENT","http://www.southbendtribune.com/apps/pbcs.dll/section?category=ENT10","http://affiliate.zap2it.com/zp/?aid=sbt","http://www.southbendtribune.com/apps/pbcs.dll/events?Category=EVENTS","http://www.southbendtribune.com/apps/pbcs.dll/eventsadd?Category=EVENTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=BLOGS13");
var lives_links=new Array("http://www.southbendtribune.com/apps/pbcs.dll/section?category=VOWS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=FOOD","http://www.southbendtribune.com/apps/pbcs.dll/section?category=LIVES#faith","http://www.southbendtribune.com/apps/pbcs.dll/section?category=LIVES#athome","http://www.southbendtribune.com/apps/pbcs.dll/section?category=LIVES#ourhealth","http://www.southbendtribune.com/apps/pbcs.dll/section?category=LIVES#ourfamilies","http://www.southbendtribune.com/apps/pbcs.dll/section?category=QUESTS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=VOWS#forms");
var obits_links=new Array();
var class_links=new Array("http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSIFIEDS","http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSAD1","http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSINFO3","http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSINFO5","http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSINFO1");
var jobs_links=new Array("http://www.thejobnetwork.com/goToSearch.asp?FieldId=&CityID=&keyword=&AffiliateId=749&isInternal=&Managerial=","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=TOPADS","http://www.digitalmediacommunications.com/cgi-bin/southbend/ad.pl?ad_num=alljobs","http://www.southbendtribune.com/apps/pbcs.dll/section?category=CLASSAD1");
var autos_links=new Array();
var homes_links=new Array();
var market_links=new Array("http://www2.southbendtribune.com/bookstore/index.php","http://www.southbendtribune.com/apps/pbcs.dll/section?category=TODAYSADS","http://pictopia.com/perl/gal?provider_id=525","http://www.boodle.com/cgi-bin/valuecenter.cgi?config=SCHSOUTHBEND","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=OTHER3");

function changeThis(a){
	getMenuID = a.id.split('_');
	MenuID=getMenuID[1];
	namesArray=eval(MenuID + '_names');
	linksArray=eval(MenuID + '_links');
	i=0;
	menuAlign=document.getElementById('mainsub');
	if (MenuID=="market"||MenuID=="class"||MenuID=="jobs"||MenuID=="autos"||MenuID=="homes")
	{
		menuAlign.style.textAlign="right";
	} else menuAlign.style.textAlign="left";

	i=0;
	while (i<x)
	{
		menuOff=document.getElementById('nav_'+containers[i]);
		if (menuOff.className=="menutext_on")
		{
			menuOff.className = "menutext_off";
		}
		cLink=eval("document.getElementById('sublink"+i+"');");
		cSpan=eval("document.getElementById('subspan"+i+"');");
		if ((!namesArray[i])||(namesArray[i]==""))
		{
			cLink.innerHTML="";
			cLink.href="";
			cLink.className="menusublinkhid";
			if (i>0)
			{
				cSpan.innerHTML="";
				cSpan.className="menusublinkhid";
			}
		} else {
			if (linksArray[i].indexOf('hosted.ap.org')!=-1||linksArray[i].indexOf('affiliate.zap2it')!=-1||linksArray[i].indexOf('www.southbendtribune.com')!=-1)
			{
				cLink.target="_top";
			} else cLink.target="_new";
			cLink.innerHTML=namesArray[i];
			cLink.href=linksArray[i];
			cLink.className="menusublink";
			if (i>0)
			{
				if (document.all)
				{
					cSpan.innerHTML="|";
				} else cSpan.innerHTML="|&nbsp;";
				cSpan.className="menusublink";
			}
		}
		i++;
	}
	a.className = "menutext_on";
}