function CheckVerifyChangedPassword()
	    {
		if (document.ChangePassword.NewPassword.value != document.ChangePassword.CNewPassword.value)
		   {
		   alert("Your two passwords do not match. Re-enter your password please!");
		   document.ChangePassword.NewPassword.value='';
		   document.ChangePassword.CNewPassword.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
		/*function CheckVerifyEmail()
	    {
		if (document.signup.ContactEmail.value != document.signup.ContactEmail2.value)
		   {
		   alert("Your two ContactEmail do not match. Re-enter your ContactEmail please!");
		   document.signup.ContactEmail.value='';
		   document.signup.ContactEmail2.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
	*/	
function CheckVerifyPassword()
	    {
		//if (document.thisForm.CustPassword.value != document.thisForm.Password2.value)
		if (document.newcustomer.CustPassword.value != document.newcustomer.Password2.value)
		   {
		   alert("Your two passwords do not match. Re-enter your password please!");
		   //document.thisForm.CustPassword.value='';
		   //document.thisForm.Password2.value='';
		   document.newcustomer.CustPassword.value='';
		   document.newcustomer.Password2.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
		
	function CheckVerifyMemberPassword()
	    {
		
		if (document.signup.MemPassword.value != document.signup.Password2.value)
		   {
		   alert("Your two passwords do not match. Re-enter your password please!");
		   document.signup.MemPassword.value='';
		   document.signup.Password2.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
		
	function CheckVerifyMemberUsername()
	    {
		
		if (document.signup.MemUserName.value != document.signup.Username2.value)
		   {
		   alert("Your two usersname do not match. Re-enter your username please!");
		   document.signup.MemUserName.value='';
		   document.signup.Username2.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
		
function CheckVerifyEmail()
	    {
		//if (document.thisForm.ContactEmail.value != document.thisForm.ContactEmail2.value)
		if (document.newcustomer.Email.value != document.newcustomer.Email2.value)
		   {
		   alert("Your two ContactEmails do not match. Re-enter your ContactEmail please!");
		   //document.thisForm.ContactEmail.value='';
		   //document.thisForm.ContactEmail2.value='';
		   document.newcustomer.Email.value='';
		   document.newcustomer.Email2.value='';
		   return false;
		   }
		else
		   {
		   return true;
		   }	
		}
		
// Wirtten by David Leppek of Pay By Touch Merchant Services as a free easy method of validating a credit card
function Mod10(ccNumb) { //v2.0
var valid 	= "0123456789"
var len 	= ccNumb.length;
var bNum 	= true;
var iCCN 	= ccNumb;
var sCCN 	= ccNumb.toString();
var iCCN;
var iTotal 	= 0;
var bResult = false;
var digit;
var temp;
	iCCN = sCCN.replace (/^\s+|\s+$/g,'');	// strip spaces
    //alert(iCCN);
for (var j=0; j<len; j++) {
temp = "" + iCCN.substring(j, j+1);
if (valid.indexOf(temp) == "-1") bNum = false;
}
if(!bNum){alert("Not a Number");}
    iCCN = parseInt(iCCN);
	
if(len == 0){ /* nothing, field is blank */ 
	bResult = true;
}else{
	if(len >= 15){		//15 or 16 for Amex or V/MC
		for(var i=len;i>0;i--){
		digit = "digit" + i;
		//alert(digit);
		
			calc = parseInt(iCCN) % 10;	//right most digit
			calc = parseInt(calc);
			//alert(calc);
			iTotal += calc;		//parseInt(cardnum.charAt(count))i:\t" + calc.toString() + " x 2 = " + (calc *2) +" : " + calc2 + "\n";
			// commented out below which wrote NONALTERED digit to page for demo only.
			//document.form1.textfield.value += "" + i + ":\t" + calc.toString() + " x 1 = " + calc + "\n";
			
			i--;
		digit = "digit" + i;
		//alert(digit);
		
			iCCN = iCCN / 10; 	// subtracts right most digit from ccNum
			calc = parseInt(iCCN) % 10 ;	// step 1 double every other digit
			 //alert( iCCN + " " + calc);
			 calc2 = calc *2;
			
			switch(calc2){
				case 10: calc2 = 1; break;	//5*2=10 & 1+0 = 1
				case 12: calc2 = 3; break;	//6*2=12 & 1+2 = 3
				case 14: calc2 = 5; break;	//7*2=14 & 1+4 = 5
				case 16: calc2 = 7; break;	//8*2=16 & 1+6 = 7
				case 18: calc2 = 9; break;	//9*2=18 & 1+8 = 9
				default: calc2 = calc2; 		//4*2= 8 &   8 = 8  -same for all lower numbers
			}
			iCCN = iCCN / 10; 	// subtracts right most digit from ccNum
			iTotal += calc2;
			// commented out below which wrote MULTIPLIED digit to page for demo only
			//document.form1.textfield.value += "" + i +":\t" + calc.toString() + " x 2 = " + (calc *2) +" : " + calc2 + "\n";
		}
			// commeneted out SUM below for demo only
			//document.form1.textfield.value += "\t\tSum: " + iTotal + "\n";
		if ((iTotal%10)==0){
			//document.calculator.results.value = "Yes"; 
			bResult = true;
 		}else{
			//document.calculator.results.value = "No"; 
			bResult = false;
		}
	}
}
// change alert to on-page display or other indication if needed.
if(!bResult){alert("This is NOT a valid Credit Card Number!");}
  return false;
}


//-->
