

function passText(passedvalue) {
	if (passedvalue != "") {

  
		var priceDef 
		var shippedPrice 


		if (passedvalue ==  "6 x 8") { 
			priceDef = 579
			if (form1.canvas.value == "yes") {
				priceDef = 359
			}
			if (form1.scach.value == "yes") {
				priceDef = priceDef + 75
			}
		
			if (form1.shipping.value == "SHIP") {
				
				shippedPrice = 89
	 

			}
		}



		
 if (passedvalue == "8 x 10") {
		priceDef = 649
		if (form1.canvas.value == "yes") {
				priceDef = 	389
			}
			if (form1.scach.value == "yes") {
				priceDef = priceDef + 120
			}
	
		if (form1.shipping.value == "SHIP") { 
			if (form1.shipState.value == "") {
				if (form1.ccf_state.value == "NY" ||  form1.ccf_state.value == "NJ" || form1.ccf_state.value == "PA" || form1.ccf_state.value == "MD" || form1.ccf_state.value == "VA" ||  form1.ccf_state.value == "OH" || form1.ccf_state.value == "MI" || form1.ccf_state.value == "IN" || form1.ccf_state.value == "IL" || form1.ccf_state.value == "KY" || form1.ccf_state.value == "TN" || form1.ccf_state.value == "AL") {
				
					shippedPrice = 139
				
				} 	else {
					
									shippedPrice = 219
				
				}
			} else {
				if (form1.shipState.value == "NY" ||  form1.shipState.value == "NJ" || form1.shipState.value == "PA" || form1.shipState.value == "MD" || form1.shipState.value == "VA" ||  form1.shipState.value == "OH" || form1.shipState.value == "MI" || form1.shipState.value == "IN" || form1.shipState.value == "IL" || form1.shipState.value == "KY" || form1.shipState.value == "TN" || form1.shipState.value == "AL") {
				
					shippedPrice = 139
				
				} 	else {
					
					shippedPrice = 219
				
				}
			}//			if (form1.shipState.value == "") {

			
		} //		if (form1.shipping.value == "SHIP") { 

}// if (passedvalue == "8 x 10") {




if (passedvalue == "8 x 12") {
		priceDef = 759
			if (form1.canvas.value == "yes") {
				priceDef = 459
			}
			if (form1.scach.value == "yes") {
		priceDef = priceDef + 150
		}
	
		if (form1.shipping.value == "SHIP") {
						if (form1.shipState.value == "") {

if (form1.ccf_state.value == "NY" ||  form1.ccf_state.value =="NJ" || form1.ccf_state.value =="PA" || form1.ccf_state.value =="MD" || form1.ccf_state.value =="VA" ||  form1.ccf_state.value =="OH" || form1.ccf_state.value =="MI" || form1.ccf_state.value =="IN" || form1.ccf_state.value =="IL" || form1.ccf_state.value =="KY" || form1.ccf_state.value =="TN" || form1.ccf_state.value =="AL") {
			shippedPrice = 139
	} 
	else {
		shippedPrice = 219
	}
	} else {
				if (form1.shipState.value == "NY" ||  form1.shipState.value == "NJ" || form1.shipState.value == "PA" || form1.shipState.value == "MD" || form1.shipState.value == "VA" ||  form1.shipState.value == "OH" || form1.shipState.value == "MI" || form1.shipState.value == "IN" || form1.shipState.value == "IL" || form1.shipState.value == "KY" || form1.shipState.value == "TN" || form1.shipState.value == "AL") {
				shippedPrice = 139
				} 	else {
					shippedPrice = 219
				}
			}
}
	}
		
		
if (passedvalue == "10 x 12") {
		priceDef = 799
		if (form1.canvas.value == "yes") {
				priceDef = 479
			}
			if (form1.scach.value == "yes") {
		priceDef = priceDef + 180
		}

if (form1.shipping.value == "SHIP") {

if (form1.shipState.value == "") {

if (form1.ccf_state.value == "NY" ||  form1.ccf_state.value =="NJ" || form1.ccf_state.value =="PA" || form1.ccf_state.value =="MD" || form1.ccf_state.value =="VA" ||  form1.ccf_state.value =="OH" || form1.ccf_state.value =="MI" || form1.ccf_state.value =="IN" || form1.ccf_state.value =="IL" || form1.ccf_state.value =="KY" || form1.ccf_state.value =="TN" || form1.ccf_state.value =="AL") {
			shippedPrice = 149
	} 	else {
		shippedPrice = 219
	}
	} else {
				if (form1.shipState.value == "NY" ||  form1.shipState.value == "NJ" || form1.shipState.value == "PA" || form1.shipState.value == "MD" || form1.shipState.value == "VA" ||  form1.shipState.value == "OH" || form1.shipState.value == "MI" || form1.shipState.value == "IN" || form1.shipState.value == "IL" || form1.shipState.value == "KY" || form1.shipState.value == "TN" || form1.shipState.value == "AL") {
				shippedPrice = 149
				} 	else {
					shippedPrice = 219
				}
			}
}


}




if (passedvalue == "10 x 16") {
		priceDef = 540
			if (form1.canvas.value == "yes") {
				priceDef = 539
			}
			if (form1.scach.value == "yes") {
		priceDef = priceDef + 240
		}
	
if (form1.shipping.value == "SHIP") {
								if (form1.shipState.value == "") {
if (form1.ccf_state.value == "NY" ||  form1.ccf_state.value =="NJ" || form1.ccf_state.value =="PA" || form1.ccf_state.value =="MD" || form1.ccf_state.value =="VA" ||  form1.ccf_state.value =="OH" || form1.ccf_state.value =="MI" || form1.ccf_state.value =="IN" || form1.ccf_state.value =="IL" || form1.ccf_state.value =="KY" || form1.ccf_state.value =="TN" || form1.ccf_state.value =="AL") {
	shippedPrice = 149
	} 
	else {
		shippedPrice = 219
	}
	} else {
				if (form1.shipState.value == "NY" ||  form1.shipState.value == "NJ" || form1.shipState.value == "PA" || form1.shipState.value == "MD" || form1.shipState.value == "VA" ||  form1.shipState.value == "OH" || form1.shipState.value == "MI" || form1.shipState.value == "IN" || form1.shipState.value == "IL" || form1.shipState.value == "KY" || form1.shipState.value == "TN" || form1.shipState.value == "AL") {
				shippedPrice = 149
				} 	else {
					shippedPrice = 219
				}
			}
}

}


if (passedvalue == "12 x 20") {
		priceDef = 815	
		if (form1.canvas.value == "yes") {
				priceDef = 819
			}
		if (form1.scach.value == "yes") {
		priceDef = priceDef + 360

}

if (form1.shipping.value == "SHIP") {
									if (form1.shipState.value == "") {

if (form1.ccf_state.value == "NY" ||  form1.ccf_state.value =="NJ" || form1.ccf_state.value =="PA" || form1.ccf_state.value =="MD" || form1.ccf_state.value =="VA" ||  form1.ccf_state.value =="OH" || form1.ccf_state.value =="MI" || form1.ccf_state.value =="IN" || form1.ccf_state.value =="IL" || form1.ccf_state.value =="KY" || form1.ccf_state.value =="TN" || form1.ccf_state.value =="AL") {
			shippedPrice = 149
	} 
	else {
		shippedPrice = 249
	}
	} else {
				if (form1.shipState.value == "NY" ||  form1.shipState.value == "NJ" || form1.shipState.value == "PA" || form1.shipState.value == "MD" || form1.shipState.value == "VA" ||  form1.shipState.value == "OH" || form1.shipState.value == "MI" || form1.shipState.value == "IN" || form1.shipState.value == "IL" || form1.shipState.value == "KY" || form1.shipState.value == "TN" || form1.shipState.value == "AL") {
				shippedPrice =149
				} 	else {
					shippedPrice = 249
				}
			}
}

}
//add 15$ surpluss year 2008

if (form1.shipping.value == "SHIP") {
					shippedPrice = shippedPrice + 15
					//canvas only ships at 1/2 price
				if (form1.canvas.value == "yes") {
shippedPrice = shippedPrice/2

}

} else {
						shippedPrice = 0
}



//add 100$ for door kit
			//if (form1.doorKit.value == "yes") {
//		priceDef = priceDef + 100
//		}
		
priceDef = priceDef + shippedPrice
    var totalvalue = "$" + priceDef ;
    document.form1.priceDisplay.value = totalvalue;
  }
}

function FrontPage_Form1_Validator(theForm) {

  if (theForm.ccf_title.value == "")  {
    alert("Please enter a value for the \"Title\" field.");
    theForm.ccf_title.focus();
    return (false);
  }
  
  if (theForm.ccf_FirstName.value == "")  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.ccf_FirstName.focus();
    return (false);
  }
  
   if (theForm.ccf_LastName.value == "")  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.ccf_LastName.focus();
    return (false);
  }

  if (theForm.ccf_Address.value == "")  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.ccf_Address.focus();
    return (false);
  }

  if (theForm.ccf_city.value == "")  {
    alert("Please enter a value for the \"City\" field.");
    theForm.ccf_city.focus();
    return (false);
  }

  if (theForm.ccf_state.value == "")  {
    alert("Please enter a value for the \"State\" field.");
    theForm.ccf_state.focus();
    return (false);
  }

  if (theForm.ccf_zipCode.value == "")  {
    alert("Please enter a value for the \"ZipCode\" field.");
    theForm.ccf_zipCode.focus();
    return (false);
  }
  
  
  if (theForm.ccf_HomePhone.value == "")  {
    alert("Please enter a value for the \"Phone Number\" field.");
    theForm.ccf_HomePhone.focus();
    return (false);
  }
  
 if (theForm.ccf_Email.value == "")  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.ccf_Email.focus();
    return (false);
  }
  
  if (theForm.design.value == "")  {
    alert("Please enter a value for the \"Design\" field.");
    theForm.design.focus();
    return (false);
  }
  
    if (theForm.size.value == "")  {
    alert("Please enter a value for the \"Size\" field.");
    theForm.size.focus();
    return (false);
  }
    //right here
 //   if (theForm.size.value == "6 x 8" && theForm.design.value == "Rich Embroidery")  {
   // alert("We do not have any more of this size in this design. Please select a different choice.");
    //theForm.size.focus();
    //return (false);
 // }
      if (theForm.scach.value == "")  {
    alert("Please enter a value for the \"Schach\" field.");
    theForm.scach.focus();
    return (false);
  }
  
  if (theForm.ccf_Security.value == "")   {
    alert("Please enter a value for the \"Security Code\" field.");
    theForm.ccf_Security.focus();
    return (false);
  }
  
   if (theForm.shipping.value == "")   {
    alert("Please enter a value for the \"Shipping\" field.");
    theForm.shipping.focus();
    return (false);
  }
  
    if (theForm.ccf_Security.value.length < 3)  {
    alert("Please enter at least 3 numbers in the \"Security Code\" field.");
    theForm.ccf_Security.focus();
    return (false);
  }

  

//credit card validation
  myCardNo = theForm.ccf_CCNumber.value;
  myCardType = theForm.ccf_CreditCard.value;
  
  if (!checkCreditCard (myCardNo,myCardType)) {
   alert ("You've entered an invalid credit card number. Please check the credit card number or make sure you have selected the correct credit card type.");
   theForm.ccf_CCNumber.focus();
   return(false);
   }


  if (theForm.ccf_CCMonth.value == "")
  {
    alert("Please select one of the \"CCMonth\" options.");
    return (false);
theForm.ccf_CCMonth.focus();
  }

  if (theForm.ccf_CCYear.value == "")
  {
    alert("Please select one of the \"CCYear\" options.");
    return (false);

theForm.ccf_CCYear.focus();
  }
 
  if (theForm.heard.value == "")  {
    alert("Please enter a value for the \"How you heard about us\" field.");
    theForm.heard.focus();
    return (false);
  }

  return (true);
}

