var brand_type = 0; var cloth_type = 0; var brand_count = 33; function highlight_brand_type(id){ $("brand_type_" + id).className = "page-brand-type-on"; } function dehighlight_brand_type(id){ if(id != brand_type){ $("brand_type_" + id).className = "page-brand-type"; } } function choose_brand_type(type_id){ var type_list = new Array(); type_list.push({'id' : 1, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 2, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 4, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 6, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 8, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 9, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 10, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 13, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 14, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 15, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 16, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 17, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 18, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 19, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 20, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 21, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 22, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 23, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 24, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 25, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 26, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 27, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 28, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 29, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 30, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 31, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 32, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 34, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 35, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 37, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 38, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 42, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 43, 'brand_top_type' : 4, 'brand_type' : 0}); var old_brand_type = brand_type; if(brand_type != type_id){ brand_type = type_id; dehighlight_brand_type(old_brand_type); highlight_brand_type(type_id); } if($("sub_type_" + old_brand_type)){ $("sub_type_" + old_brand_type).style.display = "none"; } if($("sub_type_" + type_id)){ $("sub_type_" + type_id).style.display = "block"; choose_cloth_type(type_id, 0); } for(var i = 0; i < brand_count; i ++){ if(type_list[i]["brand_top_type"] == type_id || type_id == 0){ $("brand_" + type_list[i]["id"]).style.display = "block"; } else{ $("brand_" + type_list[i]["id"]).style.display = "none"; } } } function highlight_brand_cloth_type(parent_id, id){ $("sub_type_" + parent_id + "_" + id).className = 'page-brand-cloth-type-on'; } function dehighlight_brand_cloth_type(parent_id,id){ if(id != cloth_type){ $("sub_type_" + parent_id + "_" + id).className = 'page-brand-cloth-type'; } } function choose_cloth_type(parent_id, type_id){ var type_list = new Array(); type_list.push({'id' : 1, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 2, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 4, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 6, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 8, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 9, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 10, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 13, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 14, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 15, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 16, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 17, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 18, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 19, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 20, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 21, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 22, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 23, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 24, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 25, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 26, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 27, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 28, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 29, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 30, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 31, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 32, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 34, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 35, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 37, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 38, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 42, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 43, 'brand_top_type' : 4, 'brand_type' : 0}); if(type_id != cloth_type){ $("sub_type_" + parent_id + "_" + cloth_type).className = "page-brand-cloth-type"; $("sub_type_" + parent_id + "_" + type_id).className = "page-brand-cloth-type-on"; cloth_type = type_id; } for(var i = 0; i < brand_count; i ++){ if(((type_list[i]["brand_type"] == type_id && parent_id == type_list[i]["brand_top_type"]) || (parent_id == type_list[i]["brand_top_type"] && type_id == 0))){ $("brand_" + type_list[i]["id"]).style.display = "block"; } else{ $("brand_" + type_list[i]["id"]).style.display = "none"; } } } function highlight_brand(obj){ obj.className = "page-brand-item-on"; } function dehighlight_brand(obj){ obj.className = "page-brand-item"; } function choose_brand_type(type_id){ var type_list = new Array(); type_list.push({'id' : 1, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 2, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 4, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 6, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 8, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 9, 'brand_top_type' : 1, 'brand_type' : 10}); type_list.push({'id' : 10, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 13, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 14, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 15, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 16, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 17, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 18, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 19, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 20, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 21, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 22, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 23, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 24, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 25, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 26, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 27, 'brand_top_type' : 1, 'brand_type' : 7}); type_list.push({'id' : 28, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 29, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 30, 'brand_top_type' : 1, 'brand_type' : 8}); type_list.push({'id' : 31, 'brand_top_type' : 1, 'brand_type' : 11}); type_list.push({'id' : 32, 'brand_top_type' : 3, 'brand_type' : 0}); type_list.push({'id' : 34, 'brand_top_type' : 1, 'brand_type' : 9}); type_list.push({'id' : 35, 'brand_top_type' : 1, 'brand_type' : 6}); type_list.push({'id' : 37, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 38, 'brand_top_type' : 1, 'brand_type' : 5}); type_list.push({'id' : 42, 'brand_top_type' : 2, 'brand_type' : 0}); type_list.push({'id' : 43, 'brand_top_type' : 4, 'brand_type' : 0}); var old_brand_type = brand_type; if(brand_type != type_id){ brand_type = type_id; dehighlight_brand_type(old_brand_type); highlight_brand_type(type_id); } if($("sub_type_" + old_brand_type)){ $("sub_type_" + old_brand_type).style.display = "none"; } if($("sub_type_" + type_id)){ $("sub_type_" + type_id).style.display = "block"; choose_cloth_type(type_id, 0); } for(var i = 0; i < brand_count; i ++){ if(type_list[i]["brand_top_type"] == type_id || type_id == 0){ $("brand_" + type_list[i]["id"]).style.display = "block"; } else{ $("brand_" + type_list[i]["id"]).style.display = "none"; } } } function dehighlight_brand_type(id){ if(id != brand_type){ $("brand_type_" + id).className = "page-brand-type"; } } function highlight_brand_cloth_type(parent_id, id){ $("sub_type_" + parent_id + "_" + id).className = 'page-brand-cloth-type-on'; } function dehighlight_brand_cloth_type(parent_id,id){ if(id != cloth_type){ $("sub_type_" + parent_id + "_" + id).className = 'page-brand-cloth-type'; } } function init(){ }