function validateuserdata1() {
	var valid = true, output = '';
	var x = document.ccform.cardNumber.value;
	var anum=/(^\d+$)|(^\d+\.\d+$)/;
	
	if (anum.test(x)){
			valid = true;
		}
		else{
			valid = false;
			output += 'Please enter a valid credit card number\n';
    	}
	
	if (window.document.ccform.name.value.length == 0) {
        valid = false;
        output += 'Please enter your name\n';
	
	}
	if (window.document.ccform.address.value.length == 0) {
        valid = false;
        output += 'Please enter your address\n';
	
	}
	if (window.document.ccform.city.value.length == 0) {
        valid = false;
        output += 'Please enter your city\n';
	
	}
	if (window.document.ccform.zip.value.length == 0) {
        valid = false;
        output += 'Please enter your ZIP code\n';
	
	}
	if (window.document.ccform.dayphone.value.length == 0) {
        valid = false;
        output += 'Please enter your daytime telephone number\n';
	}
	
	if (window.document.ccform.evening_phone.value.length == 0) {
        valid = false;
        output += 'Please enter your evening telephone number\n';
	}
	
	if (window.document.ccform.billing_name.value.length == 0) {
        valid = false;
        output += 'Please enter your billing name\n';
	}
	
	if (window.document.ccform.billing_address.value.length == 0) {
        valid = false;
        output += 'Please enter your billing address\n';
	}
	
	if (window.document.ccform.billing_city.value.length == 0) {
        valid = false;
        output += 'Please enter your billing city\n';
	}
	
	if (window.document.ccform.billing_state.value.length == 0) {
        valid = false;
        output += 'Please enter your billing state\n';
	}
	
	if (window.document.ccform.billing_zip.value.length == 0) {
        valid = false;
        output += 'Please enter your billing ZIP code\n';
	}
	
	if (document.ccform.subscription_type[0].checked == '' && document.ccform.subscription_type[1].checked == '' && document.ccform.subscription_type[2].checked == '' && document.ccform.subscription_type[3].checked == '' && document.ccform.subscription_type[4].checked == '' && document.ccform.subscription_type[5].checked == '' && document.ccform.subscription_type[6].checked == '') {
		valid = false;
		output += 'Please select your subscription type\n';
	}
	
	//if (document.ccform.free_gift[0].checked == '' && document.ccform.free_gift[1].checked == '' && document.ccform.free_gift[2].checked == '' && document.ccform.free_gift[3].checked == '') {
		//valid = false;
		//output += 'Please select your free gift\n';
	//}
	
	if (document.ccform.agree.checked == "0") {
		valid = false;
		output += 'Please Read the Terms of Use and check the box\n';
	}
	
	
		
    if (window.document.ccform.cardType.selectedIndex == 0) {
		valid = false;
        output += 'Please select your credit card type - only Visa, MasterCard and Discover accepted\n';

    }

	if (window.document.ccform.cardMonth.value.length == 0) {
        valid = false;
		output += 'Please select the month your card expires\n';
	
    }

	if (window.document.ccform.cardYear.value.length == 0) {
        valid = false;
		output += 'Please select the year your card expires\n';
		
    }
	
    if (window.document.ccform.cardNumber.value.length == 0) {
        valid = false;
		output += 'Please enter a credit card number\n';
		}
		
	if (window.document.ccform.cardNumber.value.length <= 15) {
		valid = false;
		output += 'Please use a sixteen digit credit card number';
		}

	
	if (!valid){
        alert(output);
		return false;
		}

	
}


function validateuserdata2() {
var valid = true, output = '';
var x = document.ccform.cardNumber.value;
var anum=/(^\d+$)|(^\d+\.\d+$)/;
	
	if (anum.test(x)){
			valid = true;
		}
		else{
			valid = false;
			output += 'Please enter a valid credit card number\n';
    	}

	if (window.document.ccform.name.value.length == 0) {
        valid = false;
        output += 'Please enter your name\n';
	
	}
	if (window.document.ccform.address.value.length == 0) {
        valid = false;
        output += 'Please enter your address\n';
	
	}
	if (window.document.ccform.city.value.length == 0) {
        valid = false;
        output += 'Please enter your city\n';
	
	}
	if (window.document.ccform.zip.value.length == 0) {
        valid = false;
        output += 'Please enter your ZIP code\n';
	
	}
	if (window.document.ccform.dayphone.value.length == 0) {
        valid = false;
        output += 'Please enter your daytime telephone number\n';
	}
	
	if (window.document.ccform.evening_phone.value.length == 0) {
        valid = false;
        output += 'Please enter your evening telephone number\n';
	}
		
	if (document.ccform.agree.checked == "0") {
		valid = false;
		output += 'Please Read the Terms of Use and check the box\n';
	}
	

	if (window.document.ccform.cardType.selectedIndex == 0) {
		valid = false;
        output += 'Please select your credit card type - only Visa, MasterCard and Discover accepted\n';

    }

	if (window.document.ccform.cardMonth.value.length == 0) {
        valid = false;
		output += 'Please select the month your card expires\n';
	
    }

	if (window.document.ccform.cardYear.value.length == 0) {
        valid = false;
		output += 'Please select the year your card expires\n';
		
    }
	
    if (window.document.ccform.cardNumber.value.length == 0) {
        valid = false;
		output += 'Please enter a credit card number\n';
		}
		
	if (window.document.ccform.cardNumber.value.length <= 15) {
		valid = false;
		output += 'Please use a sixteen digit credit card number';
		}
	
	if (!valid){
        alert(output);
		return false;
		}
}


function validateuserdata3() {
	var valid = true, output = '';
	var x = document.ccform.cardNumber.value;
	var anum=/(^\d+$)|(^\d+\.\d+$)/;
	
	if (anum.test(x)){
			valid = true;
		}
		else{
			valid = false;
			output += 'Please enter a valid credit card number\n';
    	}
	
	if (window.document.ccform.dayphone.value.length == 0) {
        valid = false;
        output += 'Please enter your daytime telephone number\n';
	}
	
	if (window.document.ccform.evening_phone.value.length == 0) {
        valid = false;
        output += 'Please enter your evening telephone number\n';
	}
	
	if (window.document.ccform.billing_name.value.length == 0) {
        valid = false;
        output += 'Please enter your billing name\n';
	}
	
	if (window.document.ccform.billing_address.value.length == 0) {
        valid = false;
        output += 'Please enter your billing address\n';
	}
	
	if (window.document.ccform.billing_city.value.length == 0) {
        valid = false;
        output += 'Please enter your billing city\n';
	}
	
	if (window.document.ccform.billing_state.value.length == 0) {
        valid = false;
        output += 'Please enter your billing state\n';
	}
	
	if (window.document.ccform.billing_zip.value.length == 0) {
        valid = false;
        output += 'Please enter your billing ZIP code\n';
	}
	
	if (document.ccform.subscription_type.checked == '') {
		valid = false;
		output += 'Please select your subscription type\n';
	}
	
	if (document.ccform.agree.checked == "0") {
		valid = false;
		output += 'Please Read the Terms of Use and check the box\n';
	}
	
	if (document.ccform.payment_interval.checked == '') {
		valid = false;
		output += 'Please select your payment interval\n';
	}
	
	
	
		
    if (window.document.ccform.cardType.selectedIndex == 0) {
		valid = false;
        output += 'Please select your credit card type - only Visa, MasterCard and Discover accepted\n';

    }

	if (window.document.ccform.cardMonth.value.length == 0) {
        valid = false;
		output += 'Please select the month your card expires\n';
	
    }

	if (window.document.ccform.cardYear.value.length == 0) {
        valid = false;
		output += 'Please select the year your card expires\n';
		
    }
	
    if (window.document.ccform.cardNumber.value.length == 0) {
        valid = false;
		output += 'Please enter a credit card number\n';
		}
		
	if (window.document.ccform.cardNumber.value.length <= 15) {
		valid = false;
		output += 'Please use a sixteen digit credit card number';
		}

	
	if (!valid){
        alert(output);
		return false;
		}

	
}

function validateuserdataCI() {
	var valid = true, output = '';
	var anum=/(^\d+$)|(^\d+\.\d+$)/;
	if (window.document.ccform.na.value.length == 0) {
        valid = false;
        output += 'Please enter your name\n';
	}
	
	if (window.document.ccform.ad.value.length == 0) {
        valid = false;
        output += 'Please enter your address\n';
	}
	
	if (window.document.ccform.ci.value.length == 0) {
        valid = false;
        output += 'Please enter your city\n';
	}
	
	if (window.document.ccform.zi.value.length == 0) {
        valid = false;
        output += 'Please enter your zip code\n';
	}
	
	if (window.document.ccform.ph.value.length == 0) {
        valid = false;
        output += 'Please enter your phone number\n';
	}
	
	//if (window.document.ccform.em.value.length == 0) {
        //valid = false;
        //output += 'Please enter your email address\n';
	//}
	
	if (window.document.ccform.de.value == 'none') {
        valid = false;
        output += 'Please select you area of delivery interest\n';
	}
	
	if (window.document.ccform.cj.value.length == 0) {
        valid = false;
        output += 'Please enter your current job\n';
	}
	
	if (window.document.ccform.cs.value.length == 0) {
        valid = false;
        output += 'Please enter your current work schedule\n';
	}
	
	if (!valid){
        alert(output);
		return false;
		}

	
}


function copy(address){

var name = document.ccform.name.value;
var address = document.ccform.address.value;
var city = document.ccform.city.value;
var state = document.ccform.state.value;
var zip = document.ccform.zip.value;

document.ccform.billing_name.value = name;
document.ccform.billing_address.value = address;
document.ccform.billing_city.value = city;
document.ccform.billing_state.value = state;
document.ccform.billing_zip.value = zip;

}

function openpopup1(){
var popurl="terms.htm"
winpops = window.open(popurl,"","scrollbars=yes,toolbar=no,width=400,height=500")
}

function openpopup2(){
var popurl="subscription_options.htm"
winpops = window.open(popurl,"","scrollbars=yes,toolbar=no,width=400,height=500")
}

var checkflag = "false";
function check(field) {
	if (checkflag == "false") {
		for (i = 0; i < field.length; i++) {
			field[i].checked = true;}
			checkflag = "true";
			return "Uncheck All To Print"; }
		else {
			for (i = 0; i < field.length; i++) {
			field[i].checked = false; }
			checkflag = "false";
			return "Check All To Print"; }
	}

