Hey, thank you all for your answers.
That is a pretty nice solution! I'll try to implement it and then ill give you updates.
@ Salem You are right, my code is a complete mess, I'm this close to doing everything all over again, but unfortunatly I have no time for that. I have to organize it a little bit... I think if you saw the whole thing you would gasp :P