
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	declare global variables
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

	
	var iAmTesting = false;

	var currentUrl = "";
	var currentUrlBits = "";
	var currentFile = "";
	var currentPageName = "";
	var currentDirectory = "";
	
	var pageContent = "";

	
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	parse url
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/


	currentUrl = self.location.href;
	currentUrlBits = currentUrl.split('/');

	currentFile = currentUrlBits[currentUrlBits.length-1];
	currentPageName = currentFile.split('.')[0];
	currentDirectory = currentUrlBits[currentUrlBits.length-2];
	
	//=-=-=-=-=-= alerts for testing =-=-=-=-=-=
	
	if (iAmTesting)
		{
		alert ('currentFile = ' + currentFile);
		alert ('currentPageName = ' + currentPageName);
		alert ('currentDirectory = ' + currentDirectory);
		}
	
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	set navigation links
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

	var navContent00;
	var navContent01;
	var navContent02;
	var navContent03;
	var navContent04;
	var navContent05;
	var navContent06;
	var navContent07;
	var navContent08;

	
	navContent00 = '<div class="navigationBox"></div>';
	navContent01 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/tk_cms_index.htm" class="linkSmallWhiteBold">Home</a></div>';
	navContent02 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/about_us/tk_cms_about.htm" class="linkSmallWhiteBold">About Us</a></div>';
	navContent03 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/retail/tk_cms_retail.htm" class="linkSmallWhiteBold">Retail</a></div>';
	navContent04 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/foodservice/tk_cms_food.htm" class="linkSmallWhiteBold">Foodservice</a></div>';
	navContent05 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/about_us/tk_cms_about_loc.htm" class="linkSmallWhiteBold">Locations</a></div>';
	navContent06 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/brands/tk_cms_brands.htm" class="linkSmallWhiteBold">Brands</a></div>';
	navContent07 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/careers/tk_cms_careers.htm" class="linkSmallWhiteBold">Employment Opportunities</a></div>';
	navContent08 = '<div class="navigationBoxOff"><a href="http://www.cargillmeatsolutions.com/contacts/tk_cms_contacts.htm" class="linkSmallWhiteBold">Contact Us</a></div>';


/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	evaluate xDepartment tag
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

	switch (currentPageName)
		{
		case 'tk_cms_index':
			navContent01 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/tk_cms_index.htm" class="linkSmallWhiteBold">Home</a></div>';
		break;
		
		case '':
			navContent01 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/tk_cms_index.htm" class="linkSmallWhiteBold">Home</a></div>';
		break;
		
		case 'tk_cms_about':
		case 'tk_cms_about_loc':
		case 'tk_cms_about_loc_beef':
		case 'tk_cms_about_loc_case':
		case 'tk_cms_about_loc_food':
		case 'tk_cms_about_loc_meat':
		case 'tk_cms_about_loc_pork':
		case 'tk_cms_about_loc_sales':
		case 'tk_cms_about_loc_intl':
		case 'tk_cms_about_hist':
		case 'tk_cms_about_proc':
		case 'tk_cms_about_vdi':
		case 'tk_cms_about_bus':
			navContent02 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/about_us/tk_cms_about.htm" class="linkSmallWhiteBold">About Us</a></div>';
		break;
		
		case 'tk_cms_retail':
			navContent03 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/retail/tk_cms_retail.htm" class="linkSmallWhiteBold">Retail</a></div>';
		break;
		
		case 'tk_cms_food':
			navContent04 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/foodservice/tk_cms_food.htm" class="linkSmallWhiteBold">Foodservice</a></div>';
		break;
		
		case 'tk_cms_about_loc':
		navContent05 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/about_us/tk_cms_about_loc.htm" class="linkSmallWhiteBold">Locations</a></div>';
		break;
		
		case 'tk_cms_brands':
		case 'tk_cms_brands_angus':
		case 'tk_cms_brands_excel':
		case 'tk_cms_brands_honey':
		case 'tk_cms_brands_prairie':
		case 'tk_cms_brands_shady':
		case 'tk_cms_brands_sterling':
		case 'tk_cms_brands_tender':
		case 'tk_cms_brands_circle':
		case 'tk_cms_brands_berkshire':
		case 'tk_cms_brands_preferred':
		case 'tk_cms_brands_tender_ridge':
		case 'tk_cms_brands_ranchers_r':
		case 'tk_cms_brands_meadlowland':
		case 'tk_cms_brands_valley':
			navContent06 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/brands/tk_cms_brands.htm" class="linkSmallWhiteBold">Brands</a></div>';
		break;
		
		case 'tk_cms_careers':
			navContent07 = '<div class="navigationBoxOn"><a href="http://www.cargillmeatsolutions.com/careers/tk_cms_careers.htm" class="linkSmallWhiteBold">Employment Opportunities</a></div>';
		break;
		
		case 'tk_cms_contacts':
			navContent08 = '<div class="navigationBoxOn"><a href="hhttp://www.cargillmeatsolutions.com/contacts/tk_cms_contacts.htm" class="linkSmallWhiteBold">Contact Us</a></div>';
		break;
				
		default:
			// all links stay black
		break;
		}
		
		
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// write navigation links
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


document.write(navContent00 + navContent01 + navContent02 + navContent03 + navContent04 + navContent05 + navContent06 + navContent07 + navContent08);