function fnStripSpecChar(strName) {

	re = /\W+/;
	if(re.test(strName)) {
		strName = strName.replace(re, "");
		alert('special character not accepted');
	}
	return strName
}

function check_name() {
	nameVal = document.checkout.newusername.value;
	nameVal = fnStripSpecChar(nameVal);
	document.checkout.newusername.value = nameVal;
	eval(document.checkout.newusername);
}
function help() {
	var url = "help.html";
  	myWin = window.open(url, "helpWin","width=200,height=200,resizable=yes,scrollbars=no,status=no");
	myWin.focus();

}
function submit_user() {
	//check_name();
	document.checkout.submit();
}
function fnCancel (objForm) {
	objForm.Action.value = "cancel";
	objForm.submit();
}

function fnEdit_Check(objForm, strOpt) {
	objForm.Action.value = strOpt;
	objForm.submit();
}

function fnSubmit_cart(objForm, obj) {
	
	$flag = 0;
	if(objForm.x_last_name.value == "") {
		alert("Last Name is a required field.");
		return;
		//objF.focus();
	}
	if(objForm.x_first_name.value == "") {
		alert("First Name is a required field.");
		return;
		//objF.focus();
	}
	if(objForm.x_month.value == "") {
		alert("Expiration date has not been completed.");
		return;
		//objF.focus();
	}	
	if(objForm.x_year.value == "") {
		alert("Expiration date has not been completed.");
		return;
		//objF.focus();
	}
	if(objForm.x_card_num.value == "") {
		alert("Card Number is a required field.");
		return;
		//objF.focus();
	}
	if(objForm.x_card_code.value == "") {
		alert("Security card code is a required field.");
		return;
		//objF.focus();
	}
	obj.disabled = true;
	objForm.submit();
}

