	/* IE PNG transparency fix */
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	function fixPNG(myImage) 
	{
	    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
	    {
	       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
		   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
		   var imgTitle = (myImage.title) ? 
			             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
		   var imgStyle = "display:inline-block;" + myImage.style.cssText
		   var strNewHTML = "<span " + imgID + imgClass + imgTitle
	                  + " style=\"" + "width:" + myImage.width 
	                  + "px; height:" + myImage.height 
	                  + "px;" + imgStyle + ";"
	                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
		   myImage.outerHTML = strNewHTML	  
	    }
	}

/*usage: onload="fixPNG(this);"*/

sfHover = function() {
	var navDiv = document.getElementById("nav");
	var sfEls = navDiv.getElementsByTagName("LI");
	if(navDiv) {
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function bookmark(url,pagename) { 
	if (window.sidebar) {
		window.sidebar.addPanel(pagename, url, "");
	} else if (window.external) { 
		window.external.AddFavorite(url, pagename);
	} else { 
		alert("Sorry! Your browser doesn't support this function. Please use the bookmark option in your browser instead."); 
	} 
}

function printRecipe() {
	var recipeDiv = window.opener.document.getElementById('recipe');
	var recipeSpanishDiv = window.opener.document.getElementById('recipe-spanish');
	var titleDiv = window.opener.document.getElementsByTagName('h1');
	var titleDivText = titleDiv[0].innerHTML;
	var newTitleDiv = document.getElementsByTagName('h1');
	var newRecipeDiv = document.getElementById('popRecipe');
	newTitleDiv[0].innerHTML = "<img src='http://lib.store.yahoo.net/lib/mex-grocer/logo.gif' alt='MexGrocer.com' style='vertical-align: middle; margin-right: 20px;' />";
	newTitleDiv[0].innerHTML += "<div style='display: inline; vertical-align: middle;'>MexGrocer.com - " + titleDivText + "</div>";
	if(recipeDiv != null && recipeDiv.style.display != "none") {
		var printContent = recipeDiv.innerHTML;
		newRecipeDiv.innerHTML = printContent;
	}
	if(recipeSpanishDiv != null && recipeSpanishDiv.style.display != "none") {
		var printContentSpan = recipeSpanishDiv.innerHTML;
		newRecipeDiv.innerHTML = printContentSpan;
	}
	window.print();
}

function quanChgNew(thisform){
	if(isNaN(thisform.vwquantity.value) && thisform.vwquantity.value != "Qty"){
		thisform.vwquantity.value = 1;
		//alert("text");
		return (true);
	}
	if(thisform.vwquantity.value == "Qty"){
		thisform.vwquantity.value = 1;
		return (true);
	}
}
