Simple fade in and out function?

Can someone help me with a function that I can re-use and pass movie clips to and cause mc’s to fade in and out?..such as

function fadeMeIn(fadewhat,fadespeed) {

if (fadewhat < 100) {
fadewhat._alpha += fadespeed;

};

and call it something like this?

_root.fadeMeIn(_root.mypages, 5)


Obviously not the correct code, but you get what Im trying to do. Instead of useing motion tweens with alpha, Id rather just do it with actionscript whenever I need to fade something in or out. Any ideas?

Thanks!
Rich