function filter(form)
{
	type = form.projtype.value;
	var cssRules;
	if (document.all) {
		cssRules = 'rules';
	}
	else if (document.getElementById) {
		cssRules = 'cssRules';
	}
	var element = 'display';
	var value = 'none';
	var reset = 'block';

	for (var S = 0; S < document.styleSheets.length; S++) {
		for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			if(document.styleSheets[S][cssRules][R].selectorText == ".filtertxt") {
				document.styleSheets[S][cssRules][R].style[element] = reset;
			}
			if(document.styleSheets[S][cssRules][R].selectorText == ".projtxt") {
				document.styleSheets[S][cssRules][R].style[element] = value;
			}
			if(type == 'm')
			{
				if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_p") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_pz") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_z")) {
					document.styleSheets[S][cssRules][R].style[element] = value;
				}
				else if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_m") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mp") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mz")) {
					document.styleSheets[S][cssRules][R].style[element] = reset;
				}
			}
			else if(type == 'p')
			{
				if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_m") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mz") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_z")) {
					document.styleSheets[S][cssRules][R].style[element] = value;
				}
				else if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_p") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mp") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_pz")) {
					document.styleSheets[S][cssRules][R].style[element] = reset;
				}
			}
			else if(type == 'z')
			{
				if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_m") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mp") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_p")) {
					document.styleSheets[S][cssRules][R].style[element] = value;
				}
				else if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_z") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mz") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_pz")) {
					document.styleSheets[S][cssRules][R].style[element] = reset;
				}
			}
			else {
				if((document.styleSheets[S][cssRules][R].selectorText == ".projlistel_m") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mp") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_mz") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_p") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_pz") ||
					(document.styleSheets[S][cssRules][R].selectorText == ".projlistel_z")) {
					document.styleSheets[S][cssRules][R].style[element] = reset;
				}
			}
		}
	}
}