<?php
	include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
	include $_SERVER['DOCUMENT_ROOT'].'/common/auth_chk.php';

	$mode="Step1";
	
//	$s_cd_sale = $_SESSION['s_cd_sale'];
	$s_cd_car = $_SESSION['s_cd_car'];
//	echo $s_cd_car;
	$s_nm_name = $_SESSION['s_nm_name'];

	$ds_cate = $_REQUEST[ds_cate];
	if(!$ds_cate) $ds_cate='A0';
	
	$ds_model_cate= $ds_cate;
	
	if($s_cd_car !="" || $s_cd_car != null){
	
		$sql ="SELECT *
			FROM car_master mst
			WHERE  cd_car='$s_cd_car' AND ds_delind='N'";
/*
		$sql ="SELECT *
			FROM car_master mst 
				inner join sale_master s 
				on (
					mst.cd_car = s.cd_car 
					AND mst.ds_delind='N' 
					AND s.cd_sale = '$s_cd_sale' 
				) ";
*/

		$col=mysql_fetch_array(mysql_query($sql));
			
		if (!empty($col[cd_car])){
			 
			$cd_car = $col[cd_car];
			$cd_brand  = $col[cd_brand];
			$cd_category  = $col[cd_category];
			$cd_model  = $col[cd_model];
			$cd_model_sub  = $col[cd_model_sub];
			$cd_grade  =$col[cd_grade];
			$car_report  =$col[car_report];
			$ds_type  = $col[ds_type];
			$ds_year  =$col[ds_year];
			$nm_mileage  = $col[nm_mileage];
			$ds_driving_system  = $col[ds_driving_system];
			$ds_transmission  = $col[ds_transmission];
			$ds_oil  = $col[ds_oil];
			$nm_gearbox  = $col[nm_gearbox];
			$ds_accident  = $col[ds_accident];
			$nm_regdate  = $col[nm_regdate];
			$ds_sales  = $col[ds_sales];
			$nm_btitle  = $col[nm_btitle];
			$nm_stitle  = $col[nm_stitle];
			$nm_ltitle  = $col[nm_ltitle];
			$nm_cont  = $col[nm_cont];
			$ds_open  = $col[ds_open];
			$ds_status  = $col[ds_status];
			$ds_logo  = $col[ds_logo];
			$nm_price  = $col[nm_price];
			$nm_name  =$col[nm_name];
			$nm_color = $col[nm_color];
			$nm_incolor= $col[nm_incolor];
			$nm_cc = $col[nm_cc];
			$nm_number = $col[nm_number];
			$ds_trade = $col[ds_trade];
			$nm_regdate_yyyy  = $col[nm_regdate_yyyy];
			$nm_regdate_mm  = $col[nm_regdate_mm];
			$nm_regdate_dd  = $col[nm_regdate_dd];
			$nm_guide  = $col[nm_guide];
			$ds_main  = $col[ds_main];
			$ds_cate = $col[ds_cate];

			$nm_chk_178_q1  = $col[nm_chk_178_q1];
			$nm_chk_178_q2  = $col[nm_chk_178_q2];
			$nm_chk_178_q3  = $col[nm_chk_178_q3];
			$nm_chk_178_q4  = $col[nm_chk_178_q4];
			$nm_chk_178_q5  = $col[nm_chk_178_q5];
			$nm_chk_178_q6  = $col[nm_chk_178_q6];
			$nm_chk_178_q7  = $col[nm_chk_178_q7];
			$nm_chk_178_q8  = $col[nm_chk_178_q8];
			$nm_chk_178_q9  = $col[nm_chk_178_q9];
			$nm_chk_178_q10  = $col[nm_chk_178_q10];
			$nm_chk_178_q11  = $col[nm_chk_178_q11];
			$nm_chk_178_q12  = $col[nm_chk_178_q12];
			$nm_chk_178_q13  = $col[nm_chk_178_q13];

			$nm_chk_carno  = $col[nm_chk_carno];
			$nm_chk_cnt  = $col[nm_chk_cnt];
			$nm_chk_s1 = $col[nm_chk_s1];
			$nm_chk_s2 = $col[nm_chk_s2];
			$nm_chk_s3 = $col[nm_chk_s3];
			$nm_chk_s4 = $col[nm_chk_s4];
			$nm_chk_advisor = $col[nm_chk_advisor];
			$nm_chk_date = $col[nm_chk_date];
			$nm_chk_p1 = $col[nm_chk_p1];
			$nm_chk_p2 = $col[nm_chk_p2];
			$nm_chk_p3 = $col[nm_chk_p3];
			$nm_file_chk = $col[nm_file_chk];
			$nm_act_chgno = $col[nm_act_chgno];
			$nm_act_chgnm = $col[nm_act_chgnm];
			$nm_act_s1 = $col[nm_act_s1];
			$nm_act_s2 = $col[nm_act_s2];
			$nm_act_s3 = $col[nm_act_s3];
			$nm_act_s4 = $col[nm_act_s4];
			$nm_act_my = $col[nm_act_my];
			$nm_act_my_amt = $col[nm_act_my_amt];
			$nm_act_other = $col[nm_act_other];
			$nm_act_other_amt = $col[nm_act_other_amt];
			$nm_act_searchdt  = $col[nm_act_searchdt];
			$nm_act_cnt = $col[nm_act_cnt];
			$nm_file_act = $col[nm_file_act];



			//안전 편의사항등등 
			$ds_g1_01= $col[ds_g1_01];
			$ds_g1_02= $col[ds_g1_02];
			$ds_g1_03= $col[ds_g1_03];
			$ds_g1_04= $col[ds_g1_04];
			$ds_g1_05= $col[ds_g1_05];
			$ds_g1_06= $col[ds_g1_06];
			$ds_g1_07= $col[ds_g1_07];
			$ds_g1_08= $col[ds_g1_08];
			$ds_g1_09= $col[ds_g1_09];
			$ds_g1_10= $col[ds_g1_10];
			$ds_g1_11= $col[ds_g1_11];
			$ds_g1_12= $col[ds_g1_12];
			$ds_g1_13= $col[ds_g1_13];
			$ds_g1_14= $col[ds_g1_14];
			$ds_g1_15= $col[ds_g1_15];
			//안전
			$ds_g2_01= $col[ds_g2_01];
			$ds_g2_02= $col[ds_g2_02];
			$ds_g2_03= $col[ds_g2_03];
			$ds_g2_04= $col[ds_g2_04];
			$ds_g2_05= $col[ds_g2_05];
			$ds_g2_06= $col[ds_g2_06];
			$ds_g2_07= $col[ds_g2_07];
			$ds_g2_08= $col[ds_g2_08];
			$ds_g2_09= $col[ds_g2_09];
			$ds_g2_10= $col[ds_g2_10];
			$ds_g2_11= $col[ds_g2_11];
			$ds_g2_12= $col[ds_g2_12];
			$ds_g2_13= $col[ds_g2_13];
			$ds_g2_14= $col[ds_g2_14];
			$ds_g2_15= $col[ds_g2_15];
			//편의멀티미디어
			$ds_g3_01= $col[ds_g3_01];
			$ds_g3_02= $col[ds_g3_02];
			$ds_g3_03= $col[ds_g3_03];
			$ds_g3_04= $col[ds_g3_04];
			$ds_g3_05= $col[ds_g3_05];
			$ds_g3_06= $col[ds_g3_06];
			$ds_g3_07= $col[ds_g3_07];
			$ds_g3_08= $col[ds_g3_08];
			$ds_g3_09= $col[ds_g3_09];
			$ds_g3_10= $col[ds_g3_10];
			$ds_g3_11= $col[ds_g3_11];
			$ds_g3_12= $col[ds_g3_12];
			$ds_g3_13= $col[ds_g3_13];
			$ds_g3_14= $col[ds_g3_14];
			$ds_g3_15= $col[ds_g3_15];
			//시트 
			$ds_g4_01= $col[ds_g4_01];
			$ds_g4_02= $col[ds_g4_02];
			$ds_g4_03= $col[ds_g4_03];
			$ds_g4_04= $col[ds_g4_04];
			$ds_g4_05= $col[ds_g4_05];
			$ds_g4_06= $col[ds_g4_06];
			$ds_g4_07= $col[ds_g4_07];
			$ds_g4_08= $col[ds_g4_08];
			$ds_g4_09= $col[ds_g4_09];
			$ds_g4_10= $col[ds_g4_10];
			$ds_g4_11= $col[ds_g4_11];
			$ds_g4_12= $col[ds_g4_12];
			$ds_g4_13= $col[ds_g4_13];
			$ds_g4_14= $col[ds_g4_14];
			$ds_g4_15= $col[ds_g4_15];
			
			$upload_file_report_name = $col[nm_file_report];
			$upload_file_report_back_name = $col[nm_file_report_back];
			
			$upload_file_main_name = $col[nm_file_main];
			$upload_file_list_name = $col[nm_file_list];

		}else{
			AlertBack("게시물을 가져오지 못하였습니다.");
		}
		$PageNo = $PageNo;
//		$mode = "Update";
	}else{
//		$mode="Add";
	}

	if ($mode=="Add"){		
//		$cd_userid = $_SESSION[admin_cd_userid];
	}

	if($ds_open==""){$ds_open="Y";}
	if($cd_category==""){$cd_category="1";}

?>
<? include("../include/inc_top.php") ?>
<? include("../include/inc_header.php") ?>

<section id="wrap">
	<section id="visual" class="visual_sell">
		<h2>내차팔기</h2>
		<p>쉽고 간편한 내차팔기, 견적산출, 최종 매각까지 어떤 수수료도 요구하지 않습니다.</p>
	</section>

	<section id="content">
		<ul class="location">
			<li><a href="/" class="home">홈</a></li>
			<li><span class="depth1">내차팔기</span></li>
			<li><span class="depth2">입찰하기</span></li>
		</ul>

		<h3>차량정보 입력</h3>
<form id="frmForm" name="frmForm" method="post" action="proc.php" enctype="multipart/form-data">
<input type="hidden" name="car_report" id="car_report" value="<?=$car_report?>"/>
<input type="hidden" name="ds_cate" id="ds_cate" value="<?=$ds_cate?>"/>
<input type="hidden" name="cd_car" id="cd_car" value="<?=$cd_car?>"/>
<input type="hidden" name="mode" id="mode" value="<?=$mode?>"/>
<input type="hidden" name="cd_userid" id="cd_userid" value="<?=$cd_userid?>"/>
<input type="hidden" name="PageNo" id="PageNo" value="<?=$PageNo?>"/>
<input type="hidden" name="upload_file_report_name" id="upload_file_report_name" value="<?=$upload_file_report_name?>"/>
<input type="hidden" name="upload_file_report_back_name" id="upload_file_report_back_name" value="<?=$upload_file_report_back_name?>"/>
<input type="hidden" name="upload_file_main_name" id="upload_file_report_name" value="<?=$upload_file_main_name?>"/>
<input type="hidden" name="upload_file_list_name" id="upload_file_list_name" value="<?=$upload_file_list_name?>"/>
<input type="hidden" name="cd_category" id="cd_category" value="<?=$cd_category?>"/>
<input type="hidden" name="s_nm_name" id="s_nm_name" value="<?=$s_nm_name?>"/>
		<table class="tbl_h">
			<colgroup>
				<col width="18%">
				<col width="*">
			</colgroup>
			<tr>
				<th>차량번호</th>
				<td>
					<input type="text" name="nm_number" id="nm_number" class="inp_txt" maxlength="50" value="11111<?=$nm_number?>">
					<a href="#" class="td_btn" style="margin-left:50px;" id="btnCarInfo">차량번호 확인</a>
				</td>
			</tr>
			<tr>
				<th>제조사</th>
				<td>
					<select id="cd_brand" name="cd_brand"></select>
				</td>
			</tr>
			<tr>
				<th>모델</th>
				<td>
					<select id="cd_model" name="cd_model"></select>
				</td>
			</tr>
			<tr>
				<th>세부모델</th>
				<td>
					<select id="cd_model_sub" name="cd_model_sub"></select>
				</td>
			</tr>
			<tr>
				<th>등급</th>
				<td>
					<select id="cd_grade" name="cd_grade"></select>
				</td>
			</tr>
			<tr>
				<th>연식(최초등록일)</th>
				<td>
					<select name="nm_regdate_yyyy" id="nm_regdate_yyyy" style="width:100px;">
					<?
					for($i=2008; $i<=2019; $i++){
					?>
						<option value="<?=$i?>" <? if($i == $nm_regdate_yyyy){ ?>selected<? } ?>><?=$i?></option>
					<?
					}
					?>
					</select>
					년
					<select name="nm_regdate_mm" id="nm_regdate_mm" style="width:100px;">
					<?
					for($i=1; $i<=12; $i++){
					?>
						<option value="<?=$i?>" <? if($i == $nm_regdate_mm){ ?>selected<? } ?>><?=$i?></option>
					<?
					}
					?>
					</select>
					월
				</td>
			</tr>
			<tr>
				<th>형식연도</th>
				<td>
					<select id="ds_year" name="ds_year"></select>
				</td>
			</tr>
			<tr>
				<th>배기량</th>
				<td>
					<input type="text" name="nm_cc" id="nm_cc" class="inp_txt" maxlength="50" value="<?=$nm_cc?>"> cc
				</td>
			</tr>
			<tr>
				<th>변속기</th>
				<td>
					<select id="ds_transmission" name="ds_transmission"></select>
				</td>
			</tr>
			<tr>
				<th>연료</th>
				<td>
					<select id="ds_oil" name="ds_oil"></select>
				</td>
			</tr>
			<tr>
				<th>색상</th>
				<td>
					<input type="text" name="nm_color" id="nm_color" class="inp_txt" maxlength="50" value="<?=$nm_color?>">
				</td>
			</tr>
			<tr>
				<th>주행거리</th>
				<td>
					<input type="text" name="nm_mileage" id="nm_mileage" class="inp_txt" maxlength="50" value="<?=$nm_mileage?>"> km
				</td>
			</tr>
			<tr>
				<th>사고유무</th>
				<td>
					<select id="ds_accident" name="ds_accident"></select>
				</td>
			</tr>
		</table>
</form>

		<div class="btn_center">
			<a href="#" class="button arr" id="btn_write">다음(옵션선택)</a>
		</div>
	</section>
</section>

<script language="javascript" type="text/javascript">

	$(document).ready(function() {
//		setCodeSelect("listcategory","cd_category", "car_category","cd_category","<?=$cd_category?>","선택하세요","");
		setCodeSelect("listBrandBycate","cd_brand","car_brand","cd_brand",'<?=$cd_brand?>','선택하세요','');
<? if (!empty($cd_model)){ ?>
		setCodeSelect("listModelBybrand","cd_model","car_model","cd_model",'<?=$cd_model?>','선택하세요','<?=$cd_brand?>');
<? } ?>
<? if (!empty($cd_model_sub)){ ?>
		setCodeSelect("listModelSubByModel","cd_model_sub","car_model_sub","cd_model_sub",'<?=$cd_model_sub?>','선택하세요','<?=$cd_model?>');	
<? } ?>
<? if (!empty($cd_grade)){ ?>
		setCodeSelect("listGradeByModelSub","cd_grade","car_grade","cd_grade",'<?=$cd_grade?>','선택하세요','<?=$cd_model_sub?>');	
<? } ?>

//		$("#cd_category").change(function(){
//			setCodeSelect("listBrandBycate","cd_brand","car_brand","cd_brand","",'선택하세요',$(this).val());			
//		});
		
		$("#cd_brand").change(function(){
			setCodeSelect("listModelBybrand","cd_model","car_model","cd_model","",'선택하세요',$(this).val());			
		});
		
		$("#cd_model").change(function(){
			setCodeSelect("listModelSubByModel","cd_model_sub","car_model_sub","cd_model_sub","",'선택하세요',$(this).val());			
		});

		$("#cd_model_sub").change(function(){
			setCodeSelect("listGradeByModelSub","cd_grade","car_grade","cd_grade","",'선택하세요',$(this).val());			
		});

		setCodeSelect("listcode","ds_year", "car_master","ds_year","<?=$ds_year?>","선택하세요","");
		setCodeSelect("listcode","ds_transmission", "car_master","ds_transmission","<?=$ds_transmission?>","선택하세요","");
		setCodeSelect("listcode","ds_oil", "car_master","ds_oil","<?=$ds_oil?>","선택하세요","");
		setCodeSelect("listcode","ds_accident", "car_master","ds_accident","<?=$ds_accident?>","선택하세요","");

		$("#btn_write").bind("click",function(){
//nm_number,cd_brand,cd_model,cd_grade,nm_regdate_yyyy,nm_regdate_mm,ds_year,nm_cc,ds_transmission,ds_oil,nm_color,nm_mileage,ds_accident
			if ("<?=$s_cd_car?>" == ""){
			var fieldlist = [["nm_number","차량번호"],["cd_brand","제조사"],["cd_model","모델"],["cd_grade","등급"],["nm_regdate_yyyy","연식(최초등록일)"],["nm_regdate_mm","연식(최초등록일)"],["ds_year","형식연도"],["nm_cc","배기량"],["ds_transmission","변속기"],["ds_oil","연료"],["nm_color","색상"],["nm_mileage","주행거리"],["ds_accident","사고유무"]] ;
			}else{
			var fieldlist = [["cd_brand","제조사"],["cd_model","모델"],["cd_grade","등급"],["nm_regdate_yyyy","연식(최초등록일)"],["nm_regdate_mm","연식(최초등록일)"],["ds_year","형식연도"],["nm_cc","배기량"],["ds_transmission","변속기"],["ds_oil","연료"],["nm_color","색상"],["nm_mileage","주행거리"],["ds_accident","사고유무"]] ;
			}

			if (!fnCheckForm(fieldlist)){
				return false;
			}
			
			var c = confirm("처리하시겠습니까?");
			if(c){
				$("#frmForm").submit();
			}else{
				return false;
			}
		});

		$("#btnCarInfo").bind("click",function(){
                
			if($("#s_nm_name").val() == ""){
//				alert("판매자명을 입력하세요.");
//				$("#s_nm_name").focus();
				return false;
			}
			
			if($("#nm_number").val() == ""){
				alert("차량 번호를 입력하세요.");
				$("#nm_number").focus();
				return false;
			}

/*
        var i=0,j=0,k=0;
            $.getJSON("car_info_proc.php", { nm_name: $("#s_nm_name").val(), nm_number: $("#nm_number").val()},function(data) {
				$.each(data, function(i,item){
					
					html = "<li>\n";
						html+= "<span class=\"radio_wrap\">\n";
						html+= "	"+item.PROCESS_IMPRTY_RESN_CODE+" \n";
						html+= "	<br>\n";
						html+= "	"+item.PROCESS_IMPRTY_RESN_DTLS+" \n";
						html+= "	<br>\n";
						html+= "	"+item.CAR_INFO+" \n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
					$.each(item.CAR_INFO, function(j,item1){
						html+= "	"+item1.IMPORT_YN+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.BRAND_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.BRAND_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.REP_CAR_CLASS_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.REP_CAR_CLASS_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.YEAR_TYPE+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.CAR_CLASS_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.CAR_CLASS_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.FUEL+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.ENGINESIZE+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.ISTD_TRANS+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.EXT_SHAPE+" \n";
						html+= "	<br>\n";
						html+= "	"+item1.FRST_REGIST_DT+" \n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						
					$.each(item1.GRADE_LIST, function(k,item2){
						html+= "	"+item2.CAR_GRADE_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+item2.CAR_GRADE_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+item2.GRADE_SALE_PRICE+" \n";
						html+= "	<br>\n";
						html+= "	"+item2.GRADE_USED_CAR_PRICE+" \n";
						html+= "	<br>\n";
						
					});

					});
						html+= "</span>\n";
						html+= "</li>  \n";
					alert(html);

				});		
            });
*/
           $.post("car_info_proc.php", { nm_name: $("#s_nm_name").val(), nm_number: $("#nm_number").val()},function(data) {
//alert(data);
				var obj = JSON.parse(data);

//alert(obj.INFO);
				var INFO = obj.INFO;

//alert("isArray(INFO) : "+Array.isArray(INFO));
				html = "<li>\n";
					html+= "	"+INFO.PROCESS_IMPRTY_RESN_CODE+" \n";
					html+= "	<br>\n";
					html+= "	"+INFO.PROCESS_IMPRTY_RESN_DTLS+" \n";
					html+= "	<br>\n";

				var CARINFO = null;
				var GRADE_LIST = null;
					CARINFO = INFO.CARINFO;
				
//alert(INFO.CARINFO);
			
//alert("isArray(CARINFO) : "+Array.isArray(CARINFO));

				if (Array.isArray(CARINFO))
				{
					for(var j = 0; j < CARINFO.length; j ++) {
						html+= "	"+CARINFO[j].IMPORT_YN+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO[j].BRAND_NBR+" \n";
						html+= "	<br>\n";

					}
				}else{
//alert("carinfo no array");
//alert("carinfo no CARINFO.IMPORT_YN      "+CARINFO.IMPORT_YN);
						html+= "	"+CARINFO.IMPORT_YN+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.BRAND_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.BRAND_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.REP_CAR_CLASS_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.REP_CAR_CLASS_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.YEAR_TYPE+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.CAR_CLASS_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.CAR_CLASS_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.FUEL+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.ENGINESIZE+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.ISTD_TRANS+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.EXT_SHAPE+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.PERSON+" \n";
						html+= "	<br>\n";
						html+= "	"+CARINFO.FIRST_REGIST_DT+" \n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						html+= "	<br>\n";
						
						GRADE_LIST = CARINFO.GRADE_LIST;
				}

//alert(html);

//alert(CARINFO.length);

//alert("isArray(GRADE_LIST) : "+Array.isArray(GRADE_LIST));

				if (Array.isArray(GRADE_LIST))
				{
				for(var i = 0; i < GRADE_LIST.length; i ++) {
						html+= "	"+GRADE_LIST[i].CAR_GRADE_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST[i].CAR_GRADE_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST[i].GRADE_SALE_PRICE+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST[i].GRADE_USED_CAR_PRICE+" \n";
						html+= "	<br>\n";
						
				}
				}else{
//alert("GRADE_LIST no array");
						html+= "	"+GRADE_LIST.CAR_GRADE_NBR+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST.CAR_GRADE_NM+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST.GRADE_SALE_PRICE+" \n";
						html+= "	<br>\n";
						html+= "	"+GRADE_LIST.GRADE_USED_CAR_PRICE+" \n";
						html+= "	<br>\n";
						
				}

						html+= "</span>\n";
						html+= "</li>  \n";

				alert(data+"\n\n\n\n\n"+html);

            });

			return false;
    
		});

		
	});
</script>

<? include("../include/inc_footer.php") ?>
<? include("../include/inc_bottom.php") ?>
<?
mysql_close($connect);
?>
