20071017 tech: Tech stocks gain in market carnage