function edit_category( id_band_media_category, category, type) {
	$("#edit_category").show();
	$("#id_band_media_category_edit").val(id_band_media_category);
	$("#edit_band_media_category").val(category);
	$('.edit_type').attr('checked', 0);
	var id_type = type.split(',');
	for(id in id_type) {
		$('#arr_edit_type-' + id_type[id]).attr('checked', 'checked');
	}
}

function show_add_form() {
	$("#add_form").show();
	$("#add_button").hide();
}

function ssa() {
	$("#s_addr1").val($("#b_addr1").val());
	$("#s_addr2").val($("#b_addr2").val());
	$("#s_city").val($("#b_city").val());
	$("#s_name_state").val($("#b_name_state").val());
	$("#s_id_state").val($("#b_id_state").val());
	$("#s_id_country").val($("#b_id_country").val());
	$("#s_zip").val($("#b_zip").val());
	choose_s_field();
}

function check_all() {
	$("#checkbox").checkCheckboxes();
}

function uncheck_all() {
	$("#checkbox").unCheckCheckboxes();
}

function png_fix() {
	 var arVersion = navigator.appVersion.split("MSIE")
	 var version = parseFloat(arVersion[1])
	 if ((version >= 5.5 && version < 7) && (document.body.filters))
	 {
			for(var i=0; i<document.images.length; i++)
			{
				 var img = document.images[i]
				 var imgName = img.src.toUpperCase()
				 if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
				 {
						var imgID = (img.id) ? "id='" + img.id + "' " : ""
						var imgClass = (img.className) ? "class='" + img.className + "' " : ""
						var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
						var imgStyle = "display:inline-block;" + img.style.cssText
						if (img.align == "left") imgStyle = "float:left;" + imgStyle
						if (img.align == "right") imgStyle = "float:right;" + imgStyle
						if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
						var strNewHTML = "<span " + imgID + imgClass + imgTitle
						+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
						+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
						+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
						img.outerHTML = strNewHTML
						i = i-1
				 }
			}
	 }
}

$(document).ready(
	function () {
		$(".btn_decline_all").click(survey_decline_all);
	}
);