Maybe if you explained WTF it is supposed to be doing, we might take an interest...

Also, getting your indentation and brackets consistent would make it a lot more readable.