﻿/* Products filters */

/*
		All Products		>		ap
		Graphics Products	>		gp
		Resistant Materials	>		rm
		Product Design		>		pd
		Engineering			>		en
		Textiles			>		tx
		Systems Control		>		sc
*/
/*		List of Products:
		
		Software						>		sft
		Knife Cutters					>		kfc
		Engravers/Milling/Routers		>		emr
		Laser Cutters					>		lsc
		Plasma Cutters					>		plc
		3D Printers						>		3dp
		3D Scanners						>		3ds
		Image Transfer					>		itr
		Sew/Embroider					>		emb
		Manual Machinery and Equipment	>		mme
		Furniture						>		fur
*/
function prodFilter(choice) {
	ap = new Array("sft","kfc","emr","lsc","plc","3dp","3ds","itr","emb","mme","fur");

		switch(choice)
		{
		case 'gp':
		  choiceArray = new Array("sft","kfc","itr");
		  break;
		case 'rm':
		  choiceArray = new Array("emr","lsc","3dp");
		  break;
		case 'pd':
		  choiceArray = new Array("sft","emr","3dp");
		  break;
		case 'en':
		  choiceArray = new Array("emr","sft");
		  break;
		case 'tx':
		  choiceArray = new Array("sft","emb","itr");
		  break;
		case 'sc':
		  choiceArray = new Array("plc");
		  break;
		default:
		  choiceArray = ap;
		}
// hide all products
for(i=0;i<=ap.length-1;i++)
 	document.getElementById(ap[i]).style.display = 'none';
// show revelant for choice
for(i=0;i<=choiceArray.length-1;i++)
	document.getElementById(choiceArray[i]).style.display = 'block';
// update links to show which is currently being displayed
alinks=new Array("ap","gp","rm","pd","en","tx","sc");
	for(i=0;i<=alinks.length-1;i++)
		document.getElementById(alinks[i]+'A').style.fontWeight='normal';
document.getElementById(choice+'A').style.fontWeight='bold';

}

