function fnOpenLargeImage(sFullImage, strAlt)
{
	var objPopWin=window.open("previewimage.asp?image="+escape(sFullImage)+"&type=image&ImgAlt="+escape(strAlt),'ImagePreview','height=500,width=600,top=25,left=100,help=0,resizable=yes,toolbar=0,location=0,status=0,menubar=0,scrollbars=yes');
	objPopWin.focus();
}
				
function checkQuantity(value1,StockQty,txtbox,ItemMFGDesc,strHideProducts)
{
	var value2=txtbox.value;
	if (isNaN(value2))
		{
		 	alert("Please enter a valid quantity")
		 	if (txtbox.type != 'hidden')
		 		txtbox.focus();
		 	return false;
		}

	if (parseFloat(value2) != parseInt(parseFloat(value2)))
		{
			alert("The quantity for this product should be a whole number")
		 	if (txtbox.type != 'hidden')
		 		txtbox.focus();
			return false;
		}
	if (value1 > value2)
	{
		alert("The minimum quantity for this product is " + value1)
		txtbox.value = value1
		 if (txtbox.type != 'hidden')
		 	txtbox.focus();
		return false;
	}
	if(strHideProducts == "1")
	{
		if (value2 > StockQty && StockQty != -1)
		{
			if(StockQty != 0) {
				alert('The available quantity in stock for "' + ItemMFGDesc +'" is ' + StockQty + '. Please reduce the order quantity in order to proceed');
			} else {
				alert(ItemMFGDesc +' is not in stock at this time. Please check back later.');
			}	
			return false;
		}
	}
	return true;
}

function fnOpenLargeImagewithID(intID)
{
	var objPopWin=window.open("previewimagewithID.asp?GID="+escape(intID),'ImagePreviewID','height=650,width=600,top=25,left=100,help=0,resizable=yes,toolbar=0,location=0,status=0,menubar=0,scrollbars=yes');
	objPopWin.focus();
}