Is it seo safe and seo friendly to display and to hide <div> layers? will the content from the div be indexed if i set an display none to it?
Yes, they will be indexed. I just verified it because I have a hidden <div> which contains a "Processing, please wait..." message that appears only when the user begins a lengthy process. By searching Google for this specific message, my site's pages appeared in the results. If the content of hidden <div>'s were not indexed, they would not have appeared. That said, it all depends on the approach. On my site the <div>'s are always present in the markup, but rendered hidden due to CSS. If you create the <div>'s using Javascript, that's a different story obviously.
I think it depends on your intent. I feel confident that I won't get dinged just because I have a "Processing, please wait..." sitting in hiding. On the other hand, if I had lots of keywords stuffed into it and never displayed it, that would be a different story...