// JavaScript Document

// FOR THE TEST DRIVE FORM
function test_drive_verify()
{
var pname=document.test_drive.pname.value;
var mobile=document.test_drive.mobile.value;
var city=document.test_drive.city.value;


if(pname=='')
{
alert("Enter the Contact Person"); 
document.test_drive.pname.focus();
return false;
}

if(mobile=='')
{
alert("Enter the Mobile"); 
document.test_drive.mobile.focus();
return false;
}

if(city=='')
{
alert("Enter the City"); 
document.test_drive.city.focus();
return false;
}

return true;
}




// FOR THE REQUEST QUOTE FORM
function quote_verify()
{
var car=document.quote.car.value;
var city=document.quote.city.value;
var age=document.quote.age.value;

var pname=document.quote.pname.value;
var email=document.quote.email.value;
var mobile=document.quote.mobile.value;



if(car=='')
{
alert("Enter the Car Model"); 
document.quote.car.focus();
return false;
}

if(city=='')
{
alert("Enter the City"); 
document.quote.city.focus();
return false;
}

if(age=='')
{
alert("Enter the Age"); 
document.quote.age.focus();
return false;
}



if(pname=='')
{
alert("Enter the Contact Person"); 
document.quote.pname.focus();
return false;
}


if(email=='')
{
alert("Enter the Email"); 
document.quote.email.focus();
return false;
}

if(mobile=='')
{
alert("Enter the Mobile"); 
document.quote.mobile.focus();
return false;
}

return true;
}



// FOR THE FEEDBACK FORM
function feedback_verify()
{
var pname=document.feedback.pname.value;
var mobile=document.feedback.mobile.value;
var email=document.feedback.email.value;


if(pname=='')
{
alert("Enter the Contact Person"); 
document.feedback.pname.focus();
return false;
}


if(mobile=='')
{
alert("Enter the Mobile"); 
document.feedback.mobile.focus();
return false;
}


if(email=='')
{
alert("Enter the Email"); 
document.feedback.email.focus();
return false;
}

return true;
}


// FOR THE SERVICE BOOKING FORM
function servicebooking()
{
var pname=document.service_booking.pname.value;
var address=document.service_booking.address.value;
var mobile=document.service_booking.mobile.value;



if(pname=='')
{
alert("Enter the Contact Person"); 
document.service_booking.pname.focus();
return false;
}

if(address=='')
{
alert("Enter the Address"); 
document.service_booking.address.focus();
return false;
}

if(mobile=='')
{
alert("Enter the Mobile"); 
document.service_booking.mobile.focus();
return false;
}



return true;
}


// FOR THE AUTOLOAN FORM
function autoloan_verify()
{
var pname=document.auto_loan.pname.value;
var address=document.auto_loan.address.value;
var email=document.auto_loan.email.value;



if(pname=='')
{
alert("Enter the Contact Person"); 
document.auto_loan.pname.focus();
return false;
}

if(email=='')
{
alert("Enter the Email"); 
document.auto_loan.email.focus();
return false;
}

if(address=='')
{
alert("Enter the Address"); 
document.auto_loan.address.focus();
return false;
}





return true;
}


// FOR THE AUTOTERRACE FORM
function autoterrace_verify()
{
var trade_infor=document.auto_terrace.trade_infor.value;
var car_make=document.auto_terrace.car_make.value;
var model=document.auto_terrace.model.value;
var model_year=document.auto_terrace.model_year.value;
var km_driven=document.auto_terrace.km_driven.value;
var regis_no=document.auto_terrace.regis_no.value;
var feature_engine=document.auto_terrace.feature_engine.value;
var feature_trans=document.auto_terrace.feature_trans.value;
var pname=document.auto_terrace.pname.value;
var mobile=document.auto_terrace.mobile.value;
var email=document.auto_terrace.email.value;


if(trade_infor=='')
{
alert("Select Car"); 
document.auto_terrace.trade_infor.focus();
return false;
}

if(car_make=='')
{
alert("Select Car Manufacture"); 
document.auto_terrace.car_make.focus();
return false;
}

if(model=='')
{
alert("Enter the Model"); 
document.auto_terrace.model.focus();
return false;
}

if(model_year=='')
{
alert("Select Model Year"); 
document.auto_terrace.model_year.focus();
return false;
}


if(km_driven=='')
{
alert("Enter the Kilometers Driven"); 
document.auto_terrace.km_driven.focus();
return false;
}


if(regis_no=='')
{
alert("Enter the Registration No"); 
document.auto_terrace.regis_no.focus();
return false;
}

if(feature_engine=='')
{
alert("Select Engine"); 
document.auto_terrace.feature_engine.focus();
return false;
}

if(feature_trans=='')
{
alert("Select Transmission"); 
document.auto_terrace.feature_trans.focus();
return false;
}


if(pname=='')
{
alert("Enter the Contact Person"); 
document.auto_terrace.pname.focus();
return false;
}


if(mobile=='')
{
alert("Enter the Mobile"); 
document.auto_terrace.mobile.focus();
return false;
}

if(email=='')
{
alert("Enter the Email"); 
document.auto_terrace.email.focus();
return false;
}




return true;
}

