	// show or hide all features of a group
	function toggleall( targetId , mode){
		var allPageTags = new Array(); 
		var allPageTags=document.getElementsByTagName("ul");  
		for (i=0; i<allPageTags.length; i++) {  
			//Pick out the tags with our class name  
			if ( allPageTags[i].className == targetId ) {  
				// toggle the display mode
				if (mode==1 || allPageTags[i].style.display == "none" || allPageTags[i].style.display == null) {
					allPageTags[i].style.display = "block"; // set display to nothing, that defaults to view style for most browsers
					document.getElementById(targetId +"-parent").className='linkopen';
				} else {                                
					allPageTags[i].style.display = "none";  
					document.getElementById(targetId +"-parent").className='linkclosed';
				}
			} 
		} 	
	}	

	function showcat( targetId ) {
		document.getElementById("menu1").style.display = "none";
		document.getElementById("menu2").style.display = "none";
		document.getElementById("menu3").style.display = "none";
		document.getElementById("menu4").style.display = "none";
		document.getElementById("menu17").style.display = "none";
		if (targetId) {
			document.getElementById(targetId).style.display = "block";
		}
	}
	
	// update select lists (division and eventGroup, they run off region list)
	function showitem(myid)
	{
		var datasource = "ajax_qmc_item.asp?id="+ myid;
		new Ajax.Request(datasource,
		{
			method:'POST',
			onSuccess: function(transport) {
				document.getElementById("lot-item").innerHTML = transport.responseText;
			},
			onFailure: function() { alert('error displaying list, please refresh the page'); }
		});
	}
	
	// update select lists (division and eventGroup, they run off region list)
	function showcat(mycat)
	{
		var datasource = "ajax_qmc_item.asp?cat="+ mycat;
		new Ajax.Request(datasource,
		{
			method:'POST',
			onSuccess: function(transport) {
				document.getElementById("lot-item").innerHTML = transport.responseText;
			},
			onFailure: function() { alert('error displaying list, please refresh the page'); }
		});
	}
