var submitcount42059=0;
function checkOutValues(theForm){
	var why = "";
	if (theForm.ShipFirst) why += isEmpty(theForm.ShipFirst.value, "First Name");
	if (theForm.ShipLast) why += isEmpty(theForm.ShipLast.value, "Last Name"); 
	if (theForm.ShipEmail) why += checkEmail(theForm.ShipEmail.value); 
	if (theForm.ShipPhone) why += isEmpty(theForm.ShipPhone.value, "Phone Number"); 
	if (theForm.ShipAddress) why += isEmpty(theForm.ShipAddress.value, "Shipping Address"); 
	if (theForm.ShipCity) why += isEmpty(theForm.ShipCity.value, "Shipping City"); 
	if (theForm.ShipState) why += isEmpty(theForm.ShipState.value, "Shipping State"); 
	if (theForm.ShipZip) why += isEmpty(theForm.ShipZip.value, "Shipping Zipcode"); 
	if (theForm.ShipCountry) why += checkDropdown(theForm.ShipCountry.value, "Shipping Country"); 
	if(why != "") {alert(why);return false;}
	if(submitcount42059 == 0){
		submitcount42059++;
		theForm.submit();
		return false;
	}else{alert("Form submission is in progress.");
		return false;
	}
}
function signupValues(theForm){
	var why = "";
	if (theForm.User_First) why += isEmpty(theForm.User_First.value, "First Name");
	if (theForm.User_Last) why += isEmpty(theForm.User_Last.value, "Last Name"); 
	if (theForm.User_Email) why += checkEmail(theForm.User_Email.value); 
	if (theForm.User_PW1 && theForm.User_PW2) { 
		why += isEmpty(theForm.User_PW1.value, "Password"); 
		why += isEmpty(theForm.User_PW2.value, "Confirm Password");
		if (theForm.User_PW1.value != theForm.User_PW2.value) why += "- Password and its confirmation do not match.\n";
	} 
	if(why != "") {alert(why);return false;}
	if(submitcount42059 == 0){
		submitcount42059++;
		theForm.submit();
		return false;
	}else{alert("Form submission is in progress.");
		return false;
	}
}
function checkUpdateValues(theForm){
	var why = "";
	if(theForm.Password.value != ""){
		if (theForm.Password.value != theForm.ConfirmPassword.value) why += "- Password and its confirmation do not match.\n";
	} 
	if(why != "") {alert(why);return false;}
	if(submitcount42059 == 0){
		submitcount42059++;
		theForm.submit();
		return false;
	}else{alert("Form submission is in progress.");
		return false;
	}
}
function checkResetForm(theForm){
	var why = "";
	if (theForm.User_Email) why += checkEmail(theForm.User_Email.value); 
	if(why != "") {alert(why);return false;}
	if(submitcount42059 == 0){
		submitcount42059++;
		theForm.submit();
		return false;
	}else{alert("Form submission is in progress.");
		return false;
	}
}
function isEmpty(b,d){var c="";if(b.trim().length==0){c="- Please enter a value for "+d+"\n"}return c}
function checkDropdown(b,d){var c="";if(b.length==0||b==" "){c="- Please select a value for "+d+"\n"}return c}
function checkEmail(c){var d="";if(c.length>0){var b=/^.+@.+\..{2,6}$/;if(!(b.test(c))){d="- Please provide a valid email address\n";}else{var e=/[\(\)\<\>\,\;\:\\\"\[\]]/;if(c.match(e)){d="- Please provide a valid email address\n";}}}else{d="- Please enter a value for Email\n";}return d;}
String.prototype.trim=function(){a=this.replace(/^\s+/,"");return a.replace(/\s+$/,"")};

function charsetV(b){var c="";switch(b){case"JA":c="shift-jis";break;case"IS":case"CS":case"SL":case"SV":c="iso-8859-1";break;default:c="utf-8";break}return c}
function formfield(b,g){switch(g){case"firstupper":var e=true;var f=true;for(var d=1;d<b.length;d++){var j=b.charCodeAt(d);if(j>=65&&j<=90){f=false}if(j>=97&&j<=127){e=false}}if(e||f){var h=b.split(" ");b="";for(var d=0;d<h.length;d++){if(h[d].length>=1){b=b+" "+h[d].substring(0,1).toUpperCase()+h[d].substring(1).toLowerCase()}}}b=b.replace(".","");b=b.replace(",","");break;case"firstupperspecial":var h=b.split(" ");b="";for(var d=0;d<h.length;d++){if(h[d].length>=1){b=b+" "+h[d].substring(0,1).toUpperCase()+h[d].substring(1)}}break;case"alllower":b=b.toLowerCase();break;case"allupper":b=b.toUpperCase();break;default:break}if(b.substring(0,1)==" "){b=b.substring(1)}return b}
function isCurrency(e,g){var b="";if(e.length==0){b="- "+g+validatelang.Currency.MustNumber}else{for(var d=0;d<e.length;d++){var f=e.charAt(d);if((f<"0")||(f>"9")){if(f!="."&&f!=","){b="- "+g+validatelang.Currency.NoSymbol}}}}return b}
function isNumeric(e,g){var b="";if(e.length==0){b="- "+g+validatelang.Number.MustNumber}else{var d;for(d=0;d<e.length;d++){var f=e.charAt(d);if((f<"0")||(f>"9")){b="- "+g+validatelang.Number.NoDecimal;return b}}}return b}
function isFloat(e,g){var b="";var d;if(e.length==0){b="- "+g+validatelang.Float.MustNumber}else{for(d=0;d<e.length;d++){var f=e.charAt(d);if(((f<"0")||(f>"9"))){if(f!="."&&f!=","){b="- "+g+validatelang.Float.MustNumber;return b}}}}return b}
function checkSelected(e,b){var c="- "+b+validatelang.Select.MustSelect;if(e.length>0){for(var d=0;d<e.length;d++){if(e[d].disabled==false&&e[d].checked==true){c=""}}}else{if(e.disabled==false&&e.checked==true){c=""}}return c}
function getRadioSelected(c){if(c.length>0){for(var b=0;b<c.length;b++){if(c[b].disabled==false&&c[b].checked==true){return c[b].value}}}else{if(c.disabled==false&&c.checked==true){return c.value}}return null}
function checkSelectedX(h,c){var e="- "+c+validatelang.Select.MustSelect;var g=document.getElementById(h);var d=g.getElementsByTagName("td");var b;for(var f=0;f<d.length;f++){ctrl=d[f].firstChild;if(ctrl.type=="checkbox"||ctrl.type=="radio"){if(ctrl.disabled==false&&ctrl.checked==true){e=""}}}return e}
function checkSpaces(b,e){var c="";for(var d=0;d<b.length;d++){if(b.charAt(d)==" "){c="- "+e+validatelang.Others.CannotContain+validatelang.Others.WhiteSpace}}return c}
function checkUrlChar(b,f){var d="";for(i=0;i<b.length;i++){var e=b.charAt(i);switch(e){case"/":case"\\":case"#":case"?":case":":case"@":case"=":case"&":case'"':case"|":case"_":case".":d="- "+f+validatelang.Others.CannotContain+"["+e+"] "+validatelang.Others.Character;return d}}return d}
function isInteger(d){var b;if(d.length==0){return false}for(b=0;b<d.length;b++){var e=d.charAt(b);if(((e<"0")||(e>"9"))){return false}}return true}
function checkDate(c,e){var b="";if(c.length==0){b=validatelang.Enter.PleaseEnter+e+validatelang.CheckDate.ValidDate;return b}return b}
function appendBreak(b){return b=b+"\n"}