/* subcategory changer by category */
function updatesub(){

var subcategories=new Array();
subcategories[0]=["All|1"];
subcategories[1]=["Accounting, finance|1", "Administrative, office|2", "Architecture, engineering|3", "Biotech, science|4", "Business, management|5", "Business development|6", "Construction, trades|7", "Customer service|8", "Education, training|9", "Food, hospitality|10", "General labor|11", "Graphic, web design|12", "Human resources|13", "IT, software development|14", "Marketing, PR|15", "Medical, healthcare|16", "Real estate|17", "Retail, wholesale|18", "Sales|19", "Salon, fitness|20", "Transportation|21", "TV, film|22", "Writing, editing|23", "Other|24"];
subcategories[2]=["Babysitting, elderly care|25", "Computer|26", "Creative, art, music|27", "Event, entertainement|28", "Financial, real estate|29", "Health, beauty|30", "Household, domestic|31", "Legal, lawyer|32", "Lessons|33", "Moving, storage|34", "Repair|35", "Skilled trade|36", "Travel, vacation|37", "Writing, editing, translating|38", "Other|39"];
subcategories[3]=["Home swap|40", "Houses, apartments for rent|41", "Houses, apartments for sale|42", "Houses, apartments wanted|43", "Land for sale, rent|44", "Office, commercial space|45", "Parking, storage|46", "Rooms for rent|47", "Vacation rentals|48"];
subcategories[4]=["Antiques|49", "Arts, crafts|50", "Baby, kids stuff|51", "Bikes|52", "Boats, ships|53", "Books, magazines|54", "Business|55", "Cameras and accessories|56", "Car parts|57", "Cars|58", "CDs, DVDs, VHS|59", "Cell phones and accessories|60", "Clothes and accessories|61", "Collectibles|62", "Computer accessories|63", "Computers, software|64", "Electronics|65", "Farm, garden|66", "Furniture|67", "Home appliances|68", "Jewelry|69", "Material|70", "Motorcycles, scooters|71", "Musical instruments|72", "Pets|73", "RVs, trailers|74", "Sporting goods|75", "Tickets|76", "Tools|77", "Toys, games|78", "Trucks, vans, SUVs|79", "Video games, consoles|80"];


var subcat=document.searchform.subcat;
var cat_s= document.searchform.cat.options.selectedIndex;


subcat.options.length=0
subcat.options[0]=new Option("All", "", true, false);
if (cat_s>0){
for (i=0; i<subcategories[cat_s].length; i++){
subcat.options[subcat.options.length]=new Option(subcategories[cat_s][i].split("|")[0], subcategories[cat_s][i].split("|")[1], false, false)
}}

}

/* show hide div */
function show_hide(div) {
if (document.getElementById(div).style.visibility == "visible") {
	document.getElementById(div).style.visibility = "hidden";
	document.getElementById(div).style.position = "absolute";
} else {
	document.getElementById(div).style.visibility = "visible";
	document.getElementById(div).style.position = "static";
}
}