function detect_vis(){
	cust_stat = document.getElementById('custom_shapes').style.display;
	tech_stat = document.getElementById('technology').style.display;
	env_stat = document.getElementById('environment').style.display;
	care_stat = document.getElementById('care').style.display;
	
	if(cust_stat == 'block'){
		return 'custom_shapes';
	}
	
	if(tech_stat == 'block'){
		return 'technology';
	}
	
	if(env_stat == 'block'){
		return 'environment';
	}
	
	if(care_stat == 'block'){
		return 'care';
	}
}

function detect_vis2(){
	custs_stat = document.getElementById('customer_service').style.display;
	warr_stat = document.getElementById('warranty_information').style.display;
	
	if(custs_stat == 'block'){
		return 'customer_service';
	}
	
	if(warr_stat == 'block'){
		return 'warranty_information';
	}
}

function deactivate_l(){
	document.getElementById('custom_link').style.background = 'none';
	document.getElementById('custom_link').style.color = '#ec8b00';
	document.getElementById('tech_link').style.background = 'none';
	document.getElementById('tech_link').style.color = '#ec8b00';
	document.getElementById('env_link').style.background = 'none';
	document.getElementById('env_link').style.color = '#ec8b00';
	document.getElementById('care_link').style.background = 'none';
	document.getElementById('care_link').style.color = '#ec8b00';
}

function deactivate_l2(){
	document.getElementById('service_link').style.background = 'none';
	document.getElementById('service_link').style.color = '#ec8b00';
	document.getElementById('warranty_link').style.background = 'none';
	document.getElementById('warranty_link').style.color = '#ec8b00';
}

function activate_l(){
	visible = detect_vis();
	
	if(visible == 'custom_shapes'){
		document.getElementById('custom_link').style.background = '#ec8b00';
		document.getElementById('custom_link').style.color = '#fff';
	}
	
	if(visible == 'technology'){
		document.getElementById('tech_link').style.background = '#ec8b00';
		document.getElementById('tech_link').style.color = '#fff';
	}
	
	if(visible == 'environment'){
		document.getElementById('env_link').style.background = '#ec8b00';
		document.getElementById('env_link').style.color = '#fff';
	}
	
	if(visible == 'care'){
		document.getElementById('care_link').style.background = '#ec8b00';
		document.getElementById('care_link').style.color = '#fff';
	}
}

function activate_l2(){
	visible = detect_vis2();
	
	if(visible == 'customer_service'){
		document.getElementById('service_link').style.background = '#ec8b00';
		document.getElementById('service_link').style.color = '#fff';
	}
	
	if(visible == 'warranty_information'){
		document.getElementById('warranty_link').style.background = '#ec8b00';
		document.getElementById('warranty_link').style.color = '#fff';
	}
}

function blurb_swap(the_div){
	swap_me = document.getElementById(the_div);
	hide_me = document.getElementById(detect_vis());
	
	if(swap_me == hide_me){
		return false;
	} else {
		swap_me.style.display = 'block';
		hide_me.style.display = 'none';
		
		deactivate_l();
		activate_l();
		
		return false;
	}	
}

function blurb_swap2(the_div){
	swap_me = document.getElementById(the_div);
	hide_me = document.getElementById(detect_vis2());
	
	if(swap_me == hide_me){
		return false;
	} else {
		swap_me.style.display = 'block';
		hide_me.style.display = 'none';
		
		deactivate_l2();
		activate_l2();
		
		return false;
	}
}