def script(content="", src="", scripttype="text/javascript"):
    """
    returns a unicode text html script element.

    >>> script('#this is a comment', scripttype="text/applescript")
    '<script type="text/applescript">#this is a comment</script>'
    """
    out_script = u'<script '
    if scripttype:
        out_script += u'type="%s" ' % scripttype
    if src:
        out_script += u'src="%s" ' % src
    return out_script[:-1] + u'>%s</script>' % content