<!--


function checkForm ( obj ) {
     //var total = document.getElementById("total").innerHTML
     var el        = obj.elements;
     var total = parseFloat(document.getElementById("subtotal").innerHTML)

     //alert(total);
    //if(!parseFloat(total)) {
    if(!total) {
       alert('You have not selected any products.\nPlease select at least one item from the list above before checking out.\nThank you');
       return false;
    }

    //alert(el['RawTotal'].value);


	// maximum monthly
	/*
  if( el['RawTotal'].value > vendor_monthly_remainder) {
	
		alert('You have exceeded remaining $' + roundToTwo(vendor_monthly_remainder) + ' of your monthly purchase limit.\nPlease, remove some items from your cart.\n\nYour monthly cap is $' + roundToTwo(vendor_max_monthly) + '.');
		return false;
	
	}
	*/
	
	// minimum per-order purchase limit
	/*
  if( el['RawTotal'].value < vendor_min_purchase ) {
	
		alert('Your minimum purchase is $' + roundToTwo(vendor_min_purchase) + '.\nPlease, continue shopping.');
		return false;
	
	}
  */  
	// maximum per-order purchase limit
	/*
	if( el['RawTotal'].value > vendor_max_purchase ) {
	
		alert('You have exceeded your maximum purchase limit $' + roundToTwo(vendor_max_purchase) + '.\nPlease, remove some items from your cart.');
		return false;
	
	}
  */




    return true;







}

function roundToTwo(num) {
 
	if(num == 0) return '0.00';
	
	num = parseFloat(num) * 100;				// multiply by 100
	
	num = Math.round(num);	// removes any other decimal numbers
	
	
	var tmp;     // textual form
	
	tmp = (num + '').replace(/[^0-9]/i, '');	// remove any non-numeric characters
	
	// place the decimal point where it belongs
	tmp = tmp.substring(0, tmp.length - 2) + '.' + tmp.substring(tmp.length - 2, tmp.length);
	
	return tmp;
 
}

-->
