Fixed id generationg for view.

div ids can not have a dot(.) in their name. Modified the random id generator
so it wouldn't include a dot.