
function tabMouseEnter(elemName){

	//var elem = (ev) ? ev : event.srcElement;
	var elem = document.getElementById(elemName);
	var tab = document.getElementById(elemName + "_img");
	
	var imgName = tab.getAttribute("_imgName");
	
	
	tab.src=imgName + '_wt.gif';
	if (!elem.getAttribute("_backgroundColor")){
		elem.setAttribute("_backgroundColor",elem.style.backgroundColor);
	}
	elem.style.backgroundColor='white';

}

function tabMouseLeave(elemName){

	var elem = document.getElementById(elemName);
	var tab = document.getElementById(elemName + "_img");
	var imgName = tab.getAttribute("_imgName");
	tab.src=imgName + '.gif';
	elem.style.backgroundColor=elem.getAttribute("_backgroundColor");

}

var imagesPath = '';

function preloadImages(){
	if (document.images) {
		if (typeof(document.WM) == 'undefined'){
		document.WM = new Object();
		}
		document.WM.loadedImages = new Array();
		// Loop through all the arguments.
		var argLength = preloadImages.arguments.length;
		for(arg=0;arg<argLength;arg++) {
		// For each arg, create a new image.
		document.WM.loadedImages[arg] = new Image();
		// Then set the source of that image to the current argument.
		document.WM.loadedImages[arg].src = imagesPath + preloadImages.arguments[arg];
		}
	}
}

function doPreload(path){
	
	imagesPath = path;
	preloadImages('tabcompany_wt.gif','tabcustomers_wt.gif','tabdevelopers_wt.gif','tablogin_wt.gif','tabproducts_wt.gif','tabservices_wt.gif','tabsolutions_wt.gif','tabsupport_wt.gif');

}

function getEventElem(ev){
	return (ev.srcElement) ? ev.target : ev.target;
}