Changing analogWrite() function frequency

Only timer0 is used by the core arduino functions (for maintaining the millis() and micros() times (including delay() and similar.).) Timer0 controls pwm on pins 5 and 6, I think. You should be able to change the other 4 pwm pin frequencies by manipulating the other two timers, without bothering any of the core functions.