var cashDownPositiveMsg="Cash Down has to be a positive number";
var flashConfirmInstallMsg="This page requires newer version of flash player.\n Please select OK to proceed and use download link to install.";

var selectMake = "Make";
var selectProvince = "Province";
var selectYear = "Year";
var selectModelFamilyCode = "Class";
var selectVehicleCode = "Body Style";
var selectTermsAndConditions = "You must read and agree with the Pricing Disclosures before proceeding.";
var systemUnavailableMsg="We are sorry, the system is currently unavailable right now. <br/>";
var toTryAgain="Please try again later. ";

function getCapCostMessage(deprecation,TotalDownPayment){
	//var totalDownPaymnetMeassge="ERROR: You may have entered an incorrect value.<br/>The highlighted field is causing an error: Total Down Payment ("+TotalDownPayment+") must be less than Depreciation ("+deprecation+").";
	var totalDownPaymnetMeassge="ERROR: You may have entered an incorrect value.<br/>The highlighted field is causing an error: Total Down Payment ("+TotalDownPayment+") cannot exceed ("+deprecation+").";
	return totalDownPaymnetMeassge;
}
function getTradeInAmtMessage(deprecation,TotalDownPayment){
	var tradeInAmtMessage="The Trade-In Value must be smaller than vehicle price.\n The Total-Down payment ("+TotalDownPayment+") must be less than depreciation ("+deprecation+").";
	return tradeInAmtMessage;
}

function invalidNumberMessage(val){
	var msg = "ERROR: You may have entered an incorrect value.</br>Please enter numbers only - no letters, spaces or symbols.";
	return msg;
}

function invalidKMMessage(val){
	var msg = "Maximum Annual Kilometer is 40000";
	return msg;
}

function  getAmountOwedMessage(cashTarde,amountOwed){
	var amountOwedMeassge="ERROR: You may have entered an incorrect value.</br>The highlighted field is causing an error: The Amount Owed on Trade-in ("+amountOwed+") must be smaller than Cash Down and Trade-in Amount ("+cashTarde+").";
	return amountOwedMeassge;
}
function invalidAPRMessage(val){
	var msg = "ERROR: You may have entered an incorrect value.</br>APR must be from 0% to 100%.";
	return msg;
}
function getSelectFollowingMsg(){
	var msg = "ERROR:&nbsp; Please select the following :<br/>";
	return msg;
}
function validateTotalDownpaymentMsg(totalDownpayment,vehiclePrice){
	var msg="ERROR: You may have entered an incorrect value.</br>The highlighted field is causing an error:Total Down Payment ("+totalDownpayment+") must be less than Vehicle Price ("+vehiclePrice+").";
	return msg;
}
function formatDecimalNumber(num) {
	if(isNaN(num))
	num = "0";
	sign = (num == (num = Math.abs(num)));
	num = Math.floor(num*100+0.50000000001);
	cents = num%100;
	num = Math.floor(num/100).toString();
	if(cents<10)
	cents = "0" + cents;
	
	return (  num + '.' + cents);
}
function invalidMaxLimitMsg(){
	return "ERROR: You may have entered an incorrect value.</br>Vehicle Price must be less than $999,999.00.";
}

function invalidCapCostMaxLimitMsg(){
	return "ERROR: You may have entered an incorrect value.</br>Vehicle Price must be below than $999,999.00.";
}
function invalidAnnualMileageMessage(){
	return "ERROR: You may have entered an incorrect value.</br>Annual Kilometres must be between 0 and 40000.";
}

function invalidTotalCashDownMessage(toatalCashDown,vehiclePrice){
	 return "ERROR: You may have entered an incorrect value.<br/>The highlighted field is causing an error:Total Down Payment ("+toatalCashDown+") must be less than Vehicle Price ("+vehiclePrice+").";
}

function invalidLeaseTotalCashDownMessage(toatalCashDown,vehiclePrice){
  return "ERROR: You may have entered an incorrect value.<br/>The highlighted field is causing an error:Total Down Payment ("+toatalCashDown+") must be less than Vehicle Price ("+vehiclePrice+").";
}

function vehiclePriceResidualValidationMessage(){
	return "ERROR: You may have entered an incorrect value.<br/>The highlighted field is causing an error: Vehicle Price cannot be less than Estimated Residual Value.";
}
