function SelectCatg(lngNiv, lngCatg) {var lngIndexTop;
switch(lngNiv) {case 1:top.document.Form1.txtCatg2.selectedIndex=0;			
if(lngCatg==-1) {
lngIndexTop=top.document.Form1.txtCatg1.selectedIndex;lngCatg=parseInt(top.document.Form1.txtCatg1[lngIndexTop].value);
}					var lngOp=0;			
top.document.Form1.txtCatg2.length=0;top.document.Form1.txtCatg2.disabled=0;			
switch(lngCatg){case 0:opt(1,'Food and Leisure','1', 'Bazaar and Gifts','2', 'Education and Training', '3', 'Internet - Sites', '4', 'Marketing & Publicity', '5', 'Profesional', '6');
SelectCatg(1 ,-1);break;case 1:opt(2,'Martial Arts','41', 'Bars', '42', 'Billiards - Saloons', '41', 'Bingo', '41', 'Bowlings', '41', 'Cafeteria', '42', 'Campings', '42','Sport Fields (Renting)', '36', 'Casinos', '41','Malls (Shopping Center)', '35 - 36 - 41 - 42', 'Movie Theater', '41', 'Circus - Clowns ', '41', 'Sport Clubs', '41', 'Night Clubs', '41', 'Vacation Centers', '42', 'Food - Take Out', '42', 'Bakery', '42', 'Discoteque', '41 - 42', 'Candy Stores', '42','Horsemanship - School' , '41', 'Shows - Sale of Tickets', '41', 'Children Parties - Animation of ', '41', 'Children Parties - Saloons ', '36 - 41', 'Parties - Saloons ', '36 - 41', 'GYM - Classes', '41', 'Gymnasiums', '41', 'Art Galleries ', '41', 'Ice Cream Shop ', '42', 'Race Tracks ', '36 - 41', 'Hotels', '42', 'Arcades', '42', 'Magicians ', '41', 'Museums', '41', 'Parachute - School of ', '41', 'Sports and Leisure Parks', '41', 'Pastries - Sale of ', '42', 'Ice Skating - Rink ', '36 - 41', 'Pizza - Sale of ', '42', 'Restaurants', '42', 'Theaters', '41', 'Time Sharings', '36');
SelectCatg(2,-1);break;case 2:opt(2,'Albums','16','Trays and Plates','14 - 21','Brooches','14 - 26','Ashtrays','34', 'Artistic Ceramics', '20 - 21', 'Buff doublet or Jacket', '21', 'Cutlery', '08 - 14', 'Knives', '08 - 14', 'Toothpicks', '21', 'Lighters', '34' , 'Brooms', '21', 'Sponges', '21', 'Fake jewelry', '14', 'Artificial flowers and plants', '26', 'Natural flowers and plants', '31', 'Matches', '34', 'Musical instruments', '15', 'Jewelry', '14', 'Children’s games', '28', 'Toys', '28', 'Key chains', '06 - 14', 'Hoses', '20', 'Medals', '17 - 21', 'Household - Goods', '14', 'Wicker - Articles', '21', 'Dolls', '20','Christmas - Articles', '21', 'Christmas - Lights', '28', 'Umbrellas', '28', 'Sunshades', '11', 'Skates', '18', 'Balls', '18', 'Clothes rack', '28', 'Pianos', '28', 'Precious and semi-precious stones', '20 06', 'Smoking pipes', '15', 'Metal plates', '14', 'Silversmith - Trade', '34', 'Feather duster', '6', 'Porcelain - Articles', '14', 'Floor dryers', '21', 'Thermos', '21', 'Scissors', '21', 'Cleaning cloths', '21');
SelectCatg(2,-1);break;case 3:opt(2,'Driving academies','41','Aviation - schools','41','Cooking - schools','41','Colleges','41', 'Music conservatory', '41', 'Dance - teaching','41', 'Schools', '41', 'Art schools', '41', 'Special education schools', '41', 'Modeling schools', '41', 'Theatre schools', '41', 'Photography school', '41', 'Languages - teaching', '41', 'Teaching and training institutes', '41', 'Preschools - Kindergarten', '41', 'Language Labs - Infrastructure', '41', 'Dental technicians - teaching', '41', 'Swimming - teaching', '41', 'Hairdresser - teaching', '41', 'Specialized professors', '41', 'Universities', '41');
SelectCatg(2,-1);break;case 4:opt(2,'Internet access (ISP)','9 - 38','Jobs','35 - 38','Publicity','35 - 38','Small & Medium enterprises','35 - 36 - 38 - 42','Architecture & Decoration','35 - 38', 'Radio & TV', '38', 'Art', '38 - 41', 'Finance', '36 - 38', 'Auctions', '35 - 38', 'Autos', '35 - 38 - 42', 'Flowers', '35 - 38 - 42', 'Religion', '38 - 41', 'Banks', '36 - 38', 'Gastronomy', '38 - 42', 'Health', '35 - 38 - 42', 'Business to Business', '35 - 36 - 38 - 42', 'Home', '38 - 42', 'Insurance', '36 - 38', 'Browsers', '35 - 38 - 42', 'Weddings', '35 - 38 - 42', 'Clothes', '35 - 38 - 42', 'Sex', '38 - 42', 'Movies & Theatre', '38 - 41', 'Children', '38 - 41', 'Shopping', '35 - 38 - 42', 'Group Shopping', '35 - 38 - 42', 'Computer related', '38 - 42', 'Supermarkets', '35 - 38 - 42', 'Credits', '36 - 38', 'Real estate (properties)', '36 - 38', 'Credit cards', '36 - 38', 'Sports', '38 - 41', 'Internet & Technology', '38 - 42', 'Theatre', '38 - 41', 'Law', '38 - 42', 'Games', '38 - 41', 'Telecommunications', '38', 'Newspapers & Magazines', '38 - 41', 'Books', '35 - 38 - 41 - 42', 'Mascots', '35 - 38 - 42', 'Exchanges', '35 - 36 - 38 - 42', 'Economics', '36 - 38 - 41 - 42', 'Travel & Tourism', '35 - 38 - 39 - 42', 'Education', '38 - 41', 'Multimedia', '38 - 42', 'Music', '35 - 38 - 42', 'Wine', '35 - 38 - 42', 'Electronics', '35 - 38 - 42', 'Portals', '35 - 38 - 42', 'Entrepreneurs', '36 - 38 - 42');
SelectCatg(2,-1);break;case 5:
opt(2,'News Agencies','38 - 41','Image Banks','35','raphy - production','41','ewspapers','16 - 38','Publicity & Graphic design','35', 'Fairs & expositions', '35 - 41', 'Recording studios', '41', 'Market Investigations', '35', 'Signs - supplies', '35', 'Mailing', '35', 'Direct Marketing . services', '35', 'Promotion - agencies', '35', 'Publications - distribution', '42', 'Publicity - agency', '35', 'Publicity - public areas', '35', 'Aerial publicity', '35', 'Mobile publicity', '35', 'Radio stations', '38', 'Stands - projects & installations', '35 - 37', 'Telemarketing - companies', '35', 'Television - stations', '38', 'Cable television - stations', '38');SelectCatg(2,-1);break;case 6:opt(2,'Lawyers','42','Business administrators','35','Land surveyors','42','Architects','42','Biochemists','42','Calligraphists','42','Accountants (CPA)','32', 'Actuaries', '42', 'Fonoaudiologos', '42', 'Graphologists', '42', 'Engineers', '42', 'Kinesiologists', '42', 'Doctors', '42', 'Notaries', '42', 'Nutritionists', '42', 'Dentists', '42', 'Psychologists', '42', 'Psycho pedagogues', '42', 'Veterinaries', '42');
SelectCatg(2,-1);break;default:lds(2);}break;default:		
}}







// Rajoute des éléments aux menus déroulants
function opt() {

	var argv = opt.arguments;
	var argc = argv.length;
	var n = 0;
	switch(argv[0]) {
		case 1:		
			for (var k = 1; k < argc; k+=2)
				document.Form1.txtCatg1.options[n++] = new Option(argv[k], argv[k+1]);
				document.Form1.txtCatg1.selectedIndex = 0;
			break;
		case 2:
			for (var k = 1; k < argc; k+=2)
				document.Form1.txtCatg2.options[n++] = new Option(argv[k], argv[k+1]);
				document.Form1.txtCatg2.selectedIndex = 0;
			break;
	}
}


// Nettoie un menu déroulant
function lds(n) {
	switch(n) {
		case 1:
			document.Form1.txtCatg1.length = 0;
			document.Form1.txtCatg1.disabled = 1;
			document.Form1.txtCatg1.selectedIndex = 0;
		case 2:
			document.Form1.txtCatg2.length = 0;
			document.Form1.txtCatg2.disabled = 1;
			document.Form1.txtCatg2.selectedIndex = 0;
	}
}


function ChangeCategory(i)
{
  var OpcionVacia=new Option(" -- Sin Subtemas -- ","0",false,false)
  var OpcionVacia2=new Option(" -- Sin Subtemas -- ","0",false,false)
  
  SelectCatg(i,-1)
  
  combo1(document.Form1.txtCatg2.options[document.Form1.txtCatg2.selectedIndex].text, document.Form1.txtCatg2.options[document.Form1.txtCatg2.selectedIndex].value, document.Form1.txtCatg1.selectedIndex);
  
  if (i==1) {
    if (document.Form1.txtCatg2.length==0) {
      document.Form1.txtCatg2.disabled=true;
      document.Form1.txtCatg2.options[0] = OpcionVacia;
    }
    else {
      document.Form1.txtCatg2.selectedIndex=0;
    };
    i=i++;
  }
}


 function combo1(strNameClass, strNumberClass, lngIndex) {	
	
	//var ArrString = new Array(strNumberClass.length);	

	document.Form1.txtCatgSel.value='';		
	document.Form1.txtCatgSel.disabled=true;
	
	var strCatg2Value;
	var strCatg2Text;
	
	var strCatg1Value;
	var strCatg1Text;

	strCatg1Text = document.Form1.txtCatg1.options[lngIndex].text;
	//strCatg1Value = document.Form1.txtCatg1.options[document.Form1.txtCatg1.selectedIndex].value;
	
	//strCatg2Text = document.Form1.txtCatg2.options[document.Form1.txtCatg2.selectedIndex].text;
	//strCatg2Value = document.Form1.txtCatg2.options[document.Form1.txtCatg2.selectedIndex].value;
	
	if (strNameClass != '')
	{			
		document.Form1.txtCatgSel.disabled=false;
	
		document.Form1.txtCatgSel.value = strCatg1Text + ' \ ' + strNameClass + '  Class ' + strNumberClass;	
		document.Form1.txtCatgSel.disabled=true;
	}

}

ChangeCategory(1)

