document.writeln('<table width=100% border=0 align=center cellpadding=3 cellspacing=0>');
document.writeln('<form name=form_pingu method=post onsubmit="return form_pingu_onsubmit()" action=/pinggu/');
document.writeln('<tr> ');
document.writeln('<td height=26 width=100 align=right>座 位 数：</td>');
document.writeln('<td><select name=zw_num id=zw_num style="font-size: 9pt; border: 1px solid #000000; background-color: #f7f7f7">');
document.writeln('<option value=15 selected>九座以下</option>');
document.writeln('<option value=10>九座以上</option>');
document.writeln('<option value=8>营运车</option>');
document.writeln('</select></td>');
document.writeln('</tr>');
document.writeln('<tr> ');
document.writeln('<td height=26 align=right>新车价格：</td>');
document.writeln('<td><input name=jiage type=text id=jiage size=8 maxlength=255 onKeyUp=\"value=value.replace(\/[^\\d  |^\\.]\/g,\'\')\" onbeforepaste=\"clipboardData.setData(\'text\',clipboardData.getData(\'text\').replace(\/[^\\d  |^\\.]\/g,\'\'))\" \/> 元</td>');
document.writeln('</tr>');
document.writeln('<tr> ');
document.writeln('<td height=26 align=right>行驶里程：</td>');
document.writeln('<td><input name=gongli type=text id=gongli size=8 maxlength=255 onKeyUp=\"value=value.replace(\/[^\\d  |^\\.]\/g,\'\')\" onbeforepaste=\"clipboardData.setData(\'text\',clipboardData.getData(\'text\').replace(\/[^\\d  |^\\.]\/g,\'\'))\" \/> 公里</td>');
document.writeln('</tr>');
document.writeln('<tr> ');
document.writeln('<td height=26 align=right>上牌时间：</td>');
document.writeln('<td height=26><select name=on_year id=on_year>');
var d = new Date();
var int_Year = d.getFullYear();
var temp_value = int_Year-1;
for ( var i = int_Year; i > int_Year - 20; i--) {
	if (temp_value == i) {
			document.writeln('<option value='+ i +' selected>'+ i +'</option>');
	}else{
		document.writeln('<option value='+ i +'>'+ i +'</option>');
	}
}
document.writeln('</select>年 <select name=on_month id=on_month>');
document.writeln('<option value=1 selected>1</option>');
document.writeln('<option value=2>2</option>');
document.writeln('<option value=3>3</option>');
document.writeln('<option value=4>4</option>');
document.writeln('<option value=5>5</option>');
document.writeln('<option value=6>6</option>');
document.writeln('<option value=7>7</option>');
document.writeln('<option value=8>8</option>');
document.writeln('<option value=9>9</option>');
document.writeln('<option value=10>10</option>');
document.writeln('<option value=11>11</option>');
document.writeln('<option value=12>12</option>');
document.writeln('</select>月</td>');
document.writeln('</tr>');
document.writeln('<tr> ');
document.writeln('<td height=26 align=right>品牌口碑：</td>');
document.writeln('<td><select name=koubei id=koubei>');
document.writeln('<option value=8 selected>很好</option>');
document.writeln('<option value=9>较好</option>');
document.writeln('<option value=10>一般</option>');
document.writeln('</select></td>');
document.writeln('</tr>');
document.writeln('<tr> ');
document.writeln('<td colspan=2 align=center> ');
document.writeln('<input name="imageField" type="image" src="/images/pg_bt.gif" />');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</form>');
document.writeln('</table>');

//*-----------------------------------快速评估--------------------------------------------
function fucCheckNUM(NUM)
{
	var i,j,strTemp;
	strTemp="0123456789";
	if ( NUM.length== 0)
		return 0
	for (i=0;i<NUM.length;i++)
	{
		j=strTemp.indexOf(NUM.charAt(i));	
		if (j==-1)
		{
		//说明有字符不是数字
			return 0;
		}
	}
	//说明是数字
	return 1;
}

function fucCheckLength(strTemp)
{
	var i,sum;
	sum=0;
	for(i=0;i<strTemp.length;i++)
	{
		if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
			sum=sum+1;
		else
			sum=sum+2;
	}
	return sum;
}

function fucCheckTEL(TEL)
{
	var i,j,strTemp;
	strTemp="0123456789";
	for (i=0;i<TEL.length;i++)
	{
		j=strTemp.indexOf(TEL.charAt(i));	
		if (j==-1)
		{
			return 0;
		}
	}
	return 1;
}

function chkspc(a)
{
	var i=a.length;
	var j = 0;
	var k = 0;
	while (k<i)
	{
		if (a.charAt(k) != " ")
			j = j+1;
		k = k+1;
	}
	if (j==0)
	{
		return 0;
	}
	
	if (i!=j)
	{ return 2; }
	else
	{
		return 1;
	}
}

function form_pingu_onsubmit() 
{


	if ((document.form_pingu.jiage.value=='') || (chkspc(document.form_pingu.jiage.value)==0) || (fucCheckLength(document.form_pingu.jiage.value)>12) || (fucCheckTEL(document.form_pingu.jiage.value)==0))
	{
		alert("市场新车价必须为数字。");
		document.form_pingu.jiage.focus();
		return false;
	}
	
	if ((document.form_pingu.gongli.value=='') || (chkspc(document.form_pingu.gongli.value)==0) || (fucCheckLength(document.form_pingu.gongli.value)>12) || (fucCheckTEL(document.form_pingu.gongli.value)==0))
	{
		alert("行驶公里数必须为数字。");
		document.form_pingu.gongli.focus();
		return false;
	}
	
}
//-->
