How do I make a raycast for a particle

Okay, so I have been looking forever. I have a gun, with a muzzle flash, and a gunshot sound, but I want there to be a particle to be projected directly in front of the player, where the crosshair is. How can I do this in Javascript?

Here's a very similar question I put an answer on just a few minutes ago: http://answers.unity3d.com/questions/29653/how-do-i-make-a-gun