
function buyGiftsAddItemToCart(lngID,lngCatID)
{
	window.location.href='index.asp?PageAction=ADDPRODTOCART&intQty=1&ProdID='+lngID+'&CatID='+lngCatID
}

function buyGiftsViewProduct(lngID,lngCatID)
{
	window.location.href='index.asp?PageAction=VIEWPROD&ProdID='+lngID+'&CatID='+lngCatID
}

function buyGiftsWholesale(lngID)
{
	window.open('wholesale-order.asp','mywindow','toolbar=0,location=no,menubar=0,width=400,height=200');
}

function bOpenWindow(lngWidth,lngHeight,strUrl)
{
	window.open(strUrl,'fwindow','toolbar=0,location=no,menubar=0,width='+lngWidth+',height='+lngHeight);
}

function buyGiftsEmailOutOfStock(lngType,lngID)
{
	
	if(lngType == 1)
	{
		//Textbox has focus;
		document.getElementById(lngID).value =''
	}
	else
	{
		//Textbox lost focus;
		if(document.getElementById(lngID).value!='Enter Email Address'){
			if(document.getElementById(lngID).value=='')
				document.getElementById(lngID).value = 'Enter Email Address';	
		}		
			
	}
}

function buyGiftsItemNotInStockOkButton(lngID,txtEmail)
{
	window.open('itemstockemail.asp?ID='+lngID+'&email='+document.getElementById(txtEmail).value,'outofstockitememail','toolbar=0,location=no,menubar=0,width=400,height=200');
}



function increase()
{
	var intQty = document.frmAddItemToCart.intQty.value
	intQty++;
	document.frmAddItemToCart.intQty.value = intQty;
}
function decrease()
{
	var intQty = document.frmAddItemToCart.intQty.value
	intQty = intQty - 1;

	if(intQty < 0)
		intQty = 0;

	document.frmAddItemToCart.intQty.value = intQty;
}
function loadProGallery(intProductID)
{
	var strURL = 'Includes/ProductImageGallery.asp?ProductID=' + intProductID + '&GalleryItem=1';
	window.open(strURL,"","width=460,height=355,resizable=yes,scrollbars=yes,location=no,true")
}

function valAddProd()
{
	var objH = document.frmAddItemToCart.intQty;

	if(IsNumeric(objH.value)==false)
	{
		alert('Please Only Enter Numeric Values For The Qty Box!');
		objH.value = objH.defaultValue;
		objH.focus();
		objH.select();
		return false;
	}
	else
	{
			return true;		
	}
}