I've always classified myself as being straight because I've been in love with a girl before and have had many romantic and sexual fantasies about her before, but now I'm confused. I've broke up with her because I went to a new school and wasn't able to see her anymore. I missed her deeply, but now I keep getting boners to my best friend. I keep wondering why, but my best guess is because of my fetish for legs. I only get boners around him when he's wearing shorts. When I think about him I feel a strong emotional connection with him. (Probably because he's my best friend, and he even helped me get over my depression.) This has caused me to be very confused about my sexual orientation, but I find having sex with him or any other guy disgusting. I'm very confused. Please help!
I use a biblical view and not a secular view in these matters. From the Bible a person is a sinner when he commits that sin. Thus, a homosexual is a person who has sex with another person of the same gender. Therefore, you are not a homosexual because you haven't had sex with another guy.
Lust is when you strongly desire to sin -- so strong that you are willing to break one of God's laws in order to sin. Here again you tell me that you are not daydreaming of getting naked with another guy, nor do you have a desire for homosexual sex.
The only difficulty you are having is that you are having erections when you are around your best friend. As you should remember when you were younger, erections can be caused by anything, but as you mature they come mostly when there is the least hint that something is sexy or potentially sexy. You see bare legs as sexy and your body doesn't distinguish between male legs or female legs. Add to that you have an emotional attachment because of your friendship, and what you are seeing is your body overreacting to what it perceives as sexual clues.
Most likely you get erections at other times, but you don't pay as much attention to them because they are expected. It is because these upset you that you focus on them.
Just because you get an erection, it doesn't mean you need to drop your pants and ejaculate. It is just a physical reaction to environmental clues and it tends to happen far more often than is needed. What you are experiencing are temptations to sin. The proper response to all temptation is to reject the offer. "Therefore submit to God. Resist the devil and he will flee from you" (James 4:7). Regardless how your penis behaves, the proper response is to ignore it until the day you get married.