function changeLocation(){	
	document.getElementById('searchFormMini').action="index.asp"					
	document.getElementById('searchFormMini').method  = "Get" ;
	document.getElementById('searchFormMini').submit() ;
 return (true);
}


function changePrice(sel){

	var sPrice = sel.options[sel.selectedIndex].value;
	if (sPrice == 'Full') {
	document.getElementById('mTotal').value = document.getElementById('mPrice').value;
	}else{
	document.getElementById('mTotal').value = document.getElementById('mDeposit').value;
	}
	
}

// Check Out System
function checkCheckOut2(theForm)
{
if (!checkNumbers(theForm.cardnumber,"Please fill in the \"Credit Card Number\" field!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.cvmvalue,"Please fill in the \"CVM\" field!", "yes"))	{
	return false;
} 
if (theForm.termsOfUse.checked==false)
  {
    alert("You must authorize Ride Chicago to charge your credit card before proceeding!");
    theForm.termsOfUse.focus();
    return (false);
  }
	var v = document.getElementById('Submit');
  v.style.display = "none"; 
  document.getElementById('Submit2').style.display = "inline";
  return (true);
}
//

// Check Out System
function checkCreditCard(theForm)
{
if (!checkNumbers(theForm.sCreditCard,"Please fill in the \"Credit Card Number\" field!", "yes"))	{
	return false;
}
if (!checkNumbers(theForm.sCvv2,"Please fill in the \"Credit Card Verification Number\" field!", "yes"))	{
	return false;
} 
if (theForm.iAuthorize.checked==false)
  {
    alert("Please check the \"I understand the $95 registration fee is non refundable.\"");
    theForm.iAuthorize.focus();
    return (false);
  }
if (theForm.iAuthorize2.checked==false)
  {
     alert("Please check the \"I accept the cancellation policy and terms and conditions as stated above. \"");
    theForm.iAuthorize2.focus();
    return (false);
}
  var v = document.getElementById('Submit');
  v.style.display = "none"; 
  document.getElementById('Submit2').style.display = "inline";
  return (true);
}
//


// Change Shipping
function changeShipping(id){
	window.location = "step2.asp?iShipping=" + id + "#shipping";
}
// Change Shipping



// duplicate address for user
function sameAddress2(theForm)
{
	var strErrorVal = "The following fields are required for this Feature: ";
	var focus = 0;
	if (theForm.bFirstName.value == "")
	{
		strErrorVal += "First Name, ";
		focus = 1;
	}
	if (theForm.bLastName.value == "")
	{
		strErrorVal += "Last Name, ";
		focus = 2;
	}
	if (theForm.bAddr1.value == "")
	{
		strErrorVal += "Address, ";
		focus = 3;
	}
	 if ( (theForm.bCity.value == "") )
	{
		strErrorVal += "City, ";
		focus = 4;
	}
	 if ( (theForm.bState.value == "") )
	{
		strErrorVal += "State, ";
		focus = 5;
	}
	 if ( (theForm.bCountry.value == "") )
	{
		strErrorVal += "Country, ";
		focus = 6;
	}
 if ( (theForm.bZip.value == "") )
	{
		strErrorVal += "Zip, ";
		focus = 7;
	}
 if ( (theForm.bPhone.value == "") )
	{
		strErrorVal += "Phone ";
		focus = 8;
	}
	
if (focus != 0){
	theForm.sameAsBilling.checked=false;

	alert(strErrorVal); }
else {
theForm.sFirstName.value = theForm.bFirstName.value
theForm.sLastName.value = theForm.bLastName.value
theForm.sCompany.value = theForm.bCompany.value
theForm.sAddr1.value = theForm.bAddr1.value
theForm.sAddr2.value = theForm.bAddr2.value
theForm.sCity.value = theForm.bCity.value
theForm.sState.value = theForm.bState.value
theForm.sZip.value = theForm.bZip.value
theForm.sPhone.value = theForm.bPhone.value
theForm.sFax.value = theForm.bFax.value
	}
}


// duplicate address for user
function sameAddress(theForm)
{
	var strErrorVal = "The following fields are required for this Feature: ";
	var focus = 0;
	if (theForm.sFirstName.value == "")
	{
		strErrorVal += "First Name, ";
		focus = 1;
	}
	if (theForm.sLastName.value == "")
	{
		strErrorVal += "Last Name, ";
		focus = 2;
	}
	if (theForm.sAddress.value == "")
	{
		strErrorVal += "Address, ";
		focus = 3;
	}
	 if ( (theForm.sCity.value == "") )
	{
		strErrorVal += "City, ";
		focus = 4;
	}
	 if ( (theForm.sState.value == "") )
	{
		strErrorVal += "State, ";
		focus = 5;
	}
	if ( (theForm.sZip.value == "") )
	{
		strErrorVal += "Zip, ";
		focus = 7;
	}
 	if ( (theForm.sPhone.value == "") )
	{
		strErrorVal += "Phone ";
		focus = 8;
	}
	
if (focus != 0){
	theForm.sameAsBilling.checked=false;

	alert(strErrorVal); }
else {
theForm.bFirstName.value = theForm.sFirstName.value
theForm.bLastName.value = theForm.sLastName.value
theForm.bAddress.value = theForm.sAddress.value
theForm.bAddress2.value = theForm.sAddress2.value
theForm.bCity.value = theForm.sCity.value
theForm.bState.value = theForm.sState.value
theForm.bZip.value = theForm.sZip.value
theForm.bPhone.value = theForm.sPhone.value
	}
}
