On a side note, when posting code you should only post the relevant part(s), not the whole thing (unless that can't be helped), and you should use the Code Tags, which, on this forum, are started/stopped using the button that looks like the # character above this screen