//**********************************************************************
//                             StaticCart                              *
//  JavaScript Selectable Payment Methods Module     Copyright 2004-06 *
//                                                                     *
//**********************************************************************
//                                                                     *
// None of this script may be redistributed or sold without the        *
// authors express consent. Violations of this copyright will be       *
// prosecuted.  If you would like to use StaticCart, email us at       *
// carl@staticcart.com or visit http://www.staticcart.com              *
//                                                                     *
//**********************************************************************

function dispatch() {

if (document.form.selector[document.form.selector.selectedIndex].value == "sc1") {scCredit1()};
if (document.form.selector[document.form.selector.selectedIndex].value == "sc2") {scCredit2()};
if (document.form.selector[document.form.selector.selectedIndex].value == "sc3") {scCredit3()};
if (document.form.selector[document.form.selector.selectedIndex].value == "sc4") {scCredit4()};

}

function scCredit1(){
if(ComputeShipping){
   shipMethod=ReadCookie('ShippingMeth');
      if((shipMethod==null)||(shipMethod=="select")){
          alert('Please Select Your Prefered Shipping Method');
      return false;
   }
}
   if ( TaxByRegion ) {
   if ( TaxSelected == 1) {
        document.form.method="Get";
        document.form.action="sc-checkout1.html";
        document.form.submit();
      } else {
         alert( TaxPrompt );     
	}
   }
   if ( !TaxByRegion ) {
        document.form.method="Get";
        document.form.action="sc-checkout1.html";
        document.form.submit();
      }
}

function scCredit2(){
if(ComputeShipping){
   shipMethod=ReadCookie('ShippingMeth');
      if((shipMethod==null)||(shipMethod=="select")){
          alert('Please Select Your Prefered Shipping Method');
      return false;
   }
}
    if ( TaxByRegion ) {

   if ( TaxSelected == 1){
        document.form.method="Get";
        document.form.action="sc-checkout2.html";
        document.form.submit();
      } else {
         alert( TaxPrompt );
	}
   }
   if ( !TaxByRegion ) {
        document.form.method="Get";
        document.form.action="sc-checkout2.html";
        document.form.submit();
      }
}

function scCredit3(){
if(ComputeShipping){
   shipMethod=ReadCookie('ShippingMeth');
      if((shipMethod==null)||(shipMethod=="select")){
          alert('Please Select Your Prefered Shipping Method');
      return false;
   }
}
   if ( TaxByRegion ) {
      if ( TaxSelected == 1) {
        document.form.method="Get";
        document.form.action="sc-checkout3.html";
        document.form.submit();
      } else {
         alert( TaxPrompt );
	}
   }
   if ( !TaxByRegion ) {
        document.form.method="Get";
        document.form.action="sc-checkout3.html";
        document.form.submit();
      }
}

function scCredit4(){
if(ComputeShipping){
   shipMethod=ReadCookie('ShippingMeth');
      if((shipMethod==null)||(shipMethod=="select")){
          alert('Please Select Your Prefered Shipping Method');
      return false;
   }
}
   if ( TaxByRegion ) {
      if ( TaxSelected == 1) {
        document.form.method="Get";
        document.form.action="sc-checkout4.html";
        document.form.submit();
      } else {
         alert( TaxPrompt );
	}
   }
   if ( !TaxByRegion ) {
        document.form.method="Get";
        document.form.action="sc-checkout4.html";
        document.form.submit();
      }
}

// -->
