// Function for the animalhealth matrix

function toggleMatrix(productGroup,animal,what) {
	layerId = null;
	imageName = null;
	crossIllu = null;
	
	pg = productGroup;
	an = animal;
	imageName = 'illu_'+animal;
	imagePath = /*VIPURL*/'/Images/products/index.htm';
	imagePath=imagePath.substring(0,imagePath.lastIndexOf("/")+1);
	imageFile = 'illu-animalhealth-matrix-'+animal+'.gif';
	imageFileHi = 'illu-animalhealth-matrix-'+animal+'_hi.gif';
	crossIllu = document.getElementById('crossillu_'+pg+'_'+an).style;

	layerId = pg+'-'+an;
	var amatrix_bgurl=/*VIPURL*/"/Images/link-cross-grey.gif";
	if (layerId && imageName) {
		if (what == 'on') {
			showElement(layerId);
			document.images[imageName].src = imagePath+imageFileHi;
			if (crossIllu) {
				crossIllu.backgroundImage = 'url('+amatrix_bgurl+')';
			}
		}
		else if (what == 'off') {
			hideElement(layerId); 
			document.images[imageName].src = imagePath+imageFile;
			if (crossIllu) {
				var amatrix_bgurl_o=/*VIPURL*/"/Images/link-cross-orange.gif";
				crossIllu.backgroundImage = 'url('+amatrix_bgurl_o+')';
			}
		}
	}
}