<!--
function fixInput(obj){
	if (obj.value.indexOf("~") != -1){
		obj.value = Left(obj.value,obj.value.length-1)+"-";
		return;
	}
}

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function valSantaLetter() {
	valid = true;
	if(document.letterForm.rcpFirstName.value==""){
		alert("In step one above you haven't supplied a \'First Name\' for this recipient. Please do so before proceeding.");
		document.letterForm.rcpFirstName.focus();
		valid = false;
	}else if(document.letterForm.rcpLastName.value==""){
		alert("In step one above you haven't supplied a \'Last Name\' for this recipient. Please do so before proceeding.");
		document.letterForm.rcpLastName.focus();
		valid = false;
	}else if(document.letterForm.rcpAddress1.value==""){
		alert("In step one above you haven't supplied an \'Address\' for this recipient. Please do so before proceeding.");
		document.letterForm.rcpAddress1.focus();
		valid = false;
	}else if(document.letterForm.rcpGender.selectedIndex==0){
		alert("In step one above you haven't selected a \'Gender\' for this recipient. Please do so before proceeding.");
		document.letterForm.rcpGender.focus();
		valid = false;
	}else if(document.letterForm.rcpLocation.value==""){
		alert("In step one above you haven't supplied a \'Location on Easter\' for this recipient. Please do so before proceeding.");
		document.letterForm.rcpLocation.focus();
		valid = false;
	}else if(document.letterForm.stationery.selectedIndex==0){
		alert("In step two above you haven't selected a \'Stationery Design\' for this letter. Please do so before proceeding.");
		document.letterForm.stationery.focus();
		valid = false;
	}else if(document.letterForm.accomp1.value==""){
		alert("You skipped step three. Please supply at least one accomplishment or achievement. If you need to see an example use the \'See Example\' link above the first box. Be sure that these are in the correct order. (e.g. First accomplishement in the first box, second one in the second box, etc.) Also, read the sample box provided for clarity.");
		document.letterForm.accomp1.focus();
		valid = false;
	}else if(document.letterForm.wish1.value==""){
		alert("You skipped step four. Please supply at least one Easter tradition/activity. If you need to see an example use the \'See Example\' link above the first box. Be sure that these are in the correct order. (e.g. First wish item in the first box, second wish in the second box, etc.) Also, read the sample box provided for clarity.");
		document.letterForm.accomp1.focus();
		valid = false;
	}else if(document.letterForm.psMessage.value.length>250){
		alert("Your PS Message in step five exceeds the 250 character limit. Please adjust and try again.");
		document.letterForm.psMessage.focus();
		valid = false;
	}else if(document.letterForm.psMessage.value != "" && document.letterForm.psMessage.value.indexOf("P.S.",0) == -1){
		alert("Please make sure that \"P.S.\" is in your P.S. message exactly one time.");
		document.letterForm.psMessage.focus();
		valid = false;
	}else if(document.letterForm.letterStyle.value==""){
		alert("You skipped step six. Please choose a letter style by clicking on one of the 24 different styles available from the list. As you click on each you will see the copy of your letter displayed in the box to the right.");
		document.letterForm.letter.focus();
		valid = false;
	}
	if(valid && document.selectForm.shipFormSelect[0].checked){
		if(document.letterForm.rcpCity.value==""){
			alert("In step one above you haven't supplied an \'City\' for this recipient. Please do so before proceeding.");
			document.letterForm.rcpCity.focus();
			valid = false;
		}else if(document.letterForm.rcpState.selectedIndex==0){
			alert("In step one above you haven't supplied an \'State\' for this recipient. Please do so before proceeding.");
			document.letterForm.rcpState.focus();
			valid = false;
		}else if(document.letterForm.rcpZip.value==""){
			alert("In step one above you haven't supplied an \'Zip or Postal Code\' for this recipient. Please do so before proceeding.");
			document.letterForm.rcpZip.focus();
			valid = false;
		}else if(document.letterForm.rcpCountryDom.selectedIndex==0){
			alert("In step one above you haven't supplied an \'Country\' for this recipient. Please do so before proceeding.");
			document.letterForm.rcpCountryDom.focus();
			valid = false;
		}
	}
	if(valid && document.selectForm.shipFormSelect[1].checked){
		if(document.letterForm.rcpCountryInt.selectedIndex==0){
			alert("In step one above you haven't supplied an \'Country\' for this recipient. Please do so before proceeding.");
			document.letterForm.rcpCountryInt.focus();
			valid = false;
		}
	}
	if (valid) {
		MM_setTextOfTextfield('letter','',previewLetter(document.letterForm.letterStyle.value));
		
	}
	return valid;
}

function strCount(orig,strToFind){
	var found = 0;
	var testStr = "";
	var tempOrig = orig.toLowerCase();
	var tempToFind = strToFind.toLowerCase();
	if (InStr(tempOrig, tempToFind) != -1){
		found = 0;
		for (var i = 0;i < tempOrig.length;i++){
			testStr = Mid(tempOrig,i,tempToFind.length);
			if (testStr == tempToFind){
				found++;
			}
		}
	}
	return found;
}

function InStr(strSearch, charSearchFor){
	for (i=0; i < strSearch.length; i++){
		if (charSearchFor == Mid(strSearch, i, 1)){
			return i;
		}
	}
	return -1;
}

-->