/*
 * お問い合わせフォーム
 *
 */
	function init(parent, child, value1, value2) {
			parentValue = value1;
			childValue  = value2;

			parentValue = $('#' + parent).attr('value');
		    $('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());
		    $('#' + child).prepend("<option value='none'> 選択してください </option>");
		    if(childValue == '') {
		    	$('#' + child).val('none');
		    } else {
		    	$('#' + child).val(childValue);
		    }
		    $('#' + child).trigger("change");
	}
		    
    function makeSublist(parent, child, isSubselectOptional, childVal) {
      $("body").append("<select style='display:none' id='" + parent + child + "'></select>");
      $('#' + parent + child).html($("#" + child + " option"));

      var parentValue = $('#' + parent).attr('value');
      $('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());

      childVal = (typeof childVal == "undefined") ? "" : childVal;
      $("#" + child + ':option[@value="' + childVal + '"]').attr('selected', 'selected');

      $('#' + parent).change( function() {
		    var parentValue = $('#' + parent).attr('value');
		    $('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());
		    if (isSubselectOptional) $('#' + child).prepend("<option value='none'> 選択してください</option>");
		      $('#' + child).trigger("change");
		      $('#' + child).val('none');
		    });
    }

	function setCategoryName(id, name) {
		document.getElementById('InquiryCategoryId').value = id;
		document.getElementById('InquiryCategoryName').value = name;
		document.getElementById('cat_name').innerHTML = name;
		tb_remove();
		return false;
	};
    

