/*
 * REMOVE COMMENTS BEFORE DEPLOYED
 *-------------------------------------------------
 * swfSize.js is used to change the dimensions of a flash object embedded on an HTML page after the Flash object instantiation.
 * The swfSize.js is deployed in a directotry local to the HTML page.
 *	
 *
 *
 * Flash (SWF)
 *		The SWF is published at the expanded dimensions with expanded and collapsed states created in the authoring environment.
 *		The SWF calls the js function -- setSWFDimensions -- to change the Flash object dimensions:
 *		ExternalInterface.call( "setSWFDimensions", "objID", width, height );    //setSWFDimensions called in Flash
 *			//Examples
 *	        ExternalInterface.call( "setSWFDimensions", "fma_main", 998, 368 );    //expands the page;
 *          ExternalInterface.call( "setSWFDimensions", "fma_main", 998, 270 );    //contracts the page;
 * 			// Where ObjID and embedID are set in the HTML SWFObject code. See example below
 *
 *	HTML
 * 		The swfSize.js is deployed in a directotry local to the HTML page.
 *		HTML Include Example:
 *			<script type="text/javascript" src="/resources/business/rich_internet_apps/launchtour/swfsize.js"></script>
 *
 *		The object reference passed to the setSWFDimensions function as the objID param (fma_main) is set in the SWFObject code.
 *			//Example
 *			props.objID = "fma_main";
 *			props.embedID = "fma_main-embed";
 *
 * 	
 * See deployment example: http://www.stage.adobe.com/resources/business/rich_internet_apps/benefits/ 
 */


function setSWFDimensions (objID,width,height) {

		//alert( "objID="+objID+" | w="+width+" | h="+height );
		
		if (objID && width && height) {

			var fObj = document.getElementById(objID);
			var fEmb = document.getElementById(objID+'-embed');

			if (fObj && fObj.style) {
				fObj.setAttribute('width',width);
				fObj.setAttribute('height',height);
				fObj.style.width = width+'px';
				fObj.style.height = height+'px';
			}

			if (fEmb != null) {
				fEmb.width = width;
				fEmb.height = height;

				if (fEmb.style) {
					fEmb.style.width = width+'px';
					fEmb.style.height = height+'px';
				}
			}
		}
	}
