// list of fucking state based on state
var state = new Array();
//state[0] = Array("Select state");
state[1] = ("Johor Bahru,Ayer Hitam,Air Papan,Bakri,Bandar Baru UDA,Bandar Dato\' Onn,Bandar Nusajaya,Bandar Penawar,Bandar Tenggara,Batu Enam,Batu Pahat,Bekok,Benut,Bukit Gambir,Bukit Kangkar,Bukit Kepong,Bukit Naning,Bukit Pasir,Buloh Kasap,Chaah,Desaru,Endau,Gelang Patah,Gemas Baharu,Genuang,Jemaluang,Jementah,Johor Lama,Kahang,Kampung Tengah,Kelapa Sawit,Kempas,Kluang,Kong Kong,Kota Tinggi,Kulai,Kukup,Labis,Layang-Layang,Lenga,Lima Kedai,Lok Heng,Lombong,Machap,Masai,Mengkibol,Mersing,Muar,Pagoh,Paloh,Parit Bakar,Parit Jawa,Parit Raja,Parit Sulong,Parit Yaani,Panchor,Pasir Gudang,Pasir Pelangi,Pendas,Pekan Air Panas,Pekan Nanas,Pengerang,Permas Jaya,Plentong,Pontian Kechil,Renggam,Rengit,Sagil,Saleng,Sedenak,Sedili,Segamat,Semerah,Senai,Senggarang,Simpang Renggam,Skudai,Sri Gading,Sri Medan,Stulang,Sungai Balang,Sungai Karas,Sungai Mati,Sungai Rengit,Tampoi,Tangkak,Tanjung Balau,Tanjung Kupang,Tanjung Leman,Tanjung Langsat,Tanjung Piai,Tanjung Pelepas,Tanjung Pengelih,Teluk Mahkota,Teluk Ramunia,Tenggaroh,Tongkang Pechah,Ulu Tiram,Yong Peng,Pulau Aur,Pulau Batu Puteh,Pulau Besar,Pulau Pemanggil,Pulau Rawa,Pulau Sibu,Pulau Tinggi");

state[2] = ("Alor Setar,Anak Bukit,Baling,Bandar Baharu,Bedong,Bukit Kayu Hitam,Changlun,Guar Chempedak,Gurun,Jeniang,Jitra,Kodiang,Kota Sarang Semut,Kuah,Kuala Kedah,Kuala Ketil,Kuala Nerang,Kulim,Langgar,Lunas,Merbok,Padang Matsirat,Padang Serai,Pendang,Pokok Sena,Sik,Sintok,Sungai Petani,Tokai,Yan,Pulau Langkawi,Pulau Payar");

state[3] = ("Bachok,Dabong,Gua Musang,Jeli,Kota Bharu,Kuala Krai,Kubang Kerian,Machang,Pasir Mas,Pasir Puteh,Pengkalan Chepa,Pengkalan Kubur,Pengkalan Pasir,Perupok,Rantau Panjang,Tanah Merah,Tumpat,Wakaf Baharu");

state[4] = ("Kuala Lumpur,Bandar Tun Razak,Batu,Bukit Bintang,Cheras,Kepong,Lembah Pantai,Segambut,Seputeh,Setiawangsa,Titiwangsa,Wangsa Maju,Ampang,Bangsar,Brickfields,Bukit Aman,Bukit Damansara,Bukit Jalil,Bukit Kiara,Bukit Nanas,Bukit Persekutuan,Bukit Petaling,Bukit Tunku,Chow Kit,Damansara Town Centre,Dang Wangi,Imbi,Jalan Duta,Jinjang,Kampung Baru,Kampung Datuk Keramat,Kuchai Lama,Kerinchi,Maluri,Medan Tuanku,Miharja,Mont Kiara,Pudu,Salak South,Semarak,Setapak,Sentul,Sentul Raya,Shamelin,Sri Petaling,Sungai Besi,Taman U-Thant");

state[5] = ("Malacca Town ,Alor Gajah,Ayer Keroh,Batang Melaka,Batu Berendam,Bemban,Bukit Katil,Durian Tunggal,Jasin,Klebang,Kuala Sungai Baru,Lendu,Lubuk China,Machap Baru,Masjid Tanah,Merlimau,Nyalas,Ramuan China,Selandar,Serkam,Sungai Rambai,Sungai Udang,Tanjung Bidara,Tanjung Kling,Tanjung Tuan,Umbai");

state[6] = ("Jelebu,Jempol,Kuala Pilah,Port Dickson,Rembau,Seremban,Tampin,Air Kuning Selatan,Bahau,Batang Benar,Batu Kikir,Chembong,Gemas,Gemencheh,Johol,Juasseh,Kota,Kuala Klawang,Labu,Lenggeng,Linggi,Lukut,Mantin,Mambau,Nilai,Pajam,Pasir Panjang,Pedas,Pengkalan Kempas,Rantau,Rompin,Senawang,Sepang Road,Seri Menanti,Serting,Siliau,Sungai Gadut,Sungai Muntoh,Tampin,Teluk Kemang,Tiroi");

state[7] = ("Bandar Indera Mahkota,Bandar Pusat Jengka,Bandar Muadzam Shah,Bandar Tun Abdul Razak,Batu Talam,Belimbing,Benta,Bentong,Beserah,Brinchang,Bukit Tinggi,Chenor,Chini Lake,Cherating,FELDA New Zealand,Fraser\'s Hill,Gambang,Gebeng,Genting Highlands,Genting Sempah,Gohtong Jaya,Janda Baik,Jerantut,Karak,Ketari,Kuala Lipis,Kuala Rompin,Kuantan,Lanchang,Lubuk Paku,Lurah Bilut,Maran,Mentakab,Merapoh,Nenasi,Paluh Hinai,Pekan,Raub,Rompin,Sungai Lembing,Tanah Rata,Teluk Cempedak,Temerloh,Teriang,Pulau Tioman");

state[8] = ("George Town,Air Itam,Bagan Ajam,Balik Pulau,Batu Ferringhi,Batu Kawan,Batu Maung,Bayan Lepas,Bukit Mertajam,Butterworth,Ceruk Tok Kun,Gelugor,Jawi,Jelutong,Juru,Kepala Batas,Nibong Tebal,Pantai Aceh,Permatang Pauh,Perai,Seberang Jaya,Sungai Ara,Sungai Bakap,Sungai Dua,Tanjung Bungah,Tanjung Tokong,Teluk Bahang,Val d\'Or,Pulau Aman,Pulau Betong,Pulau Gedung,Pulau Jerejak,Pulau Kendi,Pulau Rimau,Pulau Tikus");

state[9] = ("Ipoh,Ayer Tawar,Bagan Datoh,Bagan Serai,Bagan Sungai Burong,Banir,Batak Rabit,Batu Gajah,Behrang,Bercham,Beruas,Bidor,Bikam,Bota,Bukit Gantang,Bukit Merah,Changkat Jering,Changkat Keruing,Chemor,Chikus,Damar Laut,Gerik,Gopeng,Gua Tempurung,Hutan Melintang,Jelapang,Jenderata,Jerlun,Kamunting,Kampar,Karak,Keroh,Kota Setia,Kuala Kangsar,Kuala Kurau,Kuala Sepetang,Langkap,Lekir,Lenggong,Lumut,Malim Nawar,Mambang Di Awan,Manong,Menglembu,Padang Rengas,Pantai Remis,Parit,Parit Buntar,Pasir Salak,Pekan Gurney,Pengkalan Hulu,Proton City,Sayong,Selama,Seri Iskandar,Seri Manjung,Simpang Tiga,Sitiawan,Slim,Slim River,Sungai Siput,Sungkai,Taiping,Tambun,Tanjung Malim,Tanjung Piandang,Tanjung Rambutan,Tanjung Tualang,Tapah,Tapah Road,Teluk Batik,Teluk Intan,Teluk Rubiah,Temoh,Temoh Road,Trolak,Terong,Teronoh,Tringkap,Pulau Pangkor");

state[10] = ("Arau,Chuping,Kangar,Kuala Perlis,Padang Besar,Sanglang,Wang Kelian");

state[11] = ("Putrajaya");

state[12] = ("Kota Kinabalu ,Beaufort,Beluran,Bingkor,Bongawan,Donggongon,Inanam,Kalabakan,Keningau,Kimanis,Kinabatangan,Kinarut,Kota Belud,Kota Marudu,Kuala Penyu,Kudat,Kunak,Kundasang,Lahad Datu,Membakut,Menggatal,Nabawan,Papar,Pensiangan,Pitas,Putatan,Ranau,Sandakan,Sapulut,Semporna,Sepanggar,Sindumin,Sipitang,Tambunan,Tamparuli,Tawau,Telipok,Telupid,Tenom,Tuaran,Weston,Balambangan Island,Banggi Island,Gaya Island,Jambongan Island,Kapalai Island,Lankayan Island,Layang Layang Island,Libaran Island,Ligitan Island,Mabul Island,Malawali Island,Sebatik Island,Selingan Island,Sipadan Island,Tabawan Island,Tiga Island• Timbun Mata Island");

state[13] = ("Kuching,Miri,Asajaya,Ba\'kelalan,Bau,Belaga,Betong,Bintangor,Bintulu,Dalat,Daro,Debak,Julau,Kanowit,Kapit,Kota Samarahan,Lawas,Limbang,Lingga,Lubok Antu,Lundu,Matu,Meradong,Mukah,Marudi,Pakan,Pusa,Saratok,Sarikei,Sebuyau,Serian,Selangau,Sibu,Siburan,Simunjan,Song,Spaoh,Sri Aman,Tanjung Kidurong,Tatau,Tebedu");

state[14] = ("Petaling Jaya,Shah Alam,Ampang,Bagan Lalang,Bagan Nakhoda Omar,Balakong,Bandar Baru Bangi,Bandar Baru Selayang,Bandar Sunway,Bangi,Banting,Batang Berjuntai,Batang Kali,Batu Arang,Beranang,Broga,Bukit Raja,Bukit Rotan,Bukit Tagar,Cheras,Cyberjaya,Dengkil,Ijok,Jenjarom,Jeram,Jugra,Kajang,Kapar,Kalumpang,Kelana Jaya,Kerling,Klang,Kuala Kubu Bharu,Kuala Selangor,Kuala Sungai Buloh,Kuang,Morib,Meru,Padang Jawa,Paya Jaras,Port Klang,Puchong,Rasa,Rawang,Sabak,Salak Tinggi,Sekinchan,Semenyih,Serendah,Sepang,Seri Kembangan,Sijangkang,Subang,Subang Jaya,Sungai Buloh,Sungai Besar,Sungai Burong,Sungai Panjang,Sungai Pelek,Sungai Pelong,Tanjung Harapan,Tanjung Karang,Tanjung Sepat,Teluk Datok,Teluk Panglima Garang,Ulu Klang,Ulu Yam,Pulau Carey,Pulau Indah,Pulau Ketam,Pulau Klang");

state[15] = ("Ajil,Bandar Al-Muktafi Billah Shah,Bandar Ketengah Jaya,Bandar Permaisuri,Bandar Seri Bandi,Batu Rakit,Bukit Besi,Chukai,Gong Kedak,Jabur,Jerangau,Jerteh,Kemasik,Kerteh,Kijal,Kuala Besut,Kuala Berang,Kuala Dungun,Kuala Terengganu,Marang,Merchang,Paka,Pasir Raja,Rantau Abang,Rasau Kerteh,Seberang Takir,Teluk Kalung,Wakaf Tapai,Bidong Island,Kapas Island,Lang Tengah Island,Perhentian Islands,Redang Island,Wan Man Island");




	function updateCity()
	{
		x = document.form1.ddState.value;
		removeAllOptions(document.form1.ddCity);
		
		var tempState = state[x].split(",");
		addOption(document.form1.ddCity,"", "Select"); 
		for (i=0;i<tempState.length;i++)
		{
			addOption(document.form1.ddCity,tempState[i], tempState[i]); 
		}
		
	}
	

function fillCategory(){ 
addOption(document.form1.Maker, "", "Select", "");
addOption(document.form1.Maker, "Alfa Romeo", "Alfa Romeo", "");
addOption(document.form1.Maker, "Audi", "Audi", "");
addOption(document.form1.Maker, "BMW", "BMW", "");
addOption(document.form1.Maker, "Chevrolet", "Chevrolet", "");
addOption(document.form1.Maker, "Chrysler", "Chrysler", "");
addOption(document.form1.Maker, "Chery", "Chery", "");
addOption(document.form1.Maker, "Citroen", "Citroen", "");
addOption(document.form1.Maker, "Daihatsu", "Daihatsu", "");
addOption(document.form1.Maker, "Fiat", "Fiat", "");
addOption(document.form1.Maker, "Ford", "Ford", "");
addOption(document.form1.Maker, "Honda", "Honda", "");
addOption(document.form1.Maker, "Hyundai", "Hyundai", "");
addOption(document.form1.Maker, "Isuzu", "Isuzu", "");
addOption(document.form1.Maker, "Jaguar", "Jaguar", "");
addOption(document.form1.Maker, "Jeep", "Jeep", "");
addOption(document.form1.Maker, "KIA", "KIA", "");
addOption(document.form1.Maker, "Land Rover", "Land Rover", "");
addOption(document.form1.Maker, "Lexus", "Lexus", "");
addOption(document.form1.Maker, "Mahindra", "Mahindra", "");
addOption(document.form1.Maker, "Mazda", "Mazda", "");
addOption(document.form1.Maker, "Mercedes", "Mercedes", "");
addOption(document.form1.Maker, "Mini", "Mini", "");
addOption(document.form1.Maker, "Mitsubishi", "Mitsubishi", "");
addOption(document.form1.Maker, "Nissan", "Nissan", "");
addOption(document.form1.Maker, "Opel", "Opel", "");
addOption(document.form1.Maker, "Perodua", "Perodua", "");
addOption(document.form1.Maker, "Peugeot", "Peugeot", "");
addOption(document.form1.Maker, "Proton", "Proton", "");
addOption(document.form1.Maker, "Renault", "Renault", "");
addOption(document.form1.Maker, "Rover", "Rover", "");
addOption(document.form1.Maker, "Smart", "Smart", "");
addOption(document.form1.Maker, "SAAB", "SAAB", "");
addOption(document.form1.Maker, "Skoda", "Skoda", "");
addOption(document.form1.Maker, "Ssang Yong", "Ssang Yong", "");
addOption(document.form1.Maker, "Subaru", "Subaru", "");
addOption(document.form1.Maker, "Suzuki", "Suzuki", "");
addOption(document.form1.Maker, "Toyota", "Toyota", "");
addOption(document.form1.Maker, "Volkswagen", "Volkswagen", "");
addOption(document.form1.Maker, "Volvo", "Volvo", "");
addOption(document.form1.Maker, "Others", "Others", "");

	removeAllOptions(document.form1.SubCat);
	addOption(document.form1.SubCat,"", "Select");
	addOption(document.form1.SubCat,"147", "147");
	addOption(document.form1.SubCat,"147 GTA", "147 GTA");
	addOption(document.form1.SubCat,"156", "156");
	addOption(document.form1.SubCat,"156 GTA", "156 GTA");
	addOption(document.form1.SubCat,"156 Sportswagon", "156 Sportswagon");
	addOption(document.form1.SubCat,"166 3.0", "166 3.0");	
	addOption(document.form1.SubCat,"GT Coupe", "GT Coupe");
	
	document.getElementById('txtModel').style.visibility='hidden';
	document.getElementById('lblCarModel').innerHTML="Car Model";
	document.getElementById('lblCarModel2').innerHTML='';
	
	
	removeAllOptions(document.form1.ddCity);
        addOption(document.form1.ddCity,"", "Select");
//		var tempState = state[4].split(",");
//		for (i=0;i<tempState.length;i++)
//		{
//			addOption(document.form1.ddCity,tempState[i], tempState[i]); 
//		}

}

function SelectSubCat(){
// on changing the appropriate maker, this motherfucker will kick in

removeAllOptions(document.form1.SubCat);
document.getElementById('txtModel').style.visibility='hidden';
document.getElementById('SubCat').style.visibility='visible';
document.getElementById('lblCarModel').innerHTML='Car Model';
document.getElementById('lblCarModel2').innerHTML='';

	addOption(document.form1.SubCat,"", "Select");

	if(document.form1.Maker.value == 'Alfa Romeo')
	{
	addOption(document.form1.SubCat,"147", "147");
	addOption(document.form1.SubCat,"147 GTA", "147 GTA");
	addOption(document.form1.SubCat,"156", "156");
	addOption(document.form1.SubCat,"156 GTA", "156 GTA");
	addOption(document.form1.SubCat,"156 Sportswagon", "156 Sportswagon");
	addOption(document.form1.SubCat,"166 3.0", "166 3.0");	
	addOption(document.form1.SubCat,"GT Coupe", "GT Coupe");
	}
	
	if(document.form1.Maker.value == 'Audi')
	{
	addOption(document.form1.SubCat,"A3", "A3");
	addOption(document.form1.SubCat,"A4", "A4");
	addOption(document.form1.SubCat,"A6", "A6");
	addOption(document.form1.SubCat,"A8", "A8");
	addOption(document.form1.SubCat,"Q7", "Q7");
	addOption(document.form1.SubCat,"TT", "TT");	
	}	
	
	if(document.form1.Maker.value == 'BMW')
	{
	addOption(document.form1.SubCat,"1 series", "1 series");
	addOption(document.form1.SubCat,"3 series", "3 series");
	addOption(document.form1.SubCat,"5 series", "5 series");
	addOption(document.form1.SubCat,"7 series", "7 series");
	addOption(document.form1.SubCat,"X3 series", "X3 series");
	addOption(document.form1.SubCat,"X5 series", "X5 series");
	addOption(document.form1.SubCat,"Z4 series", "Z4 series");
	addOption(document.form1.SubCat,"M series", "M series");
	}	

	if(document.form1.Maker.value == 'Chevrolet')
	{
	addOption(document.form1.SubCat,"Aveo", "Aveo");
	addOption(document.form1.SubCat,"Optra", "Optra");
	addOption(document.form1.SubCat,"Spark", "Spark");
	addOption(document.form1.SubCat,"Lumina", "Lumina");
	addOption(document.form1.SubCat,"Nabira", "Nabira");

	}	
	
	if(document.form1.Maker.value == 'Chrysler')
	{
	addOption(document.form1.SubCat,"Voyager", "Voyager");

	}		

	if(document.form1.Maker.value == 'Chery')
	{
	addOption(document.form1.SubCat,"A160", "A160");
	addOption(document.form1.SubCat,"QQ", "QQ");
	}	
	
	if(document.form1.Maker.value == 'Citroen')
	{
	addOption(document.form1.SubCat,"Berlingo", "Berlingo");
	addOption(document.form1.SubCat,"C1", "C1");
	addOption(document.form1.SubCat,"C2", "C2");
	addOption(document.form1.SubCat,"C3", "C3");
	addOption(document.form1.SubCat,"C4", "C4");
	addOption(document.form1.SubCat,"C5", "C5");
	addOption(document.form1.SubCat,"C6", "C6");
	addOption(document.form1.SubCat,"C8", "C8");
	addOption(document.form1.SubCat,"Xsara Picasso", "Xsara Picasso");
	}	
	
	if(document.form1.Maker.value == 'Daihatsu')
	{
	addOption(document.form1.SubCat,"Charade", "Charade");
	addOption(document.form1.SubCat,"Copen", "Copen");
	addOption(document.form1.SubCat,"Mira", "Mira");
	addOption(document.form1.SubCat,"Move", "Move");
	addOption(document.form1.SubCat,"Terios", "Terios");
	}	
	
	if(document.form1.Maker.value == 'Fiat')
	{
	addOption(document.form1.SubCat,"Bravo", "Bravo");
	addOption(document.form1.SubCat,"Grande Punto", "Grande Punto");
	addOption(document.form1.SubCat,"Idea", "Idea");
	addOption(document.form1.SubCat,"Marea", "Marea");
	addOption(document.form1.SubCat,"Multipla", "Multipla");
	addOption(document.form1.SubCat,"Punto", "Punto");
	addOption(document.form1.SubCat,"Sedici", "Sedici");
	addOption(document.form1.SubCat,"Siena", "Siena");
	addOption(document.form1.SubCat,"Stilo", "Stilo");
	addOption(document.form1.SubCat,"Ulysse", "Ulysse");	
	}		
	
	if(document.form1.Maker.value == 'Ford')
	{
	addOption(document.form1.SubCat,"Econovan", "Econovan");
	addOption(document.form1.SubCat,"Escape", "Escape");
	addOption(document.form1.SubCat,"Everest", "Everest");
	addOption(document.form1.SubCat,"Focus", "Focus");
	addOption(document.form1.SubCat,"Ranger", "Ranger");
	}		
	
	if(document.form1.Maker.value == 'Honda')
	{
	addOption(document.form1.SubCat,"Accord", "Accord");
	addOption(document.form1.SubCat,"Civic", "Civic");
	addOption(document.form1.SubCat,"Civic Hybrid", "Civic Hybrid");
	addOption(document.form1.SubCat,"Civic Type-R", "Civic Type-R");
	addOption(document.form1.SubCat,"City", "City");
	addOption(document.form1.SubCat,"CRV", "CRV");
	addOption(document.form1.SubCat,"Jazz", "Jazz");
	addOption(document.form1.SubCat,"Legend", "Legend");	
	addOption(document.form1.SubCat,"Odyssey", "Odyssey");
	addOption(document.form1.SubCat,"Stream", "Stream");		
	}			
	
	if(document.form1.Maker.value == 'Hyundai')
	{
	addOption(document.form1.SubCat,"Accent", "Accent");
	addOption(document.form1.SubCat,"Azera", "Azera");
	addOption(document.form1.SubCat,"Atos", "Atos");
	addOption(document.form1.SubCat,"Coupe", "Coupe");
	addOption(document.form1.SubCat,"Elantra", "Elantra");
	addOption(document.form1.SubCat,"Getz", "Getz");
	addOption(document.form1.SubCat,"Granduer", "Granduer");
	addOption(document.form1.SubCat,"Matrix", "Matrix");	
	addOption(document.form1.SubCat,"Sonata", "Sonata");
	addOption(document.form1.SubCat,"Santa Fe", "Santa Fe");	
	addOption(document.form1.SubCat,"Tuscon", "Tuscon");
	addOption(document.form1.SubCat,"Trajet", "Trajet");		
	}				

	if(document.form1.Maker.value == 'Isuzu')
	{
	addOption(document.form1.SubCat,"Bighorn", "Bighorn");
	addOption(document.form1.SubCat,"Citation", "Citation");
	addOption(document.form1.SubCat,"D-Max", "D-Max");
	addOption(document.form1.SubCat,"Invader", "Invader");
	addOption(document.form1.SubCat,"Trooper", "Trooper");
	addOption(document.form1.SubCat,"Rodeo", "Rodeo");
	}	
	
	if(document.form1.Maker.value == 'Jaguar')
	{
	addOption(document.form1.SubCat,"S-Type", "S-Type");
	addOption(document.form1.SubCat,"X-Type", "X-Type");
	addOption(document.form1.SubCat,"XJ6", "XJ6");
	addOption(document.form1.SubCat,"XJ8", "XJ8");
	addOption(document.form1.SubCat,"XK", "XK");
	}		

	if(document.form1.Maker.value == 'Jeep')
	{
	addOption(document.form1.SubCat,"Commander", "Commander");
	addOption(document.form1.SubCat,"Grand Cherokee", "Grand Cherokee");
	addOption(document.form1.SubCat,"Wrangler", "Wrangler");
	}				

	if(document.form1.Maker.value == 'KIA')
	{
	addOption(document.form1.SubCat,"Citra", "Citra");
	addOption(document.form1.SubCat,"Optima", "Optima");
	addOption(document.form1.SubCat,"Picanto", "Picanto");
	addOption(document.form1.SubCat,"Pregio", "Pregio");
	addOption(document.form1.SubCat,"Ria", "Ria");
	addOption(document.form1.SubCat,"Rio", "Rio");
	addOption(document.form1.SubCat,"Spectra", "Spectra");
	addOption(document.form1.SubCat,"Sportage", "Sportage");
	addOption(document.form1.SubCat,"Sorento", "Sorento");
	}	

	if(document.form1.Maker.value == 'Land Rover')
	{
	addOption(document.form1.SubCat,"Discovery", "Discovery");
	addOption(document.form1.SubCat,"Freelander", "Freelander");
	addOption(document.form1.SubCat,"Range Rover", "Range Rover");
	}	

	if(document.form1.Maker.value == 'Lexus')
	{
	addOption(document.form1.SubCat,"GS 300", "GS 300");
	addOption(document.form1.SubCat,"LS 460 L", "LS 460 L");
	addOption(document.form1.SubCat,"RX 350", "RX 350");
	}	
	
	if(document.form1.Maker.value == 'Mahindra')
	{
	addOption(document.form1.SubCat,"Scorpio", "Scorpio");
	}		

	if(document.form1.Maker.value == 'Mazda')
	{
	addOption(document.form1.SubCat,"Astina", "Astina");
	addOption(document.form1.SubCat,"Fighter", "Fighter");
	addOption(document.form1.SubCat,"Mazda 3", "Mazda 3");
	addOption(document.form1.SubCat,"Mazda 5", "Mazda 5");
	addOption(document.form1.SubCat,"Mazda 6", "Mazda 6");	
	}	

	if(document.form1.Maker.value == 'Mercedes')
	{
	addOption(document.form1.SubCat,"A-Class", "A-Class");
	addOption(document.form1.SubCat,"B-Class", "B-Class");
	addOption(document.form1.SubCat,"C-Class", "C-Class");
	addOption(document.form1.SubCat,"CLK-Class", "CLK-Class");
	addOption(document.form1.SubCat,"CLS-Class", "CLS-Class");	
	addOption(document.form1.SubCat,"E-Class", "E-Class");
	addOption(document.form1.SubCat,"M-Class", "M-Class");
	addOption(document.form1.SubCat,"R-Class", "R-Class");
	addOption(document.form1.SubCat,"S-Class", "S-Class");
	addOption(document.form1.SubCat,"SL-Class", "SL-Class");
	addOption(document.form1.SubCat,"SLK-Class", "SLK-Class");	
	}	
	
	if(document.form1.Maker.value == 'Mini')
	{
	addOption(document.form1.SubCat,"Cooper", "Cooper");
	addOption(document.form1.SubCat,"Cooper S", "Cooper S");
	addOption(document.form1.SubCat,"One", "One");
	}		
	
	if(document.form1.Maker.value == 'Mitsubishi')
	{
	addOption(document.form1.SubCat,"Airtrek", "Airtrek");
	addOption(document.form1.SubCat,"Challenger", "Challenger");
	addOption(document.form1.SubCat,"Colt", "Colt");
	addOption(document.form1.SubCat,"Evolution", "Evolution");
	addOption(document.form1.SubCat,"Gallant", "Gallant");
	addOption(document.form1.SubCat,"Grandis", "Grandis");	
	addOption(document.form1.SubCat,"Lancer", "Lancer");
	addOption(document.form1.SubCat,"L200", "L200");
	addOption(document.form1.SubCat,"Outlander", "Outlander");
	addOption(document.form1.SubCat,"Pajero", "Pajero");
	addOption(document.form1.SubCat,"Storm", "Storm");
	addOption(document.form1.SubCat,"Triton", "Triton");		
	}			
	
	if(document.form1.Maker.value == 'Nissan')
	{
	addOption(document.form1.SubCat,"Cefiro", "Cefiro");
	addOption(document.form1.SubCat,"Frontier", "Frontier");
	addOption(document.form1.SubCat,"Grand Livina", "Grand Livina");
	addOption(document.form1.SubCat,"Latio", "Latio");
	addOption(document.form1.SubCat,"March", "March");
	addOption(document.form1.SubCat,"Murano", "Murano");
	addOption(document.form1.SubCat,"Sentra", "Sentra");	
	addOption(document.form1.SubCat,"Serena", "Serena");
	addOption(document.form1.SubCat,"Teana", "Teana");
	addOption(document.form1.SubCat,"Urvan", "Urvan");
	addOption(document.form1.SubCat,"X-Trail", "X-Trail");
	addOption(document.form1.SubCat,"Vanette", "Vanette");
	addOption(document.form1.SubCat,"350Z", "350Z");	
	}				
	
	if(document.form1.Maker.value == 'Opel')
	{
	addOption(document.form1.SubCat,"Astra", "Astra");
	addOption(document.form1.SubCat,"Meriva", "Meriva");
	addOption(document.form1.SubCat,"Tigra", "Tigra");
	addOption(document.form1.SubCat,"Vectra", "Vectra");
	addOption(document.form1.SubCat,"Zafira", "Zafira");
	}	
	
	if(document.form1.Maker.value == 'Perodua')
	{
	addOption(document.form1.SubCat,"Kancil", "Kancil");
	addOption(document.form1.SubCat,"Kelisa", "Kelisa");
	addOption(document.form1.SubCat,"Kembara", "Kembara");
	addOption(document.form1.SubCat,"Kenari", "Kenari");
	addOption(document.form1.SubCat,"Rusa", "Rusa");
	addOption(document.form1.SubCat,"Myvi", "Myvi");
	addOption(document.form1.SubCat,"Viva", "Viva");
	}	
	
	if(document.form1.Maker.value == 'Peugeot')
	{
	addOption(document.form1.SubCat,"206", "206");
	addOption(document.form1.SubCat,"307", "307");
	addOption(document.form1.SubCat,"407", "407");
	addOption(document.form1.SubCat,"607", "607");
	addOption(document.form1.SubCat,"807", "807");

	}		
	
	if(document.form1.Maker.value == 'Proton')
	{
	addOption(document.form1.SubCat,"Gen-2", "Gen-2");
	addOption(document.form1.SubCat,"Iswara", "Iswara");
	addOption(document.form1.SubCat,"Juara", "Juara");
	addOption(document.form1.SubCat,"Perdana", "Perdana");
	addOption(document.form1.SubCat,"Persona", "Persona");
	addOption(document.form1.SubCat,"Putra", "Putra");
	addOption(document.form1.SubCat,"Satria", "Satria");
	addOption(document.form1.SubCat,"Satria Neo", "Satria Neo");
	addOption(document.form1.SubCat,"Savvy", "Savvy");	
	addOption(document.form1.SubCat,"Waja", "Waja");
	addOption(document.form1.SubCat,"Wira", "Wira");	

	}			
	
	if(document.form1.Maker.value == 'Renault')
	{
	addOption(document.form1.SubCat,"Espace", "Espace");
	addOption(document.form1.SubCat,"Grand Scenic", "Grand Scenic");
	addOption(document.form1.SubCat,"Kangoo", "Kangoo");
	addOption(document.form1.SubCat,"Megane", "Megane");
	addOption(document.form1.SubCat,"Scenic", "Scenic");
	}			

	if(document.form1.Maker.value == 'Rover')
	{
	addOption(document.form1.SubCat,"75 Saloon", "75 Saloon");
	addOption(document.form1.SubCat,"75 Tourer", "75 Tourer");
	addOption(document.form1.SubCat,"Mini", "Mini");
	}			
	
	if(document.form1.Maker.value == 'Smart')
	{
	addOption(document.form1.SubCat,"Fortwo", "Fortwo");
	addOption(document.form1.SubCat,"Roadster", "Roadster");
	}				

	if(document.form1.Maker.value == 'SAAB')
	{
	addOption(document.form1.SubCat,"9-3", "9-3");
	addOption(document.form1.SubCat,"9-5", "9-5");
	}		

	if(document.form1.Maker.value == 'Skoda')
	{
	addOption(document.form1.SubCat,"Fabia", "Fabia");
	addOption(document.form1.SubCat,"Octavia", "Octavia");
	addOption(document.form1.SubCat,"Superb", "Superb");	
	}		
	
	if(document.form1.Maker.value == 'Ssang Yong')
	{
	addOption(document.form1.SubCat,"Actyon Sports", "Actyon Sports");
	addOption(document.form1.SubCat,"Chairman", "Chairman");
	addOption(document.form1.SubCat,"Kyron", "Kyron");	
	addOption(document.form1.SubCat,"Rexton", "Rexton");
	addOption(document.form1.SubCat,"Stavic", "Stavic");		
	}			

	if(document.form1.Maker.value == 'Subaru')
	{
	addOption(document.form1.SubCat,"Forester", "Forester");
	addOption(document.form1.SubCat,"Impreza", "Impreza");
	addOption(document.form1.SubCat,"Legacy", "Legacy");	
	}			
	
	if(document.form1.Maker.value == 'Suzuki')
	{
	addOption(document.form1.SubCat,"APV", "APV");
	addOption(document.form1.SubCat,"Grand Vitara", "Grand Vitara");
	addOption(document.form1.SubCat,"Liana", "Liana");	
	addOption(document.form1.SubCat,"Swiff", "Swiff");
	}			
	
	
	if(document.form1.Maker.value == 'Toyota')
	{
	addOption(document.form1.SubCat,"Camry", "Camry");
	addOption(document.form1.SubCat,"Fortuner", "Fortuner");
	addOption(document.form1.SubCat,"Altis / Corrolla", "Altis / Corrolla");	
	addOption(document.form1.SubCat,"Vios", "Vios");
	addOption(document.form1.SubCat,"Yaris", "Yaris");	
	addOption(document.form1.SubCat,"Wish", "Wish");
	addOption(document.form1.SubCat,"Innova", "Innova");	
	addOption(document.form1.SubCat,"Avanza", "Avanza");	
	addOption(document.form1.SubCat,"Hilux", "Hilux");
	addOption(document.form1.SubCat,"Rav4", "Rav4");		
	addOption(document.form1.SubCat,"Hiace", "Hiace");		
	addOption(document.form1.SubCat,"Unser", "Unser");			
	
	}			
	
	if(document.form1.Maker.value == 'Volkswagen')
	{
	addOption(document.form1.SubCat,"Beetle", "Beetle");
	addOption(document.form1.SubCat,"Golf", "Golf");
	addOption(document.form1.SubCat,"Jetta", "Jetta");	
	addOption(document.form1.SubCat,"Passat", "Passat");
	addOption(document.form1.SubCat,"Polo", "Polo");	
	addOption(document.form1.SubCat,"Touareg", "Touareg");	
	}		
	
	if(document.form1.Maker.value == 'Volvo')
	{
	addOption(document.form1.SubCat,"C70", "C70");
	addOption(document.form1.SubCat,"S40", "S40");
	addOption(document.form1.SubCat,"S60", "S60");	
	addOption(document.form1.SubCat,"S80", "S80");
	addOption(document.form1.SubCat,"V50", "V50");	
	addOption(document.form1.SubCat,"XC90", "XC90");	
	}			
	
	if(document.form1.Maker.value == 'Others')
	{
	document.getElementById('lblCarModel').innerHTML='';
	document.getElementById('lblCarModel2').innerHTML='Car Model';
	document.getElementById('SubCat').style.visibility='hidden';
	//document.getElementById('lblCarModel').innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;Car Model";
	document.getElementById('txtModel').style.visibility='visible';
	
	
	}

}


function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
