Get format of saving file from browser

Im new in Apple script but wanna learn it…
Now writting my first app, but dunno how make some functional of it…

I wanna that when i save mp3 file in Safari or other browsers, automaticly i see the pop window with dialog like - do u wanna add that to iTunes? If nah u can save to ur folder… (if yeah too, but with adding to itunes how u understood)

Answer
How to get format of file from browser?

Okay, i found how detect mp3 file… That what i wrote…

if (droppeditem as Unicode text) ends with “.mp3” then

set pix to 72
set answer to text returned of (display dialog "Do you want to import that file to iTunes now?" default answer "Yes")
display dialog answer & "in = " & (answer * pix) & "px"

end if

Whats with ____ - i dunno what must be here…