function showoverlay(id,state)
{
	if($('imageoverlay'+id))
	{
		$('imageoverlay'+id).style.display = state;
		
		
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
		 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
		 if (ieversion<7)
		 {
			 if(state == 'block')
			{
				otherstate = 'none';
				sortstate = 'hidden';
			}
			else
			{
				otherstate = 'block';
				sortstate = 'visible';
			}
			
			switch(id)
			{
				case 1:{
						$('regions').style.display = otherstate;
						if($('area'))$('area').style.display = otherstate;
						$('sort').style.visibility = sortstate;
						break;}
						
				case 2:{
						if($('area'))$('area').style.display = otherstate;
						$('sort').style.visibility = sortstate;
						break;}
						
				case 3:{
						$('sort').style.visibility = sortstate;
						break;}
				case 4:{
					   $('sort').style.visibility = sortstate;
						break;}
			}
		 }
		}

		
		
	}
}
