function ShowHide(id) {
    obj = document.getElementById( id );
	// if display is set to block, set it to none
    if( obj.style.display == 'none' )
	{
		obj.style.display = 'block';
    }
	// otherwise if set to block, set it to none
    else if( obj.style.display == 'block' )
	{
		obj.style.display = 'none';
    }
	// display is not set
	else{
		//check classname
		if( obj.className == 'opened' )
		{
			obj.style.display = 'none';
		}
		else
		{
			obj.style.display = 'block'	;
		}
	}
}