// 
//  hometabs.js
//  Handles the image rollover effect for the home page tabs
//  
//  Created by Jonathan on 2007-05-21.
//  Copyright 2007 Red Incorporated. All rights reserved.
// 

homeTabs = {
	residential: 'images/homeTagw_tabs_Residential.jpg',
	commercial: 'images/homeTagw_tabs_Commercial.jpg',
	chemical: 'images/homeTagw_tabs_Chemical.jpg'
}
homeContentTabs = {
	residential: 'images/ResidentialPlant_Tab.jpg',
	commercial: 'images/CommercialPlant_Tab.jpg',
	chemical: 'images/Chemical_Tab.jpg'
}
currentHomeTab = 'residential';

function preloadImageHash(hash) {
	for (x in hash) {
		i = new Image();
		i.src = hash[x];
	}
}

preloadImageHash(homeTabs);
preloadImageHash(homeContentTabs);

function showTab(name)
{
	for (x in homeTabs) {
		$(x+'Text').hide();
	}
	$('homeTabContent').className = "tabBackground_"+name;
	$(name+'Text').show();
	$('homeTabBarImg').src = homeTabs[name];
	currentHomeTab = name;
}

function home_moreInfo()
{
	switch (currentHomeTab) {
		case 'residential':
			break;
		case 'commerical':
			break;
		case 'chemical':
			break
	}
	return false;
}