if( !in_array(get_query_var( 'taxonomy' ), array("category", "post_tag")) ) {
$taxonomy = get_query_var( 'taxonomy' );
$term = get_query_var( 'term' );
$this_term = get_term_by( 'slug', $term, $taxonomy );
if( $this_term->parent != 0 ) { ?>
<script>
inSubTerm = true;
</script>
<? }
}