// Check Job Post System
function checkJobPost(theForm)
{
if (theForm.termsOfUse.checked==false)
  {
    alert("You must agree to the terms and use!");
    theForm.termsOfUse.focus();
    return (false);
  }
	var v = document.getElementById('Submit1');
	v.style.display = "none";
	document.getElementById('Submit2').style.display = "inline";
  return (true);
}
//


// Validate Upload
function checkUpload(theForm)
{
uploadProgress();
return true;
}


// Check Pledge
function checkPledge(theForm)
{
if (theForm.termsOfUse.checked==false)
  {
    alert("You must agree to the INTD Pledge!");
    theForm.termsOfUse.focus();
    return (false);
  }
}
//


// Check Terms
function checkTerms(theForm)
{
if (theForm.termsOfUse.checked==false)
  {
    alert("You must accept the Terms of Use before proceeding!");
    theForm.termsOfUse.focus();
    return (false);
  }
	var v = document.getElementById('Submit1');
	v.style.display = "none";
	document.getElementById('Submit2').style.display = "inline";
  return (true);
}
//


// Check Out System
function checkCreditCard(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 accept the Terms of Use before proceeding!");
    theForm.termsOfUse.focus();
    return (false);
  }
	var v = document.getElementById('Submit1');
	v.style.display = "none";
	document.getElementById('Submit2').style.display = "inline";
  return (true);
}
//

// 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.sCountry.value == "") )
	{
		strErrorVal += "Country, ";
		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.bCountry.value = theForm.sCountry.value
theForm.bZip.value = theForm.sZip.value
theForm.bPhone.value = theForm.sPhone.value
	}
}
