function only_int(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;
    return true;
}
function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}
 
function bookmark(a){
 var url = window.document.location;
 var title = window.document.title;
 var b = getBrowserInfo();
 if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = url+','+title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}
function checSearch() {
	if (document.frm_search.nomer.value.length > 0) {
		return true;
	} else {
		formErrors = false;    
		if (document.frm_search.god1.value.length < 1) {
			formErrors = "Необходимо указать год выпуска";
		}
		if (document.frm_search.firma.value.length < 1) {
			formErrors = "Необходимо указать фирму-производитель";
		}
		if (document.frm_search.category.value.length < 1) {
			formErrors = "Необходимо указать тип транспорта";
		}
		if (formErrors) {
			alert(formErrors);
			return false;
		} else {
			//formObj.preview.disabled = true;
			//formObj.submit.disabled = true;
			return true;
		}
	}
}
document.write("<div style='height: 120px; width: 956px; padding-top: 25px; clear: both; background: #FFFFFF url(../Include_IMG/fon_index_search.gif) repeat-x; margin: auto; text-align: center;'>")
document.write("	<div style='background: url(../Include_IMG/fon_index_forma_search.gif) no-repeat; height: 120px; width: 904px; margin: auto;  font: bold 12px Arial; color: #6f6f6f;'>")
document.write("		<FORM ACTION='search.asp' METHOD='POST' name='frm_search' onsubmit='return checSearch(this)'>")
document.write("		<TABLE WIDTH='904' BORDER='0' CELLSPACING='0' CELLPADDING='0'>")
document.write("			<TR><TD COLSPAN='10'><IMG SRC='Include_Img/1.gif' WIDTH='1' HEIGHT='60' BORDER='0'></TD></TR>")
document.write("			<TR>")
document.write("				<TD ROWSPAN='3'><IMG SRC='Include_Img/1.gif' WIDTH='125' HEIGHT='1' BORDER='0'></TD>")
document.write("				<TD ALIGN='left'>Тип транспорта</TD>")
document.write("				<TD><IMG SRC='Include_Img/1.gif' WIDTH='8' HEIGHT='1' BORDER='0'></TD>")
document.write("				<TD ALIGN='left'>Фирма-производитель</TD>")
document.write("				<TD><IMG SRC='Include_Img/1.gif' WIDTH='8' HEIGHT='1' BORDER='0'></TD>")
document.write("				<TD ALIGN='center'>Год выпуска</TD>")
document.write("				<TD><IMG SRC='Include_Img/1.gif' WIDTH='8' HEIGHT='1' BORDER='0'></TD>")
document.write("				<TD ALIGN='left'>Номер по каталогу</TD>")
document.write("				<TD><IMG SRC='Include_Img/1.gif' WIDTH='8' HEIGHT='1' BORDER='0'></TD>")
document.write("				<TD ROWSPAN='3' VALIGN='bottom'><INPUT TYPE='image' NAME='submit' SRC='Include_Img/knopka_index_search.gif' WIDTH='126' HEIGHT='39'></TD>")
document.write("				<TD ROWSPAN='3'><IMG SRC='Include_Img/1.gif' WIDTH='25' HEIGHT='1' BORDER='0'></TD>")
document.write("			</TR>")
document.write("			<TR><TD COLSPAN='10'><IMG SRC='Include_Img/1.gif' WIDTH='1' HEIGHT='6' BORDER='0'></TD></TR>")
document.write("			<TR>")
document.write("				<TD ALIGN='left'>")
document.write("					<SELECT NAME='category' style='width: 152px;'>")
document.write("						<OPTION VALUE=''></OPTION>")
document.write("						<OPTION VALUE='1'>Квадроциклы</OPTION>")
document.write("						<OPTION VALUE='6'>Снегоходы</OPTION>")
document.write("						<OPTION VALUE='2'>Мотоциклы</OPTION>")
document.write("						<OPTION VALUE='3'>Скутеры</OPTION>")
document.write("						<OPTION VALUE='4'>Гидроциклы</OPTION>")
document.write("						<OPTION VALUE='5'>Спецтехника</OPTION>")
document.write("						<OPTION VALUE='7'>Лодки</OPTION>")
document.write("					</SELECT>")
document.write("				</TD>")
document.write("				<TD></TD>")
document.write("				<TD ALIGN='left'>")
document.write("					<SELECT NAME='firma' style='width: 152px;'>")
document.write("							<OPTION VALUE=''></OPTION>")
document.write("							<OPTION VALUE='2'>Honda</OPTION>")
document.write("							<OPTION VALUE='5'>Polaris</OPTION>")
document.write("							<OPTION VALUE='3'>Kawasaki</OPTION>")
document.write("							<OPTION VALUE='6'>Suzuki</OPTION>")
document.write("							<OPTION VALUE='7'>Yamaha</OPTION>")
document.write("							<OPTION VALUE='8'>Arctic Cat</OPTION>")
document.write("							<OPTION VALUE='1'>Can Am</OPTION>")
document.write("							<OPTION VALUE='4'>KTM</OPTION>")
document.write("							<OPTION VALUE='9'>Ski Doo</OPTION>")
document.write("							<OPTION VALUE='10'>Sea Doo</OPTION>")
document.write("							<OPTION VALUE='12'>Harley Davison</OPTION>")
document.write("						</SELECT>")
document.write("				</TD>")
document.write("				<TD></TD>")
document.write("				<TD>")
document.write("					<INPUT TYPE='text' MAXLENGTH='4' STYLE='width: 100px; text-align: center;' NAME='god1' onKeyPress='return only_int(event)'>")
document.write("				</TD>")
document.write("				<TD></TD>")
document.write("				<TD ALIGN='left'>")
document.write("					<INPUT TYPE='text' STYLE='width: 190px;' NAME='nomer'>")
document.write("				</TD>")
document.write("			</TR>")
document.write("		</TABLE>")
document.write("		</FORM>")
document.write("	</div>")
document.write("</div>")
