----------
Embedding
----------

To embed FlashZoom in a web page we recomend that you use FlashZoom.js. It gets the image size from MediaRich and automatically adjusts the aspect ratio. The examples of usage are in 
Merchandizer Samples/Html/index.html and Samples/Html/zoom_flash/FlashZoom.html.

To embed FlashZoom directly in your page, you have to include the script that defines it:
	<script type="text/javascript" language="javascript" src="zoom_flash/FlashZoom.js"></script>
and then instantiate it and load the content:
	<script type="text/javascript" language="javascript">
		var mrImagePath = "merchandizer:/sample_h.jpg";
		var maxStageWidthHeight = 485;
		var flashZoom = new FlashZoom(mrImagePath, maxStageWidthHeight);
		flashZoom.Load();
	</script>
First parameter (mrImagePath) is the image path as seen by MediaRich (so it will probably start with VFS name).
Second parameter (maxStageWidthHeight) is the width and height of the Flash player stage. If the image is not square, one dimension will be reduced to maintain aspect ratio.

To invoke FlashZoom in a popup window, you can use FlashZoom.html, as in:
<a href="#" onclick="javascript:window.open('ZoomFlash.html?vfs:/sample.jpg,500,20','zoomWindow','width=100,height=100');">
Parameters to FlashZoom.html are the same as parameters to FlashZoom object, plus the additional third parameter, which is margin - extra space around Flash player. Window will be wider and higher by 2 * margin. It is optional, defaults to 20.

You can also directly embed zoomer.swf (not recomended). The parameters are:

picPath - MRL of the image, e.g. http://www.equilibrium.com/mgen/FlashZoom:/master.jpg
originalWidth - width of the original image
originalHeight - height of the original image
configPath - path or URL to config.xml where additional Flash parameters are defined (optional, defaults to config.xml, in the same folder as html file that uses it)

------
Notes
------

FlashZoom.js uses (included) SWFObject JavaScript library. Documentation of SWFObject may be found here:
http://blog.deconcept.com/swfobject/

If you want to place FlashZoom in another place on your web server, you have to adjust two parameters at the top of FlashZoom.js file: path to FlashZoom files and path/URL of MediaRich . See that file for details.

After you unzip the archive be sure to check the permissions in the FlashZoom directory and that they are appropriate for your deployment.

If you make your own config file, or make changes to the existing config file you may need to clear your browser cache (and possibly MediaRich cache) for the changes to take effect.

-----------------
Multi-Page Files
-----------------
FlashZoomPageRes.html shows how to request from MediaRich a page from a multi-page file. You can also specify the resolution at which MediaRich should rendered the page. Another parameter specifies the size at which the browser will display it. The file specification can identify a local or remote file. The remote file can be specified with HTTP or FTP URL. In this case the used protocol must be enabled in Server Admin. To enable HTTP or FTP, open Equilibrium Server Admin, login, stop the server (if running), click Configure and at the top of the dialog, enable required protocol.
The format of the URL used in FlashZoomPageRes.html is:
http://localhost/merchandizer/zoom_flash/FlashZoomPageRes.html?multiPageFileMrPath,pageNumber,resolutionDPI,pageHeight
The parameters after ? (comma-separated) are:
	multiPageFileMrPath - path to multi-page file, as seen by MediaRich, either local, e.g. 
		merchandizer:MRU_AdminGuide.pdf, or remote, e.g. 
		http://ftp2.equilibrium.com/downloads/gated/docs/current/MediaRich/MRU_AdminGuide.pdf"
	pageNumber - page from the file to render and display
	resolutionDPI - resolution at which file should be rendered (in dots per inch)
	pageHeight - height of the page image in browser window
All paramters have default values, so the URL http://localhost/merchandizer/zoom_flash/FlashZoomPageRes.html is equivalent to
http://localhost/merchandizer/zoom_flash/FlashZoomPageRes.html?http://ftp2.equilibrium.com/downloads/gated/docs/current/MediaRich/MRU_AdminGuide.pdf,1,300,880
