//will resize the flash window to fit the width of the browser
			function checkSize()
			{
				width = document.compatMode=='CSS1Compat' && !window.opera ? document.documentElement.clientWidth : document.body.clientWidth;
				document.getElementById("container").style.width = width >= 1024 ? "100%" : "1024px";
			}
			//get the movie name of the flash
			function thisMovie(movieName) {
				if (navigator.appName.indexOf("Microsoft") != -1) {
					return window[movieName];
				} else {
					return document[movieName];
				}
			}
			//set variable for the current hash value
			var recentHash = "";
			//this function gets called by flash when a new product is selected
			function setURL( page ){
				window.location.hash = page;
				recentHash = window.location.hash;
				updatehtml();
			}
			//this function gets called every 100ms
			//it check any change in the hash value, from back/forward button clicking
		    function pollHash() {		  
				if (window.location.hash==recentHash) {
					return;
				}else{
					recentHash = window.location.hash;
					thisMovie("productsflash").tellFlash(recentHash);
					updatehtml();
				}
		    }	
			//updates the iframe with the corresponding html page
			function updatehtml(){
			
				document.getElementById("frame").src = "prod_bottom.jhtml?id=/lactaid/products/"+urls[recentHash.substring(1)];
				//alert (document.getElementById("frame").src);
			}			
			//an array of urls for each product based on its value name defined in the products.xml file
			var urls = {
			"Products" : "products.inc",
			"Fat_Free_Milk" : "prod_milk_1.inc",
			"1pct_Milk" : "prod_milk_2.inc",
			"2pct_Milk" : "prod_milk_3.inc",
			"Whole_Milk" : "prod_milk_4.inc",
			"Chocolate_Milk" : "prod_milk_5.inc",
			"2pct_Organic_Milk" : "prod_org_1.inc",
			"Fat_Free_Organic_Milk" : "prod_org_2.inc",
			"Fast_Act_Chewables" : "prod_diet_1.inc",
			"Fast_Act_Caplets" : "prod_diet_2.inc",
			"Fast_Act_Original" : "prod_diet_3.inc",
			"Chocolate_Ice_Cream" : "prod_ice_2.inc",
			"Vanilla_Ice_Cream" : "prod_ice_1.inc",
			"Cookie_And_Cream_Ice_Cream" : "prod_ice_4.inc",
			"Strawberries_And_Cream_Ice_Cream" : "prod_ice_5.inc",
			"Butter_Pecan_Ice_Cream" : "prod_ice_3.inc",
			"Cottage_Cheese" : "prod_cottage_1.inc",
			"Egg_Nog" : "prod_eggnog_1.inc",
			"Evaporated_Milk" : "prod_evap_1.inc",
			"Licuado" : "prod_licuado.inc",
			"Strawberry" : "prod_licuado_strawberry.inc",
			"Mango" : "prod_licuado_mango.inc",
			"Banana" : "prod_licuado_banana.inc"
			};