To enable this support Visual Studio needs a reference to base the IntelliSense. First you need to download the reference file XrmPage-vsdoc.js (right click and choose save). Save this file on a convinient location for example a folder named 'IntelliSense'. Now you can create a new js file in Visual Studio then add the following line to the top of this file:
The path to the file can either be relative or absolute, in this example the reference file is placed in a folder named IntelliSense in the folder where the new web resource js file is saved.
I have only tried this file with Visual Studio 2010. If there are any function which are incorrect or other errors please let me know.