Update refactoring JS file

* 06. removing eval(); because it should be use only for serelazation
* 07. replacing document.layers and document.all as they are obsolut
* we use document.getElementById(); instead