var tabs = [
//first tab
[
	'images/qm_learn_off.jpg',
	'images/qm_learn_on.jpg',
	'<div id="about" class="header-tab"><a href="about.html" class="header-popup-link" id="header-products-link">&nbsp;</a></div>'],
//second tab
[
	'images/qm_help_off.jpg',
	'images/qm_help_on.jpg',
	'<div id="howwecanhelp" class="header-tab"><a href="helpyou.html" class="header-popup-link" id="header-products-link">&nbsp;</a></div>'],
//third tab
[
	'images/qm_markets_off.jpg',
	'images/qm_markets_on.jpg',
	'<div id="markets" class="header-tab"><a href="markets.html" class="header-popup-link" id="header-products-link">&nbsp;</a></div>'],
//fourth tab
[
	'images/qm_products_off.jpg',
	'images/qm_products_on.jpg',
	'<div id="productsandservices" class="header-tab"><a href="products.html" class="header-popup-link" id="header-products-link">&nbsp;</a><a href="services.html" class="header-popup-link" id="header-services-link">&nbsp;</a></div>']];

function preloadImages() {
	for (var y = 0; y < 2; y++) {
		for (var x = 0; x < tabs.length; x++) {
			image = new Image();
			image.src = tabs[x][y];
		}
	}
}

function switchTab(tab) {
	for (var x = 0; x < tabs.length; x++) {
		if (x != tab)
			document.images["tab"+x].src = tabs[x][0];
	}
	document.images["tab"+tab].src = tabs[tab][1];
	document.getElementById("currentTab").innerHTML = tabs[tab][2];
}