code restructuring for implementing search
Moved Crystal lib from deprecated mysql_ to mysqli_
First draft of the new SQL based search system.