'Set the type attribute\'s value, and the <show> element
if applicable.
Arguments:
value -- Must be in either self.types or self.showtypes.'

def set_type(self, value):

    if (value in self.types):
        self['show'] = None
        if (value == 'available'):
            value = ''
        self._set_attr('type', value)
    elif (value in self.showtypes):
        self['show'] = value
    return self
