function isNumeric( objElement )
{ 
	var varElement = objElement.value ;
	if( varElement.length > 0 )
	{
		var varChar = varElement.slice( varElement.length - 1, varElement.length ) ;
		if( isNaN(parseInt(varChar)) )
		{
			alert("Only numbers (0-9) are allowed here.") ;
			varElement = varElement.slice(0,varElement.length-1) ;
			objElement.value = varElement ;
		}
	}
}

function chkQty( objForm )
{

// Preliminary check for adding to cart
	if( objForm.qty.value.length == 0 )
	{
		alert("Please enter a quantity.");
		objForm.qty.focus() ;
		return false ;
	}

//	Return from function
	return true ;
}

function PopchkQty( objForm )
{

// Preliminary check for adding to cart
	if( objForm.qty.value.length == 0 )
	{
		alert("Please enter a quantity.");
		objForm.qty.focus() ;
		return false ;
	}

//	Return from function successfully and pass into to cart
	opener.passText(objForm.action.value,objForm.id.value,objForm.qty.value);
	window.close();
	return true ;
}

function UpdateQty(item)
{
	itemId = item.name;
	newQty = item.options[item.selectedIndex].text;
				
	document.location.href = 'cart.php?action=update_item&id='+itemId+'&qty='+newQty;
}

function DoPrint()
{
	var fnErrHandler = window.onerror;
	window.onerror = handlePrintErr;

	if (window.print)
	{
		window.print();
	}
	else
	{
		WB.ExecWB(6,1);
	}

	window.onerror = fnErrHandler;
}

function handlePrintErr()
{
	return true;
}
