       
        var BCP=1;
        var SBP=0;
        var LMP=0;
        var GCD=0;
        var CXT=0;
        var SBOOK=0;
        var PEM=0;	     
        
        var howmany=0;   

	function submitform()
	{
        AdjustTotal();
		var theform=document.forms["frmSubmission"];
		var pin="";
		if(theform.elements["chkBCP"].checked == true) pin += "BCP-";
		if(theform.elements["chkSBP"].checked == true) pin += "SBP-";
		if(theform.elements["chkLMP"].checked == true) pin += "LMP-";
		if(theform.elements["chkGCD"].checked == true) pin += "GCD-";
		if(theform.elements["chkCXT"].checked == true) pin += "CXT-";
		if(theform.elements["chkSBOOK"].checked == true) pin += "SBOOK-";
		if(theform.elements["chkPEM"].checked == true) pin += "PEM-";
		
		if(howmany==1) pin=pin.replace("-","");
		//if(pin == "BCP-") pin = "BCP";
        
        theform.action="https://www.belltechsystems.com/store/EnterOrder.aspx?pid=" + pin ;//+ "&PayMode=paypal";
        //theform.action="http://localhost/store/EnterOrder.aspx?pid=" + pin ;//+ "&PayMode=paypal";
		if(pin=="")
  		    alert("select at least one product to continue!"); 
		else
		   theform.submit(); 
		   
		return false;
	}

	 
	function AdjustTotal() 
	{
	 
        var theform=document.forms["frmSubmission"];
        var total=0; 
        howmany=0;
        BCP = 0;
        SBP=0;
        LMP=0;
        GCD=0;
        CXT=0;
        SBOOK=0;
        PEM=0;	     
         
        if(theform.elements["chkBCP"].checked == true)  {BCP = 1;   howmany++;}
        if(theform.elements["chkSBP"].checked == true)  {SBP = 1;   howmany++;}
        if(theform.elements["chkLMP"].checked == true)  {LMP = 1;   howmany++;}
        if(theform.elements["chkGCD"].checked == true)  {GCD = 1;   howmany++;}
        if(theform.elements["chkCXT"].checked == true)  {CXT = 1;   howmany++;}
        if(theform.elements["chkSBOOK"].checked == true){SBOOK = 1; howmany++;}
        if(theform.elements["chkPEM"].checked == true)  {PEM = 1;   howmany++;} 			


        var fact=0.6;
 		if(howmany == 0) fact=0;
 		if(howmany == 1) fact=0;
 		if(howmany == 2) fact=0.25;
 		if(howmany == 3) fact=0.35;
 		if(howmany == 4) fact=0.40 ;
 		if(howmany == 5) fact=0.50;
 		if(howmany > 5) fact=0.50;
		var total=0; 

        total += 29.95 * BCP ; 
              
        total += 54.95 * SBP;
        total += 59.95 * LMP;
        total += 39.95 * GCD;
        total += 29.95 * CXT;
        total += 34.95 * SBOOK;
        total += 29.95 * PEM;
        
        var totalBefore=total; 
        total=total*(1-fact);
        
        
        if(total>119.95) total = 119.95;
        spnTotal.innerHTML =  Math.round(total*100 )/100  ;
          
        //------------------------
// 		var totalBefore=0; 
//        totalBefore += 29.95 ; 
//        totalBefore += 54.95 * SBP;
//        totalBefore += 59.95 * LMP;
//        totalBefore += 39.95 * GCD;
//        totalBefore += 29.95 * CXT;
//        totalBefore += 34.95 * SBOOK;
//        totalBefore += 29.95 * PEM;
        spnTotalBefore.innerHTML =  Math.round(totalBefore*100 )/100 ;
        if(howmany <= 1) spnTotalBefore.innerHTML="";
        if(totalBefore>1)
        spnDiscount.innerHTML = "[ Overall discount: " +  Math.round(100*(totalBefore-total)/totalBefore) + "% ]";
        
	}
	function SelectAll()
	{
	    var theform=document.forms["frmSubmission"];
	    theform.elements["chkBCP"].checked = true;
        theform.elements["chkSBP"].checked = true;
        theform.elements["chkLMP"].checked = true;
        theform.elements["chkGCD"].checked = true;
        theform.elements["chkCXT"].checked = true;
        theform.elements["chkSBOOK"].checked = true;
        theform.elements["chkPEM"].checked = true;
        
        AdjustTotal();
	}
 