well, just for your information, the speed is regulated through the sleep command of your game loop (i would not change this for the sake of game speed) and the increase and decrease of the TempAlpha variable.
TempAlpha = TempAlpha + 15;
and
TempAlpha = TempAlpha - 15;
alpha has a value from 0-255 and the standart sleep command is 20ms.
So in theory you should be able to calculate the speed of the fade-in and fade-out.
The only problem: Your TempAlpha variable must hit the value 255 exactly or you get strange window behavior. You can counter this in a second if condition that sets the value to 255 if its above this but i was to lazy in my game to implement this (not that it takes much time) and im aware of this behaviour.
So if you want to change the speed, find a value that can divide 255, implement a bugfix or simply dont touch this.