


function fillform(obj){

		var counter = 1

	  for (i=1; i < CarsListing.length; i++){

	     if (CarsListing[i][0] != CarsListing[i-1][0]){

	        obj.options[counter]=new Option();

	        obj.options[counter].text = CarsListing[i][0];

            obj.options[counter].value = CarsListing[i][0];

	        counter++

	     }

	  }

	}





function selectcar1(obj){

		document.Car.Cartype1.length=1;

                document.Car.Cartype2.length=1;

		var CarName = obj.options[obj.options.selectedIndex].text;	

		var c=1;

		while (CarsListing[c][0] != CarName){c++;}

		var e=c;

		while (CarsListing[e][0] == CarName){e++;if(e==CarsListing.length-1){CarName="";}}

		var count = 0;

		if (CarName ==""){e++}

	  	for (i=c; i < e; i++){

                 if (CarsListing[i][1] != CarsListing[i-1][1]){

	    	count++;

		    document.Car.Cartype1.options[count]=new Option();	

		    document.Car.Cartype1.options[count].text = CarsListing[i][1];

		    document.Car.Cartype1.options[count].value = CarsListing[i][1];

                  }

	    }

	}


function selectcar2(obj){

		document.Car.Cartype2.length=1

		var CarName = obj.options[obj.options.selectedIndex].text;	

		var c=1;

		while (CarsListing[c][1] != CarName){c++;}

		var e=c;

		while (CarsListing[e][1] == CarName){e++;if(e==CarsListing.length-1){CarName="";}}

		var count = 0;

		if (CarName ==""){e++}

	  	for (i=c; i < e; i++){

	    	count++;

		    document.Car.Cartype2.options[count]=new Option();	

		    document.Car.Cartype2.options[count].text = CarsListing[i][2];

		    document.Car.Cartype2.options[count].value = CarsListing[i][2];

	    }

	}

   
 

function process(){

PageIndex2=document.Car.Cartype.selectedIndex

PageIndex3=document.Car.Cartype1.selectedIndex

if ((document.Car.Cartype.options[PageIndex2].value=="REPEAT") || (document.Car.Cartype1.options[PageIndex3].value=="REPEAT"))

  {alert("Επέλεξε Μάρκα και Μοντέλο"); return false;}

}



function keepvalueCartype(){for (x = 0; x < document.Car.Cartype.length; x++)
 
  {     if (document.Car.Cartype.options[x].value =="<?php echo $_GET['Cartype']; ?>")
    
 {
     document.Car.Cartype.selectedIndex = x;
       
         break;
      }
   } 

                   }

function keepvalueCartype1(){for (x = 0; x < document.Car.Cartype1.length; x++)
 
  {     if (document.Car.Cartype1.options[x].value =="<?php echo $_GET['Cartype1']; ?>")
    
 {
     document.Car.Cartype1.selectedIndex = x;
       
         break;
      }
   } 

                   }
				
function keepvalueCartype2(){ for (x = 0; x < document.Car.Cartype2.length; x++)
 
  {     if (document.Car.Cartype2.options[x].value =="<?php echo $_GET['Cartype2']; ?>")
    
 {
     document.Car.Cartype2.selectedIndex = x;
       
         break;
      }
   } 
                 
                   }