Hi guys, I hope I'm in the right place and I hope you guys can help a newbie out

Anyways, I've just bought a used iPhone today (iPhone 3G) and was told that this was a jailbreaked version and that I should only use iTunes 8 (iTunes 9 is not possible or something like that).
This phone is now filled with applications and has never been synced with my iTunes before.
After reading the FAQ I think my phone is from US (AT&T) and in the pdf doc it is stated that it is locked to the carrier (AT&T) and they do not have authorized unlocking.
Ok, so my question is :
1. I want to restore this phone to original settings (ie no jailbreak) and to remove all the applications in this phone. Can I do this through using iTunes Restore function? I wanted to do this but when iTunes told me they will restore the phone and update to the latest firmware I became hesitant and thought better to ask you guys first. If I do this, since it is AT&T phone, would this phone be locked hence making it unusable in Malaysia?
2. If the above way is not possible, how do I keep the jailbreak but remove EVERYTHING from the phone (ie. factory default/hard reset)? I would like to have the phone in a fresh state (jailbreak notwithstanding) and empty of all the silly applications I have in there. Is a hard reset able to do this? Is it even safe to hard reset this AT&T phone?
I hope you guys can help me. I guess my questions are kinda basic and simple but I've scoured the web and can't find answers specific to my needs so I hope I can get some help here.
Thank you!
iPhone Generation : 3G
Unlocked? (or Part Number): MB048LL (looks like it's AT&T)
Current Firmware : 3.0.1 (7A400)
Current network: Using DIGI
iTunes Version : iTunes 8.2
PC/MAC : PC
Jailbreaking software : Not sure
Problem Encountered : Want to reset the phone to original settings (as in no jailbreak and no applications whatsoever)
Steps Taken So Far : None yet
you can use pwnage tool 3.1.4 to update d firmware + jailbreak..... then later can use the ultrasn0w to unlock d iphone.
but pwnagetool is only available on MAC. (pwnage tool will preserve d old baseband)
do not use itune to update d firmware coz it will update your baseband n d new baseband firmware is unlockable at the moment.