
	var DWSLocation = window.location.href;
	var DWSLocationIndex = DWSLocation.indexOf("portal/");

	var DWSLocationTrim = DWSLocation.substring(DWSLocationIndex+7,DWSLocation.length);
	
	
	
	
	
	if(DWSLocationTrim.indexOf("/") != -1)
	{
		DWSLocation = DWSLocationTrim.substring(0,DWSLocationTrim.indexOf("/"));
	}
	else if(DWSLocationTrim.indexOf("?") != -1)
	{
		DWSLocation = DWSLocationTrim.substring(0,DWSLocationTrim.indexOf("?"));
	}
	else
	{
		DWSLocation = DWSLocationTrim.substring(0,DWSLocationTrim.length);
	}
	
	
	
	


function getLocation()
{
	

	var logoImg = document.getElementById("logoimage");
	var centerImg = document.getElementById("center_image");


	var imagePath = logoImg.src + DWSLocation + ".gif";
    
	
	logoImg.setAttribute("src",imagePath);	
	
	if(DWSLocation == "bridgeway" || DWSLocation == "northcentral" || DWSLocation == "calpacific" || DWSLocation == "westerncanada" || DWSLocation == "rockymountain" || DWSLocation == "npower" )
	{
		var centerImagePath = centerImg.src + "DWS_" + DWSLocation + "_center.gif";		
	}
	else
	{
		var centerImagePath = centerImg.src + "center_block.jpg";
	}

	centerImg.setAttribute("src",centerImagePath);	

}

function setAuthor()
{

	var authorLink = document.getElementById("AuthorsLink");
	var AuthorsLinkFooter = document.getElementById("AuthorsLinkFooter");
	var DWSAuthorLocation = window.location.href;

	var DWSAuthorLocationIndex = DWSAuthorLocation.indexOf("portal/");

	var DWSAuthorTrim = DWSAuthorLocation.substring(0,DWSAuthorLocationIndex);
	
	var DWSAuthorURL = DWSAuthorTrim + "myportal/" + DWSLocation;

	if(authorLink != null)
	{

		authorLink.href=DWSAuthorURL;
		AuthorsLinkFooter.href=DWSAuthorURL;
	}

}

function setFooterText()
{
	
	

	var footerAddressDiv = document.getElementById("address_footer");
	
	if(DWSLocation == "EmployeePortal")
	{
		footerAddressDiv.innerHtml="Cummins EmployeePortal, LLC 21810 Clessie Court New Hudson, MI 48165.";
		footerAddressDiv.innerText="Cummins EmployeePortal, LLC 21810 Clessie Court New Hudson, MI 48165.";
		footerAddressDiv.textContent="Cummins EmployeePortal, LLC 21810 Clessie Court New Hudson, MI 48165.";
	}
	else if(DWSLocation == "bridgeway")
	{
		footerAddressDiv.innerHtml="Cummins Bridgeway, LLC 21810 Clessie Court New Hudson, MI 48165.";
		footerAddressDiv.innerText="Cummins Bridgeway, LLC 21810 Clessie Court New Hudson, MI 48165.";
		footerAddressDiv.textContent="Cummins Bridgeway, LLC 21810 Clessie Court New Hudson, MI 48165.";
	}
	else if(DWSLocation == "atlantic")
	{
		footerAddressDiv.innerHtml="Cummins Atlantic, LLC  11101 Nations Ford Road, Charlotte NC  28273.";
		footerAddressDiv.innerText="Cummins Atlantic, LLC  11101 Nations Ford Road, Charlotte NC  28273.";
		footerAddressDiv.textContent="Cummins Atlantic, LLC  11101 Nations Ford Road, Charlotte NC  28273.";			
	}
		else if(DWSLocation == "calpacific")
	{
		footerAddressDiv.innerHtml="Cummins Cal Pacific, LLC 1939 Deere Avenue Irvine, CA 92606.";
		footerAddressDiv.innerText="Cummins Cal Pacific, LLC 1939 Deere Avenue Irvine, CA 92606.";
		footerAddressDiv.textContent="Cummins Cal Pacific, LLC 1939 Deere Avenue Irvine, CA 92606.";
	}
	else if(DWSLocation == "centralpower")
	{
		footerAddressDiv.innerHtml="Cummins Central Power, LLC 10088 S 136th Street, Omaha, NE 68138.";
		footerAddressDiv.innerText="Cummins Central Power, LLC 10088 S 136th Street, Omaha, NE 68138.";
		footerAddressDiv.textContent="Cummins Central Power, LLC 10088 S 136th Street, Omaha, NE 68138.";
	}
		else if(DWSLocation == "crosspoint")
	{
		footerAddressDiv.innerHtml="Cummins Crosspoint, LLC 2601 Fortune Circle East Drive Suite 300C Indianapolis, IN 46241.";
		footerAddressDiv.innerText="Cummins Crosspoint, LLC 2601 Fortune Circle East Drive Suite 300C Indianapolis, IN 46241.";
		footerAddressDiv.textContent="Cummins Crosspoint, LLC 2601 Fortune Circle East Drive Suite 300C Indianapolis, IN 46241.";
	}
	else if(DWSLocation == "easterncanada")
	{
		footerAddressDiv.innerHtml="Cummins Eastern Canada LP, 7200 Trans-Canada Highway, Pointe-Claire, QC H9R 1C2.";
		footerAddressDiv.innerText="Cummins Eastern Canada LP, 7200 Trans-Canada Highway, Pointe-Claire, QC H9R 1C2.";	
		footerAddressDiv.textContent="Cummins Eastern Canada LP, 7200 Trans-Canada Highway, Pointe-Claire, QC H9R 1C2.";	
	}
	
	else if(DWSLocation == "estducanada")
	{
		footerAddressDiv.innerHtml="Cummins Est du Canada SEC. 7200 Autoroute Transcanadienne, Pointe-Claire, QC H9R 1C2";
		footerAddressDiv.innerText="Cummins Est du Canada SEC. 7200 Autoroute Transcanadienne, Pointe-Claire, QC H9R 1C2";
		footerAddressDiv.textContent="Cummins Est du Canada SEC. 7200 Autoroute Transcanadienne, Pointe-Claire, QC H9R 1C2";
	}
	else if(DWSLocation == "midsouth")
	{
		footerAddressDiv.innerHtml="Cummins Mid-South, LLC 3770 South Perkins Road, Memphis, TN 38118.";
		footerAddressDiv.innerText="Cummins Mid-South, LLC 3770 South Perkins Road, Memphis, TN 38118.";
		footerAddressDiv.textContent="Cummins Mid-South, LLC 3770 South Perkins Road, Memphis, TN 38118.";
	}
	else if(DWSLocation == "northeast")
	{
		footerAddressDiv.innerHtml="Cummins Northeast, Inc. 100 Allied Drive Dedham, MA 02026.";
		footerAddressDiv.innerText="Cummins Northeast, Inc. 100 Allied Drive Dedham, MA 02026.";
		footerAddressDiv.textContent="Cummins Northeast, Inc. 100 Allied Drive Dedham, MA 02026.";
	}
		else if(DWSLocation == "northwest")
	{
		footerAddressDiv.innerHtml="Cummins Northwest, LLC. 811 S.W. Grady Way Renton, WA 98055.";
		footerAddressDiv.innerText="Cummins Northwest, LLC. 811 S.W. Grady Way Renton, WA 98055.";
		footerAddressDiv.textContent="Cummins Northwest, LLC. 811 S.W. Grady Way Renton, WA 98055.";
	}
	else if(DWSLocation == "northcentral")
	{
		footerAddressDiv.innerHtml="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
		footerAddressDiv.innerText="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
		footerAddressDiv.textContent="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
	}
	else if(DWSLocation == "npower")
	{
		footerAddressDiv.innerHtml="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
		footerAddressDiv.innerText="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
		footerAddressDiv.textContent="Cummins NPower LLC 1600 Buerkle Road White Bear Lake, MN 55110.";
	}
	
		else if(DWSLocation == "southpower")
	{
		footerAddressDiv.innerHtml="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
		footerAddressDiv.innerText="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
		footerAddressDiv.textContent="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
	}
	else if(DWSLocation == "powersouth" )
	{
		footerAddressDiv.innerHtml="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
		footerAddressDiv.innerText="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
		footerAddressDiv.textContent="Cummins Power South, LLC 5125 Highway 85 Atlanta, GA 30349.";
	}	
	else if(DWSLocation == "powersystems")
	{
		footerAddressDiv.innerHtml="Cummins Power Systems, LLC 2727 Ford Road Bristol, PA 19007-6895.";
		footerAddressDiv.innerText="Cummins Power Systems, LLC 2727 Ford Road Bristol, PA 19007-6895.";	
		footerAddressDiv.textContent="Cummins Power Systems, LLC 2727 Ford Road Bristol, PA 19007-6895.";	
	}
		else if(DWSLocation == "rockymountain")
	{
		footerAddressDiv.innerHtml="Cummins Rocky Mountain, LLC - 390 Interlocken Crescent, Suite 200 - Broomfield, CO  80021.";
		footerAddressDiv.innerText="Cummins Rocky Mountain, LLC - 390 Interlocken Crescent, Suite 200 - Broomfield, CO  80021.";
		footerAddressDiv.textContent="Cummins Rocky Mountain, LLC - 390 Interlocken Crescent, Suite 200 - Broomfield, CO  80021.";
	}
	else if(DWSLocation == "southernplains")
	{
		footerAddressDiv.innerHtml="Cummins Southern Plains, Ltd. 600 N. Watson Road Arlington, TX 76011.";
		footerAddressDiv.innerText="Cummins Southern Plains, Ltd. 600 N. Watson Road Arlington, TX 76011.";
		footerAddressDiv.textContent="Cummins Southern Plains, Ltd. 600 N. Watson Road Arlington, TX 76011.";
	}
	else if(DWSLocation == "west")
	{
		footerAddressDiv.innerHtml="Cummins West, Inc. 14775 Wicks Blvd. San Leandro, CA 94577-6717.";
		footerAddressDiv.innerText="Cummins West, Inc. 14775 Wicks Blvd. San Leandro, CA 94577-6717.";
		footerAddressDiv.textContent="Cummins West, Inc. 14775 Wicks Blvd. San Leandro, CA 94577-6717.";
	}
	else if(DWSLocation == "westerncanada")
	{
		footerAddressDiv.innerHtml="Cummins Western Canada 18452 - 96th Avenue Surrey, BC V4N-3P8.";
		footerAddressDiv.innerText="Cummins Western Canada 18452 - 96th Avenue Surrey, BC V4N-3P8.";
		footerAddressDiv.textContent="Cummins Western Canada 18452 - 96th Avenue Surrey, BC V4N-3P8.";
	}
	else if(DWSLocation == "metropower")
	{
		footerAddressDiv.innerHtml="Cummins Metropower, Inc. 890 Zerega Avenue Bronx, NY 10473.";
		footerAddressDiv.innerText="Cummins Metropower, Inc. 890 Zerega Avenue Bronx, NY 10473.";
		footerAddressDiv.textContent="Cummins Metropower, Inc. 890 Zerega Avenue Bronx, NY 10473.";
	}	
	 
	

	
}

function setSearchText()
{
	var basicSearch = document.getElementById("search_text");
	var advSearch = document.getElementById("adv_search");
	var HomeLink = document.getElementById("HomeText");
	var HomeLinkFooter = document.getElementById("HomeTextFooter");
	var AuthorsLinkLoggedIn = document.getElementById("AuthorsLinkLoggedIn");	
	var AuthorLinkLoggedInFooter = document.getElementById("AuthorsLinkLoggedInFooter");
	var authorLink = document.getElementById("AuthorsLink");
	var AuthorsLinkFooter = document.getElementById("AuthorsLinkFooter");
	var PrivacyLink = document.getElementById("PrivacyLink");
	
		if(DWSLocation == "estducanada")	
		{
			if(basicSearch.value != null || basicSearch.value != "") 
			{
				basicSearch.value="Recherche";
				advSearch.innerText = "Recherche Avancee";
				advSearch.textContent = "Recherche Avancee";
				advSearch.title = "Recherche Avancee";
						
			}
				
				HomeLink.innerText = "Accueil";
				HomeLink.textContent = "Accueil";
				HomeLink.title = "Accueil";
				HomeLinkFooter.innerText = "Accueil";
				HomeLinkFooter.textContent = "Accueil";
				HomeLinkFooter.title = "Accueil";
				
				if(authorLink != null)
				{
					authorLink.innertText = "Auteurs";
					authorLink.textContent = "Auteurs";
					authorLink.title = "Auteurs";
					authorLink.innerHTML = "Auteurs";
					AuthorsLinkFooter.innertText = "Auteurs";
					AuthorsLinkFooter.textContent = "Auteurs";
					AuthorsLinkFooter.title = "Auteurs";
					AuthorsLinkFooter.innerHTML = "Auteurs";
				}
				if(AuthorsLinkLoggedIn != null)
				{
					AuthorsLinkLoggedIn.innertText = "Auteurs";
					AuthorsLinkLoggedIn.textContent = "Auteurs";
					AuthorsLinkLoggedIn.title = "Auteurs";
					AuthorsLinkLoggedIn.innerHTML = "Auteurs";
					AuthorLinkLoggedInFooter.innertText = "Auteurs";
					AuthorLinkLoggedInFooter.textContent = "Auteurs";
					AuthorLinkLoggedInFooter.title = "Auteurs";
					AuthorLinkLoggedInFooter.innerHTML = "Auteurs";
				}
				
				PrivacyLink.innertText = "Politique de Confidentialite et Conditions d'Utilisation et Avis de Non-Responsabilite";
				PrivacyLink.textContent = "Politique de Confidentialite et Conditions d'Utilisation et Avis de Non-Responsabilite";
				PrivacyLink.title = "Politique de Confidentialite et Conditions d'Utilisation et Avis de Non-Responsabilite";
				PrivacyLink.innerHTML = "Politique de Confidentialite et Conditions d'Utilisation et Avis de Non-Responsabilite";
	}
	
	if(DWSLocation != "estducanada")
	{
		if(basicSearch.value != null || basicSearch.value != "") 
		{
			basicSearch.value="Search";
			advSearch.innerText = "Advanced Search";
			advSearch.textContent = "Advanced Search";
			advSearch.title = "Advanced Search";
			advSearch.setAttribute("title","Advanced Search");
		}
	}
}

function setPageTitle()
{
	


	var footerAddressDiv = document.getElementById("address_footer");
	
	if(DWSLocation == "EmployeePortal")
	{
		document.title="Cummins EmployeePortal, LLC";
		
	}
	else if(DWSLocation == "bridgeway")
	{

		document.title="Cummins Bridgeway, LLC.";
		
	}
	else if(DWSLocation == "atlantic")
	{
		document.title="Cummins Atlantic, LLC.";		
	}
		else if(DWSLocation == "calpacific")
	{
		document.title="Cummins Cal Pacific, LLC";	
	}
	else if(DWSLocation == "centralpower")
	{
		document.title="Cummins Central Power, LLC.";	
	}
		else if(DWSLocation == "crosspoint")
	{
		document.title="Cummins Crosspoint, LLC.";
	}
	else if(DWSLocation == "easterncanada")
	{
		document.title="Cummins Eastern Canada LP.";
	}
	else if(DWSLocation == "estducanada")	
	{
		document.title="Cummins Est du Canada SEC.";
	}
	else if(DWSLocation == "midsouth")
	{
		document.title="Cummins Mid-South, LLC.";	
	}
	else if(DWSLocation == "northeast")
	{
		document.title="Cummins Northeast, Inc.";
	}
		else if(DWSLocation == "northwest")
	{
		document.title="Cummins Northwest, LLC.";
	}
	else if(DWSLocation == "northcentral")
	{
		document.title="Cummins NPower LLC.";
	}
		else if(DWSLocation == "southpower"  || DWSLocation == "powersouth" )
	{
		document.title="Cummins Power South, LLC.";
	}
	else if(DWSLocation == "powersystems")
	{
		document.title="Cummins Power Systems, LLC.";
	}
		else if(DWSLocation == "rockymountain")
	{
		document.title="Cummins Rocky Mountain, LLC.";
	}
	else if(DWSLocation == "southernplains")
	{
		document.title="Cummins Southern Plains, Ltd.";
	}
	else if(DWSLocation == "west")
	{
		document.title="Cummins West, Inc.";
	}
	else if(DWSLocation == "westerncanada")
	{
		document.title="Cummins Western Canada.";
	}
	else if(DWSLocation == "metropower")
	{
		document.title="Cummins Metropower, Inc.";
	}	
	else if(DWSLocation == "npower")
	{
		document.title="Cummins NPower LLC.";
	}
	
}

function setLayoutColumn()
{

		
	    var tableLC = document.getElementsByTagName('table');
        var tableLCLength = tableLC.length;

  
   

        for (var i=0; i<tableLCLength; i++)
          {
             if( tableLC[i].className == 'layoutColumn' )
              {
              		              		
              	tableLC[i].setAttribute('width','100%');
				tableLC.width = '100%';
              		
              }


          }  
          
}


