
var targetSection = 'default';

function go(href) {
	href += targetSection + '.html';
	window.location = href;
	return false;
}

function getTargetSection() {
	var s = document.referrer;
	s = document.location.hostname;
	
	if(s.indexOf('globalbusiness') > -1) 
		targetSection = 'global-business';
	else if(s.indexOf('smallbusiness') > -1) 
		targetSection = 'small-business';
	else if(s.indexOf('globalshipping') > -1) 
		targetSection = 'global-shipping';
	else if(s.indexOf('reliableshipping') > -1) 
		targetSection = 'default';
	else if(s.indexOf('inventorycontrol') > -1) 
		targetSection = 'inventory-control';
	else if(s.indexOf('supplychainsolutions') > -1) 
		targetSection = 'supply-chain';
	else if(s.indexOf('cashflowservices') > -1) 
		targetSection = 'cash-flow';
	else {

		s = s.replace('www.','');

		switch(s) {

			case 'globalbusiness.ups.com':
			case 'businessglobale.ups.it':
			case 'globalbusiness.ups.com':
			case 'wereldwijdzakendoen.ups.nl':
			case 'tbc':
			case 'tbc':
				targetSection = 'global-business'; 
				break;

			case 'smallbusiness.ups.com':
			case 'piccoleimprese.ups.it ':
			case 'mindrevirksomheder.ups.com':
			case 'mkb.ups.nl':
			case 'kleineunternehmen.ups.ch':
			case 'petitesentreprises.ups.ch':
				targetSection = 'small-business';
				break;

			case 'globalshipping.ups.com ':
			case 'spedizioniglobali.ups.it':
			case 'globalshipping.ups.com':
			case 'wereldwijdverzenden.ups.nl':
			case 'globalerversand.ups.ch':
			case 'envoisdanslemondeentier.ups.ch':
				targetSection = 'global-shipping';
				break;
			
			case 'supplychainsolutions.ups.com':
			case 'supplychain.ups.it':
			case 'supplychainsolutions.com':
			case 'supplychainsolutions.ups.nl':
			case 'supplychainsolutions.ch':
			case 'solutionsd’approvisionnement.ups.ch':
				targetSection = 'supply-chain';
				break;

			case 'reliableshipping.ups.com':
			case 'spedizionisicure.ups.it':
			case 'reliableshipping.ups.com':
			case 'betrouwbareverzending.ups.nl':
			case 'zuverlaessigerversand.ups.ch':
			case 'envoisfiables.ups.ch':
				targetSection = 'default';
				break;
		
			case 'inventorycontrol.ups.com':
			case 'magazzino.ups.it':
			case 'lagerstyring.ups.com':
			case 'voorraadbeheer.ups.nl':
			case 'inventarkontrolle.ups.ch':
			case 'contrôleinventaire.ups.ch':
				targetSection = 'inventory-control';
				break;

			case 'cashflowservices.ups.com':
			case 'flussodicassa.ups.it':
			case 'cashflowservices.ups.com':
			case 'cashflowservices.ups.nl':
			case 'cashflowservices.ups.ch':
			case 'servicescashflow.ups.ch':
				targetSection = 'cash-flow';
				break;

		
		}
	}
	
}


window.onload=getTargetSection;


