I wrote a similar sketch for the PIC18F2550 ( a slight modification can adopt it to almost all pic18F2/4 family). the sketch and the instruction can be found over here:
Damn ! Project already done !
Well, I'll still try to do it, at least to understand the ICSP method and achieve implementation by myself.
But, even so I am disgusted ! >.< I was caught up again ! Just my luck !