/*入力のヒントポップアップ*/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function go(form) {
	url = form.linkList.options[form.linkList.selectedIndex].value;
	if (url != "-" )  top.location = url;
}


/*車名テキスト検索*/

function submit01($httpDomain) {
//--------------------------------------------------------------------------------
// 入力データによって検索可能か否か 判断
//--------------------------------------------------------------------------------

  if($httpDomain=="") {
    $httpDomain = 'http://www.carsensor.net';
  }

  IntFlgKensaku = 1 ;	//◆検索可能フラグ 0:問題なし 検索エンジンに値を渡す/1:問題有り 検索エンジンに値を渡さない(再入力)
  IntFlgSyatai = 0 ;	//◆車体名にデータ入力が 0:無い / 1:ある
  IntFlgKakaku = 0 ;	//◆価格帯にデータ入力が 0:無い / 1:ある


//◆ 車体名 text
//    alert(document.tf.str.value) ;
//◆ 価格帯 SelectedIndex
//    alert(document.tf.prf.options.selectedIndex) ;
//◆ 価格帯 Value
//    alert(document.tf.prf.value) ;


//◆価格帯の選択チェック
  if (document.tf.PMIN.options.selectedIndex == "0"){
    IntFlgKakaku = 0 ;
  } else {	
    IntFlgKakaku = 1 ;
  }

//◆車体名の入力チェック
  if (document.tf.KW.value == ""){
    IntFlgSyatai = 0 ;
  } else {	
    IntFlgSyatai = 1 ;
  }

//◆車体名スペースのチェック
  StrReg = '[ 　]' ;
	if (document.tf.KW.value.match(StrReg)) {
		if (document.tf.KW.value == "" || document.tf.KW.value.replace(/^[ 　,]+/,"").replace(/[ 　,]+$/,"") == ""){
			alert("文字が正しく入力されていません");
       		IntFlgKensaku = 0 ;
		}else{
       		IntFlgKensaku = 1 ;
		}
    }

  if (
       (IntFlgSyatai == 0) &&
       (IntFlgKakaku == 0)
	 ){
        alert("条件を指定してください\n");
        IntFlgKensaku = 0 ;
	 }

  if (IntFlgKensaku == 1){
		document.tf.action =  $httpDomain + "/usedcar/search.php?STID=CS210610" 
//							+ "?referer=" + document.tf.referer.value
//							+ "&cate=" + document.tf.cate.value 
//							+ "&str=" + document.tf.str.value
							;
		// 呼び出すフレームのjavascriptでパラメタの取得を可能にするため、getとする
		document.tf.method = "get";
		document.tf.submit();
  }

   
}
  function MM_callJS(form) { //v2.0
  return eval(form)
}

function SetPrice(form) {
//■ 価格帯の値を変更した場合
//PMIN = 価格の下限 PMAX=価格の上限をセットする
//指定なしの場合は PMIN="" PMAX=

  //■価格帯 こだわらない
  if (document.tf.PMIN.options.selectedIndex == 0){
    document.tf.PMAX.value = "" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 1){
    document.tf.PMAX.value = "200000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 2){
    document.tf.PMAX.value = "400000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 3){
    document.tf.PMAX.value = "600000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 4){
    document.tf.PMAX.value = "900000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 5){
    document.tf.PMAX.value = "1200000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 6){
    document.tf.PMAX.value = "1600000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 7){
    document.tf.PMAX.value = "2000000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 8){
    document.tf.PMAX.value = "2500000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 9){
    document.tf.PMAX.value = "3000000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 10){
    document.tf.PMAX.value = "4000000" ;
  }

  if (document.tf.PMIN.options.selectedIndex == 11){
    document.tf.PMAX.value = "" ;
  }

}

