ns4 = (document.layers)? true:false;
ie4 = (document.all)? true:false;

function ShowHideIsHidden(id)
{
	var obj;
	obj = document.getElementById(id);
	if (!(obj && (obj.style.visibility == "visible" || obj.style.visibility == "show" || obj.style.visibility == "")))
		return false;
	return true;
}

function show(id)
{
	var obj = document.getElementById(id);
	if(obj)
	{
	    document.getElementById(id).style.visibility = "visible";
		document.getElementById(id).style.display = "block";
	}
	else
	{
	    if (ns4)
	    {
	        if (document.layers[id])
	        {
	  	        document.layers[id].visibility = "show";
		        document.layers[id].display = "block";
	        }
	    }
	    else if (ie4)
	    {
		    if (eval(document.all[id]))
		    {
			    document.all[id].style.visibility = "visible";
			    document.all[id].style.display = "block";
		    }
	    }	
	}
}

function hide(id)
{
	var obj = document.getElementById(id);
	if(obj)
	{
	    document.getElementById(id).style.visibility = "hidden";
        document.getElementById(id).style.display = "none";
	}
	else
	{
	    if (ns4)
	    {
	        if(document.layers[id])
	        {
		        document.layers[id].visibility = "hide";
		        document.layers[id].display = "none";
		    }
	    }
	    else if (ie4)
	    {
		    if (eval(document.all[id]))
		    {
			    document.all[id].style.visibility = "hidden";
			    document.all[id].style.display = "none";
		    }
	    }	
	}
}