function enableFlash() {
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
    objects[i].outerHTML = objects[i].outerHTML;
}
}

	function handleLoginEvent(field, event, form) {
	   var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	   if (keyCode == 13) {
	       form.submit();
	   }
	} 
	
	function viewProductDetails(productId) {
		newwindow=window.open('product_details.jsp?product_id='+productId,'product_details','height=625,width=830,scrollbars=1');
		if (window.focus) {newwindow.focus()}
	}
	
	function logout() {
		if(confirm("You are about to logout of the SOMA Administrative Website.  Continue?")) {
			document.frmLogout.submit();
		}
	}
	
	function deleteDistributor(distId,distName) {
		if(confirm("You are about to delete Distributor '" + distName + "'. Continue?")) {
			document.frmDeleteDistributor.distributor_id.value = distId;
			document.frmDeleteDistributor.submit();
		}
	}
	
	function deleteIngredient(ingId,ingName) {
		if(confirm("You are about to delete Ingredient '" + ingName + "'. Continue?")) {
			document.frmDeleteIngredient.ingredient_id.value = ingId;
			document.frmDeleteIngredient.submit();
		}
	}
	
	function deleteSection(secId,secName) {
		if(confirm("You are about to delete Section '" + secName + "' and ALL Ingredients within this Section. Continue?")) {
			document.frmDeleteSection.section_id.value = secId;
			document.frmDeleteSection.submit();
		}
	}
	
	function deleteProduct(prodId,prodName) {
		if(confirm("You are about to delete Product '" + prodName + "'. Continue?")) {
			document.frmDeleteProduct.product_id.value = prodId;
			document.frmDeleteProduct.submit();
		}
	}
	
	function submitSalonSearch(frmForm) {
		var country = frmForm.country.value;
		var zip = frmForm.zip.value;
		var city = frmForm.city.value;
		var state = frmForm.state.value;
		var distance = frmForm.distance.value;
		
		window.location = 'salon.jsp?country='+country+'&zip='+zip+'&city='+city+'&state='+state+'&distance='+distance;
		
	}