// JavaScript Document

/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
 
// email related functions
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}
// end of email related functions 

// phone no related functions

/**
 * DHTML phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}
/*
function ValidateForm(){
	var Phone=document.frmSample.txtPhone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true
 }
*/
// end of phone number related functions

// --------------------------------validation for buyer section-----------------------------------------
 function validateBuyer(){
	 if ((document.myForm.firstName.value==null)||(document.myForm.firstName.value==0)){
		alert("Please enter first name")
		document.myForm.firstName.focus()
		return false
	 }
	  if ((document.myForm.surName.value==null)||(document.myForm.surName.value=="")){
		alert("Please surname")
		document.myForm.surName.focus()
		return false
	 }
		
	var Phone=document.myForm.contactNo
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter Your Mobile Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Contact Number")
		Phone.value=""
		Phone.focus()
		return false
	} 
	
	 var emailID=document.myForm.email
	 if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	 }
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	  if ((document.myForm.country.value==null)||(document.myForm.country.value==0)){
		alert("Please select country name")
		document.myForm.country.focus()
		return false
	 }
	 if ((document.myForm.city.value==null)||(document.myForm.city.value==0)){
		alert("Please select state name")
		document.myForm.city.focus()
		return false
	 }
	 if ((document.myForm.category.value==null)||(document.myForm.category.value==0)){
		alert("Please select category")
		document.myForm.category.focus()
		return false
	 }
	 if ((document.myForm.product.value==null)||(document.myForm.product.value==0)){
		alert("Please select product")
		document.myForm.product.focus()
		return false
	 }
	//return true
// checking own bike section or want to purchase dream riders bike	
	if (!(document.myForm.ownMotorcycle[0].checked)&&(!document.myForm.ownMotorcycle[1].checked)){
		alert("Please shown your interest in Motorcycle to modify");
		return false
		}
	/*if (document.myForm.ownMotorcycle[0].checked){
		if ((document.myForm.model.value==null)||(document.myForm.model.value=="")){
			alert("Please Enter Vehicle Model")
			document.getElementById("model").focus()
			return false
		 }
	}*/
	if (document.myForm.ownMotorcycle[1].checked){
		//alert(document.myForm.ownMotorcycle[1].checked);
		if (!(document.myForm.dreamridersBike[0].checked)&&(!document.myForm.dreamridersBike[1].checked)){
		alert("Please select do you want to purchase Dream Riders bike");
		return false
		}
		if (document.myForm.dreamridersBike[0].checked){
			 if ((document.myForm.dreamBike.value==null)||(document.myForm.dreamBike.value==0)){
				alert("Please select Dream Riders Bike")
				document.myForm.dreamBike.focus()
				return false
			 }
			 if (document.myForm.dreamBike.value=="Others"){
				 if ((document.myForm.otherBike.value=="")||(document.myForm.otherBike.value==null)){
					alert("Please specify bike")
					document.myForm.otherBike.focus()
					return false
				}
			 }
		}
		
	}
// end of bike section code	
	  if ((document.myForm.budget.value==null)||(document.myForm.budget.value==0)){
		alert("Please select budget to spend")
		document.myForm.budget.focus()
		return false
	 }
	 
	  // validation for budget radio button	 
	
	  if ((document.myForm.hearOfUs.value==null)||(document.myForm.hearOfUs.value==0)){
		alert("Please select where did you hear of us")
		document.myForm.hearOfUs.focus()
		return false
	 }
/*	 if (!document.myForm.terms.checked){
		alert("Please Accept Terms & conditions");
		return false
	 }
// upload file validation
var objUpload=eval("document.getElementById('uploaded')");
    var sUpload=objUpload.value;
    if(sUpload=="")
        {
        	alert("Please upload image!");
            objUpload.focus();
            event.returnValue=false; 
            return; 
      
     }*/

 }
// --------------------------------end of buyer section validation--------------------------------------
// --------------------------------validation for Seller section-----------------------------------------

 function validateSeller(){
	 
	 if ((document.myForm.tradename.value==null)||(document.myForm.tradename.value==0)){
		alert("Please enter trade name")
		document.myForm.tradename.focus()
		return false
	 }
	 if ((document.myForm.firstName.value==null)||(document.myForm.firstName.value==0)){
		
		alert("Please enter first name")
		document.myForm.firstName.focus()
		return false
	 }
	  if ((document.myForm.surName.value==null)||(document.myForm.surName.value=="")){
		alert("Please enter last name")
		document.myForm.surName.focus()
		return false
	 }
		
	var Phone=document.myForm.contactNo
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter Your Contact Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Contact Number")
		Phone.value=""
		Phone.focus()
		return false
	} 
	
	 var emailID=document.myForm.email
	 if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	 }
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	  if ((document.myForm.country.value==null)||(document.myForm.country.value==0)){
		alert("Please select country name")
		document.myForm.country.focus()
		return false
	 }
	 if ((document.myForm.city.value==null)||(document.myForm.city.value==0)){
		alert("Please select state")
		document.myForm.city.focus()
		return false
	 }
	 
	 if ((document.myForm.txtcity.value==null)||(document.myForm.txtcity.value=="")){
		alert("Please enter city name")
		document.myForm.txtcity.focus()
		return false
	 }	
	 
	 if (document.myForm.shwroom.value=='yes'){
		    if ((document.myForm.location.value==null)||(document.myForm.location.value==0)){
		alert("Please enter show room location")
		document.myForm.location.focus()
		return false }
	 }
	 
	 if ((document.myForm.owingYear.value==null)||(document.myForm.owingYear.value==0)){
		alert("Please select year")
		document.myForm.owingYear.focus()
		return false
	 }
	 if (document.myForm.website.value=='yes'){
		    if ((document.myForm.weburl.value==null)||(document.myForm.weburl.value==0)){
		alert("Please enter web url make")
		document.myForm.weburl.focus()
		return false }
	 }
	 if ((document.myForm.noofstaff.value==null)||(document.myForm.noofstaff.value==0)){
		alert("Please select Staff")
		document.myForm.noofstaff.focus()
		return false
	 }
	 if ((document.myForm.monthlysale.value==null)||(document.myForm.monthlysale.value==0)){
		alert("Please select monthly Sale")
		document.myForm.monthlysale.focus()
		return false
	 }
	  if ((document.myForm.unitsold.value==null)||(document.myForm.unitsold.value==0)){
		alert("Please enter number of unit sold")
		document.myForm.unitsold.focus()
		return false
	 } else if(isNaN(document.myForm.unitsold.value)){
		  alert("Please enter numeric number")
		 document.myForm.unitsold.focus()
		 return false
		 }
	 if ((document.myForm.unitrep.value==null)||(document.myForm.unitrep.value==0)){
		alert("Please enter number of unit repair")
		document.myForm.unitrep.focus()
		return false
	 }else if(isNaN(document.myForm.unitrep.value)){
		  alert("Please enter numeric number")
		document.myForm.unitrep.focus()
		return false
		 }
	if ((document.myForm.hearOfUs.value==null)||(document.myForm.hearOfUs.value==0)){
		alert("Please select where did you hear of us")
		document.myForm.hearOfUs.focus()
		return false
	 }
	//return true
	
	
 }
// --------------------------------end of Seller section validation--------------------------------------
 
 
 function validate2(){
// validation for custom category checkbox 	 
var checkbox_choice = false;
var customCategory=document.getElementsByName('customCategory[]');

		for (var counter = 0; counter < customCategory.length; counter++)
		{
		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (customCategory[counter].checked)
		checkbox_choice = true; 
		}
		
		if (!checkbox_choice)
		{
		// If there were no selections made display an alert box 
		alert("Please Select Your Custom Category .")
		customCategory[0].focus();
		return (false);
		}
		//return (true);



	 /* if (document.myForm.customCategory1.checked == false &&
		  document.myForm.customCategory2.checked == false &&
		  document.myForm.customCategory3.checked == false &&
		  document.myForm.customCategory4.checked == false &&
		  document.myForm.customCategory5.checked == false &&
		  document.myForm.customCategory6.checked == false &&
		  document.myForm.customCategory7.checked == false &&
		  document.myForm.customCategory8.checked == false &&
		  document.myForm.customCategory9.checked == false 
		  ){
		alert("Please Choose atleast one Category");
		return false
	 } */
// validation for budget radio button	 
	 var radio_choice = false;
		for (counter = 0; counter < document.myForm.budget.length; counter++)
		{
		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (document.myForm.budget[counter].checked)
		radio_choice = true; 
		}
		
		if (!radio_choice)
		{
		// If there were no selections made display an alert box 
		alert("Please Select Your Budget.")
		return (false);
		}
		//return (true);
		
// validation for closeDealTime radio button	 
	 var radio_choice = false;
		for (counter = 0; counter < document.myForm.closeDealTime.length; counter++)
		{
		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (document.myForm.closeDealTime[counter].checked)
		radio_choice = true; 
		}
		
		if (!radio_choice)
		{
		// If there were no selections made display an alert box 
		alert("Please Select When You Want To Close The Above Deal.")
		return (false);
		}
		//return (true);		
// validation for modeOfAppointment radio button	 
	 var radio_choice = false;
		for (counter = 0; counter < document.myForm.modeOfAppointment.length; counter++)
		{
		// If a radio button has been selected it will return true
		// (If not it will return false)
		if (document.myForm.modeOfAppointment[counter].checked)
		radio_choice = true; 
		}
		
		if (!radio_choice)
		{
		// If there were no selections made display an alert box 
		alert("Please Select Mode Of Appointment.")
		return (false);
		}
		if ((document.myForm.callOrVisitTime.value==null)||(document.myForm.callOrVisitTime.value=="")){
		alert("Please Enter Call Or Visit Time")
		document.myForm.callOrVisitTime.focus()
		return false
	 }
		//return (true);
	 /* if (!document.myForm.budget.checked){
		alert("Please Choose Your Budget");
		return false
	 } */
	 if (!document.myForm.acknowledge.checked){
		alert("Please acknowledge you have read this");
		return false
	 }

 }
 
function validateShareFriends(){
	 if(document.myForm.notLogin.value=="notLogin"){
		 if ((document.myForm.senderName.value==null)||(document.myForm.senderName.value=="")){
			alert("Please Enter Your Name")
			document.myForm.senderName.focus()
			return false 
		 }
		 
	  var senderEmailID=document.myForm.senderEmail;
		 if ((senderEmailID.value==null)||(senderEmailID.value=="")){
			alert("Please Enter Your Email ID")
			senderEmailID.focus()
			return false
		 }
		if (echeck(senderEmailID.value)==false){
			senderEmailID.value=""
			senderEmailID.focus()
			return false
		}	 
	 }
	 
	 if ((document.myForm.friend_validate.value==null)||(document.myForm.friend_validate.value=="")){
		alert("Please Enter Friend's Name")
		document.myForm.friend_validate.focus()
		return false
	 }
	 var emailID=document.myForm.email_validate;
	 if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter Friend's Email ID")
		emailID.focus()
		return false
	 }
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	//return true
	if ((document.myForm.realName.value==null)||(document.myForm.realName.value=="")){
		alert("Please Enter Real Name")
		document.myForm.realName.focus()
		return false
	 }
	if ((document.myForm.message.value==null)||(document.myForm.message.value=="")){
		alert("Please Enter Message")
		document.myForm.message.focus()
		return false
	 }
	

 }
 
  function validateSellerVehicle(){
	  if ((document.myForm.vehicleName.value==null)||(document.myForm.vehicleName.value==0)){
		alert("Please enter vehicle name")
		document.myForm.vehicleName.focus()
		return false
	 }
	  if ((document.myForm.vehicleCategory.value==null)||(document.myForm.vehicleCategory.value==0)){
		alert("Please enter vehicle category")
		document.myForm.vehicleCategory.focus()
		return false
	 }
	  if ((document.myForm.shortDescription.value==null)||(document.myForm.shortDescription.value==0)){
		alert("Please enter short description")
		document.myForm.shortDescription.focus()
		return false
	 }
	  if ((document.getElementById("profileImage").value==null)||(document.getElementById("profileImage").value=="")){
		alert("Please upload profile image")
		document.getElementById("profileImage").focus()
		return false
	 }
	  if ((document.myForm.profileImageDesc.value==null)||(document.myForm.profileImageDesc.value==0)){
		alert("Please enter profile image description")
		document.myForm.profileImageDesc.focus()
		return false
	 }
	   if ((document.getElementById("exteriorImage").value==null)||(document.getElementById("exteriorImage").value=="")){
		alert("Please upload exterior image")
		document.getElementById("exteriorImage").focus()
		return false
	 }
	  if ((document.myForm.exteriorImageDesc.value==null)||(document.myForm.exteriorImageDesc.value==0)){
		alert("Please enter exterior image description")
		document.myForm.exteriorImageDesc.focus()
		return false
	 }
	   if ((document.getElementById("interiorImage").value==null)||(document.getElementById("interiorImage").value=="")){
		alert("Please upload interior image")
		document.getElementById("interiorImage").focus()
		return false
	 }
	  if ((document.myForm.interiorImageDesc.value==null)||(document.myForm.interiorImageDesc.value==0)){
		alert("Please enter interior image description")
		document.myForm.interiorImageDesc.focus()
		return false
	 }
	    if ((document.getElementById("fullLengthImage").value==null)||(document.getElementById("fullLengthImage").value=="")){
		alert("Please upload full length image")
		document.getElementById("fullLengthImage").focus()
		return false
	 }
	  if ((document.myForm.fullLengthImageDesc.value==null)||(document.myForm.fullLengthImageDesc.value==0)){
		alert("Please enter full length image description")
		document.myForm.fullLengthImageDesc.focus()
		return false
	 }
	  if ((document.myForm.quotePrice.value==null)||(document.myForm.quotePrice.value==0)){
		alert("Please enter quote price")
		document.myForm.quotePrice.focus()
		return false
	 }
	  if ((document.myForm.additionalComments.value==null)||(document.myForm.additionalComments.value==0)){
		alert("Please enter your comment")
		document.myForm.additionalComments.focus()
		return false
	 }
	  if ((document.myForm.postalAddress.value==null)||(document.myForm.postalAddress.value==0)){
		alert("Please enter your postal address")
		document.myForm.postalAddress.focus()
		return false
	 }
	  if ((document.myForm.landLine.value==null)||(document.myForm.landLine.value==0)){
		alert("Please enter your phone number")
		document.myForm.landLine.focus()
		return false
	 }
	  if ((document.myForm.mobileNumber.value==null)||(document.myForm.mobileNumber.value==0)){
		alert("Please enter your mobile number")
		document.myForm.mobileNumber.focus()
		return false
	 }
	  if (!document.myForm.termCondition.checked){
		alert("Please check you are agree with the terms and conditions");
		return false
	 }
	 
 }
  function validateSellerVehicleUpdate(){
	  if ((document.myForm.vehicleName.value==null)||(document.myForm.vehicleName.value==0)){
		alert("Please enter vehicle name")
		document.myForm.vehicleName.focus()
		return false
	 }
	  if ((document.myForm.vehicleCategory.value==null)||(document.myForm.vehicleCategory.value==0)){
		alert("Please enter vehicle category")
		document.myForm.vehicleCategory.focus()
		return false
	 }
	  if ((document.myForm.shortDescription.value==null)||(document.myForm.shortDescription.value==0)){
		alert("Please enter short description")
		document.myForm.shortDescription.focus()
		return false
	 }
	  
	  if ((document.myForm.profileImageDesc.value==null)||(document.myForm.profileImageDesc.value==0)){
		alert("Please enter profile image description")
		document.myForm.profileImageDesc.focus()
		return false
	 }
	  
	  if ((document.myForm.exteriorImageDesc.value==null)||(document.myForm.exteriorImageDesc.value==0)){
		alert("Please enter exterior image description")
		document.myForm.exteriorImageDesc.focus()
		return false
	 }
	  
	  if ((document.myForm.interiorImageDesc.value==null)||(document.myForm.interiorImageDesc.value==0)){
		alert("Please enter interior image description")
		document.myForm.interiorImageDesc.focus()
		return false
	 }
	   
	  if ((document.myForm.fullLengthImageDesc.value==null)||(document.myForm.fullLengthImageDesc.value==0)){
		alert("Please enter full length image description")
		document.myForm.fullLengthImageDesc.focus()
		return false
	 }
	  if ((document.myForm.quotePrice.value==null)||(document.myForm.quotePrice.value==0)){
		alert("Please enter quote price")
		document.myForm.quotePrice.focus()
		return false
	 }
	  if ((document.myForm.additionalComments.value==null)||(document.myForm.additionalComments.value==0)){
		alert("Please enter your comment")
		document.myForm.additionalComments.focus()
		return false
	 }
	  if ((document.myForm.postalAddress.value==null)||(document.myForm.postalAddress.value==0)){
		alert("Please enter your postal address")
		document.myForm.postalAddress.focus()
		return false
	 }
	  if ((document.myForm.landLine.value==null)||(document.myForm.landLine.value==0)){
		alert("Please enter your phone number")
		document.myForm.landLine.focus()
		return false
	 }
	  if ((document.myForm.mobileNumber.value==null)||(document.myForm.mobileNumber.value==0)){
		alert("Please enter your mobile number")
		document.myForm.mobileNumber.focus()
		return false
	 }
	  if (!document.myForm.termCondition.checked){
		alert("Please check you are agree with the terms and conditions");
		return false
	 }
	 
 }

 function blogCommentValidation(){
	 if ((document.blogCommentForm.blogUserName.value==null)||(document.blogCommentForm.blogUserName.value=="")){
		alert("Please enter your name")
		document.blogCommentForm.blogUserName.focus()
		return false
	 }
	 
	 var emailID=document.blogCommentForm.blogUserEmail;
	 if ((emailID.value==null)||(emailID.value=="")){
		alert("Please enter your valid email id")
		emailID.focus()
		return false
	 }
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	} 
	 if ((document.blogCommentForm.blogComment.value==null)||(document.blogCommentForm.blogComment.value=="")){
		alert("Please enter your comment")
		document.blogCommentForm.blogComment.focus()
		return false
	 } 
	 
	 
 }
 function blogCommentBottomValidation(){
	 if ((document.blogCommentBottomForm.blogUserName.value==null)||(document.blogCommentBottomForm.blogUserName.value=="")){
		alert("Please enter your name")
		document.blogCommentBottomForm.blogUserName.focus()
		return false
	 }
	 
	 var emailID=document.blogCommentBottomForm.blogUserEmail;
	 if ((emailID.value==null)||(emailID.value=="")){
		alert("Please enter your valid email id")
		emailID.focus()
		return false
	 }
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	} 
	 if ((document.blogCommentBottomForm.blogComment.value==null)||(document.blogCommentBottomForm.blogComment.value=="")){
		alert("Please enter your comment")
		document.blogCommentBottomForm.blogComment.focus()
		return false
	 } 
	 
	 
 }
 
function validatePoll(){
 var radio_choice = false;
		for (counter = 0; counter < document.myFormPoll.poll.length; counter++)
		{
		if ( document.myFormPoll.poll[counter].checked)
		radio_choice = true; 
		}
		
		if (!radio_choice)
		{
		alert("Please select your answer and submit!"); 
		return (false);
		}
		
		if ((document.myFormPoll.userName.value==null)||(document.myFormPoll.userName.value=="")){
		alert("Please enter your name")
		document.myFormPoll.userName.focus()
		return false
	 	} 
		 var emailID=document.myFormPoll.userEmail;
		 if ((emailID.value==null)||(emailID.value=="")){
			alert("Please enter your valid email id")
			emailID.focus()
			return false
		 }
		if (echeck(emailID.value)==false){
			emailID.value=""
			emailID.focus()
			return false
		} 
} 


//Show hide function

function showhide(status,id)
{

if(status=="yes")
{
document.getElementById(id).style.display = 'block';
}
if(status=="no")
{
document.getElementById(id).style.display = 'none';
}


}



function showroomfld(status,id1,id2,id3)
{

if(status=="yes")
{
document.getElementById(id1).style.display = 'block';
document.getElementById(id2).style.display = 'block';
document.getElementById(id3).style.display = 'block';
}
if(status=="no")
{
document.getElementById(id1).style.display = 'none';
document.getElementById(id2).style.display = 'none';
document.getElementById(id3).style.display = 'none';
}


}
 /*function validateSellerVehicle(){
	  if ((document.myForm.vehicleName.value==null)||(document.myForm.vehicleName.value==0)){
		alert("Please enter vehicle name")
		document.myForm.vehicleName.focus()
		return false
	 }
	  if ((document.myForm.vehicleCategory.value==null)||(document.myForm.vehicleCategory.value==0)){
		alert("Please enter vehicle category")
		document.myForm.vehicleCategory.focus()
		return false
	 }
	  if ((document.myForm.shortDescription.value==null)||(document.myForm.shortDescription.value==0)){
		alert("Please enter short description")
		document.myForm.shortDescription.focus()
		return false
	 }
	  if ((document.getElementById("profileImage").value==null)||(document.getElementById("profileImage").value=="")){
		alert("Please upload profile image")
		document.getElementById("profileImage").focus()
		return false
	 }
	  if ((document.myForm.profileImageDesc.value==null)||(document.myForm.profileImageDesc.value==0)){
		alert("Please enter profile image description")
		document.myForm.profileImageDesc.focus()
		return false
	 }
	   if ((document.getElementById("exteriorImage").value==null)||(document.getElementById("exteriorImage").value=="")){
		alert("Please upload exterior image")
		document.getElementById("exteriorImage").focus()
		return false
	 }
	  if ((document.myForm.exteriorImageDesc.value==null)||(document.myForm.exteriorImageDesc.value==0)){
		alert("Please enter exterior image description")
		document.myForm.exteriorImageDesc.focus()
		return false
	 }
	   if ((document.getElementById("interiorImage").value==null)||(document.getElementById("interiorImage").value=="")){
		alert("Please upload interior image")
		document.getElementById("interiorImage").focus()
		return false
	 }
	  if ((document.myForm.interiorImageDesc.value==null)||(document.myForm.interiorImageDesc.value==0)){
		alert("Please enter interior image description")
		document.myForm.interiorImageDesc.focus()
		return false
	 }
	    if ((document.getElementById("fullLengthImage").value==null)||(document.getElementById("fullLengthImage").value=="")){
		alert("Please upload full length image")
		document.getElementById("fullLengthImage").focus()
		return false
	 }
	  if ((document.myForm.fullLengthImageDesc.value==null)||(document.myForm.fullLengthImageDesc.value==0)){
		alert("Please enter full length image description")
		document.myForm.fullLengthImageDesc.focus()
		return false
	 }
	  if ((document.myForm.quotePrice.value==null)||(document.myForm.quotePrice.value==0)){
		alert("Please enter quote price")
		document.myForm.quotePrice.focus()
		return false
	 }
	  if ((document.myForm.additionalComments.value==null)||(document.myForm.additionalComments.value==0)){
		alert("Please enter your comment")
		document.myForm.additionalComments.focus()
		return false
	 }
	  if ((document.myForm.postalAddress.value==null)||(document.myForm.postalAddress.value==0)){
		alert("Please enter your postal address")
		document.myForm.postalAddress.focus()
		return false
	 }
	  if ((document.myForm.landLine.value==null)||(document.myForm.landLine.value==0)){
		alert("Please enter your phone number")
		document.myForm.landLine.focus()
		return false
	 }
	  if ((document.myForm.mobileNumber.value==null)||(document.myForm.mobileNumber.value==0)){
		alert("Please enter your mobile number")
		document.myForm.mobileNumber.focus()
		return false
	 }
	  if (!document.myForm.termCondition.checked){
		alert("Please check you are agree with the terms and conditions");
		return false
	 }
	 
 }
  function validateSellerVehicleUpdate(){
	  if ((document.myForm.vehicleName.value==null)||(document.myForm.vehicleName.value==0)){
		alert("Please enter vehicle name")
		document.myForm.vehicleName.focus()
		return false
	 }
	  if ((document.myForm.vehicleCategory.value==null)||(document.myForm.vehicleCategory.value==0)){
		alert("Please enter vehicle category")
		document.myForm.vehicleCategory.focus()
		return false
	 }
	  if ((document.myForm.shortDescription.value==null)||(document.myForm.shortDescription.value==0)){
		alert("Please enter short description")
		document.myForm.shortDescription.focus()
		return false
	 }
	  
	  if ((document.myForm.profileImageDesc.value==null)||(document.myForm.profileImageDesc.value==0)){
		alert("Please enter profile image description")
		document.myForm.profileImageDesc.focus()
		return false
	 }
	  
	  if ((document.myForm.exteriorImageDesc.value==null)||(document.myForm.exteriorImageDesc.value==0)){
		alert("Please enter exterior image description")
		document.myForm.exteriorImageDesc.focus()
		return false
	 }
	  
	  if ((document.myForm.interiorImageDesc.value==null)||(document.myForm.interiorImageDesc.value==0)){
		alert("Please enter interior image description")
		document.myForm.interiorImageDesc.focus()
		return false
	 }
	   
	  if ((document.myForm.fullLengthImageDesc.value==null)||(document.myForm.fullLengthImageDesc.value==0)){
		alert("Please enter full length image description")
		document.myForm.fullLengthImageDesc.focus()
		return false
	 }
	  if ((document.myForm.quotePrice.value==null)||(document.myForm.quotePrice.value==0)){
		alert("Please enter quote price")
		document.myForm.quotePrice.focus()
		return false
	 }
	  if ((document.myForm.additionalComments.value==null)||(document.myForm.additionalComments.value==0)){
		alert("Please enter your comment")
		document.myForm.additionalComments.focus()
		return false
	 }
	  if ((document.myForm.postalAddress.value==null)||(document.myForm.postalAddress.value==0)){
		alert("Please enter your postal address")
		document.myForm.postalAddress.focus()
		return false
	 }
	  if ((document.myForm.landLine.value==null)||(document.myForm.landLine.value==0)){
		alert("Please enter your phone number")
		document.myForm.landLine.focus()
		return false
	 }
	  if ((document.myForm.mobileNumber.value==null)||(document.myForm.mobileNumber.value==0)){
		alert("Please enter your mobile number")
		document.myForm.mobileNumber.focus()
		return false
	 }
	  if (!document.myForm.termCondition.checked){
		alert("Please check you are agree with the terms and conditions");
		return false
	 }
	 
 }
*/
