//number of links to be set
var linkCnt=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="/southbendtribune/main/art/left-off.gif"; 
  pic2.src="/southbendtribune/main/art/right-off.gif"; 
  pic3.src="/southbendtribune/main/art/left-on.gif";
  pic4.src="/southbendtribune/main/art/right-on.gif";
  pic5.src="/southbendtribune/main/art/nav-bg.gif";
  pic6.src="/southbendtribune/main/art/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 &amp; Traffic","Lottery","Multimedia","Podcasts","Blogs","Live Chats","Contact Us","Subscribe","Photo Store","Text Alerts");
var news_names=new Array("SBT 24/7 News","Local","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","Sports Fest","Golf");
var biz_names=new Array("Money Markets","Latest Business News","Columnists","Blog: Market Basket","Business Bios","Tribune Business Weekly");
var ent_names=new Array("Latest Entertainment News","Movie Listings","TV Listings","Events Calendar","Submit your event","IN Michiana","InTheBend.com","Games","Polls and Puzzles");
var lives_names=new Array("MichianaBrides.com","Food","Faith","at Home","ourHealth","ourFamilies","Quests","View Celebrations","Submit Celebrations","IN Michiana","InTheBend.com","Pets");
var obits_names=new Array();
var class_names=new Array("Submit Celebrations","Search Classifieds","Place an Ad","Deadlines","Contact Us","Pets");
//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","Jobs at the Tribune");
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.southbendtribune.com/apps/pbcs.dll/section?category=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","http://my.textcaster.com/ServePopup.aspx?id=1491");
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=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.sportsfest.net","http://www.southbendtribune.com/apps/pbcs.dll/section?CATEGORY=GOLF");
var biz_links=new Array("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","http://www.southbendtribune.com/bizbio/index.html","http://www.southbendtribune.com/apps/pbcs.dll/section?category=TBW");
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=INMICHIANA","http://www.inthebend.com","http://www.southbendtribune.com/apps/pbcs.dll/section?category=GAMES","http://www.southbendtribune.com/apps/pbcs.dll/section?category=POLLS");
var lives_links=new Array("http://www.michianabrides.com","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=celebrate","http://www.southbendtribune.com/apps/pbcs.dll/section?category=celebrateEntry","http://www.southbendtribune.com/apps/pbcs.dll/section?category=INMICHIANA","http://www.inthebend.com","http://www.gadzoo.com/southbendtribune/pets.aspx");
var obits_links=new Array();
var class_links=new Array("http://www.southbendtribune.com/apps/pbcs.dll/section?category=celebrateEntry","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=CLASSINFO1","http://www.gadzoo.com/southbendtribune/pets.aspx");
//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","http://www.thejobnetwork.com/goToSearch.asp?AffiliateId=749&isInternal=&ExtCompanyId=5742356000");
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://print.coupons.com/couponweb/Offers.aspx?pid=13432&zid=iq39&nid=10","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<linkCnt)
	{
		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";
}

