Is the work done walking up an escalator in the same speed and opposite direction of the escalator zero? Work equals force times distance, but what about walking up an escalator in the same speed and opposite direction of the escalator?
In the frame of the ground, the distance is zero so the work must be zero! 
What am i missing?
 A: Essentially, what you are missing is that you need to look at your situation from the point of view of the escalator steps. The escalator "sees" you "climbing" it because each step you take places you at a later escalator step. You don't keep landing on the same step.
A force is applied by your foot on each escalator step. Therefore, each escalator step applies the equal and opposite force on your foot. The distance you need to be concerned with is not the distance between your feet and the immovable ground floor. Instead, you need to be concerned with the distance your foot has moved while applying the force to the escalator step.
When your foot first contacts the escalator step, it is at point "A". The force is applied by your foot until it reaches point "B". The force was applied over that "A-B" distance. So work is clearly being done even though your potential energy relative to the immovable ground floor is not increasing. You are working to maintain your potential energy relative to the immovable ground floor while the escalator is working against your efforts.
A: The overall potential energy change is zero. But as you will have noticed, you get tired doing this. That's because you are doing work on the escalator.
If a person stands on a perfectly efficient friction-free escalator, work will be done on it as they go down, and the esclator would generate electricity. This is the conversion of potential energy into electricity.
If the person walks up as the escalator moves down in order to keep their position constant, we have the chemical energy of their food being changed into electricity.
The original meaning of the word "treadmill" (before the invention of exercise machines) was, by analogy with windmills and watermills, a wheel in which prisoners were forced to climb in order to generate energy for industry. There were various designs, one resembling a hamster wheel. Some other ones are shown here http://en.wikipedia.org/wiki/Treadmill 
A: The force is applied at the step. You apply that force downward and the step moves downward at the same time; work is force times distance (with a directional factor that is roughly 1 in this case). So the work is non-zero (and is similar to the work you would do climbing the same number of steps if the elevator was stopped.1
Now, Rahul analyzed the problem in terms of potential energy and concluded that your energy was not changing (which is correct), so if work is done and it is not changing your energy where is it going?
Good questions. I'm glad you asked.
The force from your foot is transmitted into the drive train of the elevator system and reduces the load on the motor, reducing the load on the electrical system and ultimately causing less power to need generating. The energy ends up in whatever system was running the machine in the first place.

1 If you are at all on-it you may be trying to apply the above analysis to the case of walking up stairs and saying "Ah ha! I caught you! Your analysis has no work done when climbing up stairs."
That's reasonable, except that I can analyze the work done at the hip in that case and show that lifting the body is pushing work and then lifting the leg afterwards is pulling work. It all comes out.
A: yeah,you are right. since you are at the same distance above the ground so you have your potential energy constant so you are not doing any work though if you were on the frame of escalator
then you are moving so work is done in form of kinetic energy.
A: All the answers so far have started with the incorrect assumption that it's equally difficult to walk up a downward moving escalator and to walk up a stationary stairs.   This is simply not true.  True you expend some energy as the escalator takes you down a bit and you have to recover that lost potential energy (height) with each step.  But if you could hold the bulk of your mass in a constant position and just move your legs and feet - you'd find the effort much less.
A: Yes if you were suspended in a harness like a dangling puppet and just moving your legs on the steps.
In reality, a down escalator is pushing up on you. So you drive the escalator down with a force equal to your weight times the height of the step.
It is confusing because the escalator moves the same speed anyway, but only because the motor speed controller increases electromagnetic braking to slow the mechanism down so you don't end up like that pile of Russian football hooligans in that viral youtube video. Either that or the friction in the step chain is more than your weight and you have lessened the load on the motor to pull it round.
