﻿function ToggleMenuItem(id) {
	var element = document.getElementById(id);

	if (element.style.display == 'block' || element.style.display == '') {
		element.style.display = 'none';
	} else {
		element.style.display = 'block';
	}
}

function showCountry(fips) {
	if (document.getElementById) {
		var container = document.getElementById('map_content');
		if (container) {
			var countries = container.getElementsByTagName('div');
			for (var i = 0; i < countries.length; i++)
				countries[i].style.display = 'none';
		}
		var country = document.getElementById(fips);
		country.style.display = 'block';
		var shops = country.getElementsByTagName('div');
		for (var i = 0; i < shops.length; i++)
			shops[i].style.display = 'block';
	}
}

function ShowElement(elToShow, elToHide) {
	if (elToShow != null && elToShow != 'undefined') {
		document.getElementById(elToShow).style.display = 'block';
	}
	if (elToHide != null && elToHide != 'undefined') {
		document.getElementById(elToHide).style.display = 'none';
	}
}

function ToogleProductTabs(tabId, elId) {

	if (tabId != "tab_1") document.getElementById("tab_1").className = "producttabs producttabs_off";
	if (tabId != "tab_2") document.getElementById("tab_2").className = "producttabs producttabs_off";
	if (elId != "elSpecifications") document.getElementById("elSpecifications").style.display = "none";
	if (elId != "elHighlights") document.getElementById("elHighlights").style.display = "none";

	document.getElementById(tabId).className = "producttabs producttabs_on";
	document.getElementById(elId).style.display = "block";
	
}

