var topcategory=new Array; var subcategory=new Array; topcategory[0]=new category(1,'Plastics and Packaging'); topcategory[1]=new category(2,'Lifestyles Products'); topcategory[2]=new category(3,'Promotional Products'); topcategory[3]=new category(4,'Office, School & Institutional'); topcategory[4]=new category(5,'Industrial Products'); subcategory[0]=new industry(1,6,'Rigid Packaging'); subcategory[1]=new industry(1,7,'Flexible Packaging'); subcategory[2]=new industry(1,8,'Food Packaging'); subcategory[3]=new industry(1,9,'Protective Packaging'); subcategory[4]=new industry(2,29,'Furniture'); subcategory[5]=new industry(2,30,'Pets Accessories'); subcategory[6]=new industry(2,31,'Sports, Travel and Outdoor'); subcategory[7]=new industry(2,32,'Housewares'); subcategory[8]=new industry(3,33,'Awards'); subcategory[9]=new industry(3,34,'Novelty Items'); subcategory[10]=new industry(3,35,'Drinkware and accessories'); subcategory[11]=new industry(3,36,'Affordable electronics'); subcategory[12]=new industry(3,37,'Bags'); subcategory[13]=new industry(3,38,'Golf Accessories'); subcategory[14]=new industry(3,39,'Toys'); subcategory[15]=new industry(3,40,'Auto Accessories'); subcategory[16]=new industry(3,41,'Hats, Caps and Visors'); subcategory[17]=new industry(3,42,'Cut and Sew Products'); subcategory[18]=new industry(3,43,'Clocks and Watches'); subcategory[19]=new industry(3,44,'Tools and Hardware'); subcategory[20]=new industry(3,45,'Pocket Items'); subcategory[21]=new industry(4,46,'Shipping Supplies'); subcategory[22]=new industry(4,47,'Stationery & Desk Supplies'); subcategory[23]=new industry(4,48,'Filing Supplies'); subcategory[24]=new industry(4,49,'Semi-finished Materials'); subcategory[25]=new industry(4,50,'Maintenance Supplies'); subcategory[26]=new industry(4,51,'Tools'); subcategory[27]=new industry(5,52,'Machinery'); subcategory[28]=new industry(5,53,'Tooling'); subcategory[29]=new industry(5,54,'Spare Parts'); subcategory[30]=new industry(5,55,'Defense Products'); function category(cat_id,cat_name){ this.cat_id=cat_id; this.cat_name=cat_name; } function industry(cat_id,ind_id,ind_name) { this.cat_id=cat_id; this.ind_id=ind_id; this.ind_name=ind_name; } function loadsub( cat_id ) { //alert(cat_id); oSub= window.document.form.catalogid; count = 0; oSub.options.length = count; oSub.options[count] = new Option( 'All Industries' ); oSub.options[count].value=''; count++; for( i = 0; i < subcategory.length; i++ ) { obj= subcategory[i]; if( obj.cat_id == cat_id ) { oSub.options[count] = new Option( obj.ind_name ); oSub.options[count].value =obj.ind_id ; count++; } } } function loadtop( ) { oTop= window.document.form.type_id; count = 0; oTop.options.length = count; oTop.options[count] = new Option( 'All Categories' ); oTop.options[count].value=''; count++; for( i = 0; i < topcategory.length; i++ ) { obj= topcategory[i]; oTop.options[count] = new Option( obj.cat_name ); oTop.options[count].value =obj.cat_id ; count++; } }