////////////////////////////////////////////////////////////////////
//
//　Goo-net中古車検索JSファイル 
//
//					2004/10/25 shoji
// 追加： 2006/08/18 Trung
////////////////////////////////////////////////////////////////////

//------summary.cgiで使用----------------------------------------

//「全ての詳細」リンク
function DetailAll() {

        for(i=0; i < document.form1.elements.length; i++) {
                if(document.form1.elements[i].name == "id") {
                        document.form1.elements[i].checked = true;
                }
        }

}

// 「チェックボタンを全て外す」
function Check_All_Remove() {
        for(i=0; i < document.form1.elements.length; i++) {
                if(document.form1.elements[i].name == "id") {
                        document.form1.elements[i].checked = false;
                }
        }
}

// 地域再選択・価格帯検索・写真表示非表示リンク
function SubmitJump(str) {
        if(str == "select_area"){
                document.form1.action = "/cgi-bin/goojp/used/select_area_w.cgi";
        }else if(str == "price_range"){
                document.form1.action = "/cgi-bin/goojp/used/price_range_w.cgi";
        }else{
                document.form1.dummy.name = str;
                document.form1.action = "/cgi-bin/goojp/used/search_dg_w.cgi";
                if(str == "photo_on" || str == "photo_off"){
                        document.form1.disp_mode.value = "normal";
                }
        }
        document.form1.submit();
}

// ページジャンプ
function JumpPage(value_str) {
        document.form1.summary_offset.value=value_str;
        document.form1.action = "/cgi-bin/goojp/used/search_dg_w.cgi";
        document.form1.submit();
}

// オプション絞込み設定をリセットする
function Option_Reset() {
        for(i=0; i < document.shiborikomi.elements.length; i++) {
		if(document.shiborikomi.elements[i].type == "checkbox"){
	                document.shiborikomi.elements[i].checked = false;
		}else if(document.shiborikomi.elements[i].type == "radio"){
			if(document.shiborikomi.elements[i].value=="" || document.shiborikomi.elements[i].value=="ANY"){
				 document.shiborikomi.elements[i].checked = true;
			}else{
				 document.shiborikomi.elements[i].checked = false;
			}
		}
                document.shiborikomi.elements[i].selectedIndex = 0;
        }
}

///////////////////////
// 年式を処理する
// 2006/08/18 Trung
///////////////////////
function Year_Check() {
   var nen1_index = 0;
   var nen2_index = 0;
   var nen1_value = "";
   var nen2_value = "";

   // 選択した年式を取得する
   for(i=0; i < document.shiborikomi.elements.length; i++) {
      if(document.shiborikomi.elements[i].name == "nen1" && document.shiborikomi.elements[i].type != "hidden"){ 
         nen1_index = document.shiborikomi.elements[i].selectedIndex;
         nen1_value = document.shiborikomi.elements[i].value; 
      }
      if(document.shiborikomi.elements[i].name == "nen2" && document.shiborikomi.elements[i].type != "hidden"){
         nen2_index = document.shiborikomi.elements[i].selectedIndex;
         nen2_value = document.shiborikomi.elements[i].value;
      }
   }

   // 逆に交換する。備考：「hidden」と「select-one」というタイプが２つある。
   if(nen1_index > 0 && nen2_index > 0 && nen1_index < nen2_index)
   {
      for(i=0; i < document.shiborikomi.elements.length; i++) {
         if(document.shiborikomi.elements[i].name == "nen1"){
            if(document.shiborikomi.elements[i].type == "hidden"){
               document.shiborikomi.elements[i].value = nen2_value;
            }
            if(document.shiborikomi.elements[i].type != "hidden"){
               document.shiborikomi.elements[i].selectedIndex = nen2_index;
            }
         }
         if(document.shiborikomi.elements[i].name == "nen2"){
            if(document.shiborikomi.elements[i].type == "hidden"){
               document.shiborikomi.elements[i].value = nen1_value;
            }
            if(document.shiborikomi.elements[i].type != "hidden"){
               document.shiborikomi.elements[i].selectedIndex = nen1_index;
            }
         }
      }
   }
}

// フォーム内の余計な変数の値をリセットする
function FormReset() {
        document.form1.action = "/cgi-bin/goojp/used/detail_list_w.cgi";
        document.form1.target = "_self";
        document.form1.button_name.value = "";
        document.form1.disp_mode.value = document.form1.PHOTO_FLG.value;
}

// 「チェックの詳細」リンク
function Submit_Ids(str) {

        document.form1.button_name.value = str;
        document.form1.action="/cgi-bin/goojp/used/detail_list_w.cgi";
        document.form1.submit();
}

// 「写真の未表示」リンク
function SubmitModeSummary() {
        document.form1.disp_mode.value = "thumb";
        document.form1.action = "/cgi-bin/goojp/used/search_dg_w.cgi";
        document.form1.submit();
}

function SubmitOshirase() {
	document.form1.action = "http://www.goo-net.com/cgi-bin/goojp/goopass/dailysearch/dailysearch_entry.cgi";
        document.form1.submit();
}

function SubmitSpread(id, area, baitai, flag, lang) {
	document.form1.action = "/cgi-bin/goojp/used/spread_n_w.cgi?goo_car_id="+id+"&areacd="+area+"&baitai="+baitai+"&flag="+flag+"&lang="+lang;
	document.form1.submit();
}

function CheckNintei(sp_value){

	if(sp_value == "1"){
		if(document.shiborikomi.shop_type_nintei.checked == true){
			document.shiborikomi.sub_p2.value=sp_value;
		}else{
			document.shiborikomi.sub_p2.value = "1,2";
		}
	}else{
		document.shiborikomi.sub_p2.value=sp_value;
	}

	//FORM内容の矛盾を調節する
	if(sp_value == ""){
		document.shiborikomi.shop_type_nintei.checked = false;
	}else if(sp_value == "1"){
		
		if(document.shiborikomi.shop_type_nintei.checked == true){
			document.shiborikomi.shop_type[0].checked = false;	
			document.shiborikomi.shop_type[1].checked = true;
		}
	}
}



// --------- summary.cgi EOF ------------------------------------------

// --------- maker_search.cgiで使用 -----------------------------------

function MakerSearchCheckForm(){
        var cnt = 0;

        for(i=0; i<document.form1.elements.length; i++){
                if(document.form1.elements[i].checked){
	                cnt = cnt + 1;
                }
        }

        if(cnt > 10){
		window.alert("選択できる車種は10車種までです");
                return(false);
        }
        if(cnt == 0){
		window.alert("車種を選択してください");
                return(false);
        }
        return(true);
}

function SubmitSelectArea(){
    if (MakerSearchCheckForm()) {
        document.form1.submit();
    }
}


function MakerSearchLinkSubmit(sCarCd){

        for(nCounter=0; nCounter<document.form1.elements.length; nCounter++){
                if(document.form1.elements[nCounter].name == 'car_cd' &&
                   document.form1.elements[nCounter].type == 'checkbox'){

                        if(document.form1.elements[nCounter].value != sCarCd){
                                document.form1.elements[nCounter].checked = false;
                        }else{
                                document.form1.elements[nCounter].checked = true;
                        }
                }
        }
        document.form1.submit();
}

// --------- maker_search.cgi EOF -------------------------------------

// --------- select_area.cgiで使用 ------------------------------------
function on_off (start, end, flag){
	if (document.form1.pref_all[flag].checked == true){
		for (i=start; i<end; i++){
			document.form1.pref_c[i].checked = true;
		}
	}
	if (document.form1.pref_all[flag].checked == false){
		for (i=start; i<end; i++){
			document.form1.pref_c[i].checked = false;
		}
	}
	allchk(start,end);
}


function on_off2 (start, end, flag){
	start++;
	end++;
	if (document.form1.pref_all[flag].checked == true){
		for (i=start; i<end; i++){
			document.form1.pref_c[i].checked = true;
		}
	}
	if (document.form1.pref_all[flag].checked == false){
		for (i=start; i<end; i++){
			document.form1.pref_c[i].checked = false;
		}
	}
	allchk2(start,end);
}


function all_on_off (flag){
	if (document.form1.pref_all[flag].checked == true){
		for (i=1; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
				document.form1.pref_all[i].checked = true;
			}
		}
		for (i=0; i<47; i++){
			document.form1.pref_c[i].checked = true;
		}
	}
	if (document.form1.pref_all[flag].checked == false){
		for (i=1; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
				document.form1.pref_all[i].checked = false;
			}
		}
		for (i=0; i<47; i++){
			document.form1.pref_c[i].checked = false;
		}
	}
}

function all_on_off2 (flag){
	if (document.form1.pref_all[flag].checked == true){
		for (i=1; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
				document.form1.pref_all[i].checked = true;
			}
		}
		for (i=1; i<48; i++){
			document.form1.pref_c[i].checked = true;
		}
	}
	if (document.form1.pref_all[flag].checked == false){
		for (i=1; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
				document.form1.pref_all[i].checked = false;
			}
		}
		for (i=1; i<48; i++){
			document.form1.pref_c[i].checked = false;
		}
	}
}


function chk (start, end, crt, flag){
	var boxcnt;

	if (document.form1.pref_c[crt].checked == true){
		boxcnt = 0;
		for (i=start; i<end; i++){
			if (document.form1.pref_c[i].checked == true){
				boxcnt = boxcnt + 1;
			}
		}
		if ((boxcnt == end - start) && (flag != "")){
			document.form1.pref_all[flag].checked = true;
		}
	}
	if (document.form1.pref_c[crt].checked == false){
		boxcnt = 0;
		for (i=start; i<end; i++){
			if (document.form1.pref_c[i].checked == false){
				boxcnt = boxcnt + 1;
			}
		}
		if ((boxcnt <= end - start) && (flag != "")){
			document.form1.pref_all[flag].checked = false;
		}
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = false;
		}
	}
	allchk(start,end);
}

function chk2 (start, end, crt, flag){
	var boxcnt;
	start++;
	end++;

	if (document.form1.pref_c[crt].checked == true){
		boxcnt = 0;
		for (i=start; i<end; i++){
			if (document.form1.pref_c[i].checked == true){
				boxcnt = boxcnt + 1;
			}
		}
		if ((boxcnt == end - start) && (flag != "")){
			document.form1.pref_all[flag].checked = true;
		}
	}
	if (document.form1.pref_c[crt].checked == false){
		boxcnt = 0;
		for (i=start; i<end; i++){
			if (document.form1.pref_c[i].checked == false){
				boxcnt = boxcnt + 1;
			}
		}
		if ((boxcnt <= end - start) && (flag != "")){
			document.form1.pref_all[flag].checked = false;
		}
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = false;
		}
	}
	allchk2(start,end);
}

function allchk (start,end){
	var box0,box1;

	box0 = 0;
	box1 = 0;
	for (i=1; i<=8; i++){
		if (document.form1.pref_all[i].checked == true){
			box1 = box1 + 1;
		} else {
			box0 = box0 + 1;
		}
	}
	if (box1 == 10){
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = true;
		}
	} else if (box0 <= 10){
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = false;
		}
	}
}

function allchk2 (start,end){
	var box0,box1;
	start++;
	end++;

	box0 = 0;
	box1 = 0;
	for (i=0; i<8; i++){
		if (document.form1.pref_all[i].type == 'checkbox' && document.form1.pref_all[i].checked == true){
			box1 = box1 + 1;
		} else {
			box0 = box0 + 1;
		}
	}
	if (box1 == 10){
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = true;
		}
	} else if (box0 <= 10){
		if(document.form1.pref_all[0].type == 'checkbox'){
			document.form1.pref_all[0].checked = false;
		}
	}
}

function link_click_area (start, end, flag){
	// チェックをすべて外す
	for (i=0; i<9; i++){
		if(document.form1.pref_all[i].type == 'checkbox'){
			document.form1.pref_all[i].checked = false;
		}
	}
	for (i=0; i<47; i++){
		document.form1.pref_c[i].checked = false;
	}
	// 地域
	if(flag != ''){
		document.form1.pref_all[flag].checked = true;
	}
	// 全国
	if(start == 0 && end == 47){
		for (i=0; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
               			document.form1.pref_all[i].checked = true;
               		}
		}
	}
	// 該当県にチェック
	for (i=start; i<end; i++){
		document.form1.pref_c[i].checked = true;
	}
       	document.form1.submit();
}

function link_click_area2 (start, end, flag){
	start++;
	end++;
	// チェックをすべて外す
	for (i=0; i<9; i++){
		if(document.form1.pref_all[i].type == 'checkbox'){
			document.form1.pref_all[i].checked = false;
		}
	}
	for (i=0; i<document.form1.elements.length; i++){
		if(document.form1.elements[i].name == "pref_c"){
			document.form1.elements[i].checked = false;
		}
	}
	// 地域
	if(flag != ''){
		document.form1.pref_all[flag].checked = true;
	}
	// 全国
	if(start == 0 && end == 47){
		for (i=0; i<9; i++){
			if(document.form1.pref_all[i].type == 'checkbox'){
               			document.form1.pref_all[i].checked = true;
               		}
		}
	}
	// 該当県にチェック
	for (i=start; i<end; i++){
		document.form1.pref_c[i].checked = true;
	}
       	document.form1.submit();
}

function off_check(start , end ){
	start++;
	end++;
	unchecked_flag = 0;
	for(i=start;i<end;i++){
		if(document.form1.pref_c[i].checked == false){
			unchecked_flag = 1;
			break;
		}
	}
	return(unchecked_flag);
}

function load_check(){
	if(off_check(0,7) == 0){
		document.form1.pref_all[1].checked = true;
	}
	if(off_check(8,13) == 0){
		document.form1.pref_all[2].checked = true;
	}
	if(off_check(13,19) == 0){
		document.form1.pref_all[3].checked = true;
	}
	if(off_check(19,25) == 0){
		document.form1.pref_all[4].checked = true;
	}
	if(off_check(25,29) == 0){
		document.form1.pref_all[5].checked = true;
	}
	if(off_check(29,33) == 0){
		document.form1.pref_all[6].checked = true;
	}
	if(off_check(33,40) == 0){
		document.form1.pref_all[7].checked = true;
	}
	if(off_check(40,47) == 0){
		document.form1.pref_all[8].checked = true;
	}
	if(document.form1.pref_all[1].checked == true && 
		document.form1.pref_all[2].checked == true &&
		document.form1.pref_all[3].checked == true &&
		document.form1.pref_all[4].checked == true &&
		document.form1.pref_all[5].checked == true &&
		document.form1.pref_all[6].checked == true &&
		document.form1.pref_all[7].checked == true &&
		document.form1.pref_all[8].checked == true ){
	
		document.form1.pref_all[0].checked = true;
	}
}


function Check_form(){
	for(i=0; i<48; i++){
		if(document.form1.pref_c[i].checked == true){
			return(true);
		}
	}
	window.alert("探したいエリアを選択してください");
	return(false);
}

function ShopSearchCheckform(){
	for(i=0; i<47; i++){
		if(document.form1.pref_c[i].checked == true){
			return(true);
		}
	}
	window.alert("探したいエリアを選択してください");
	return(false);
}

function link_click_car ( cd ){
	document.grade_select.dummy.value = cd ;
	document.grade_select.dummy.name= 'target_carcd' ;
	document.grade_select.submit();
}

function SubmitLinkSummary(){
    if (Check_form()) {
        document.form1.submit();
    }
}

// --------- select_area.cgi EOF --------------------------------------

//----------- select_grade.cgiで使用 ----------------------------------

var count;

function CheckFormGrade(){
	var count2=0;
        for(i=0; i<document.form1.elements.length; i++){
        	if(document.form1.elements[i].name == "car_grade_cd_new" &&
                   document.form1.elements[i].checked == true){
                           count2++;
                }
        }
        if( count2 > 5){
		window.alert("グレードは１車種に付き、５グレード以内で選択してください");
                return(false);
        }else{
                return( true );
        }
}

function link_click_grade ( no ){

        count=0;
        var count2=0;

        for(i=0; i<document.form1.elements.length; i++){
                if(document.form1.elements[i].name == "car_grade_cd_new"){
                        count++;
                }
        }
        if(count == 1){
                document.form1.car_grade_cd_new.checked = true;
        }else{
                document.form1.car_grade_cd_new[no].checked = true;
        }
        for(i=0; i<document.form1.elements.length; i++){
                if(document.form1.elements[i].name == "car_grade_cd_new" &&
       	        	document.form1.elements[i].checked == true){
                        count2++;
                }
        }
        if( count2 > 5){
		window.alert("グレードは１車種に付き、５グレード以内で選択してください");
        }else{
                document.form1.submit();
        }

}

function SubmitLinkArea(){
    if (CheckFormGrade()) {
        document.form1.submit();
    }
}

// --------- select_grade.cgi EOF -------------------------------------

// ----------multi_zaiko_n.cgi で使用 ---------------------------------

function MultiZaikoJumpPage(value_str) {
        document.form1.offset.value=value_str;
        document.form1.submit();
}

// ----------detail_list.cgi で使用 ---------------------------------
function SubmitForm(str) {
        document.form1.dummy.name = str;
        document.form1.submit();
}
function SubmitModeDetail(str) {
        document.form1.disp_mode.value = str;
        document.form1.submit();
}
function JumpPage2(value_str) {
        document.form1.offset.value=value_str;
        document.form1.submit();
}

function wopen2(szCarID,szPref)
{
szURL = "/cgi-bin/goojp/used/mobile/mb1.cgi?id=".concat(szCarID);
szURL = szURL.concat("&pref=");
szURL = szURL.concat(szPref);
//window.open(szURL,"WindowOpen2","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,width=540,height=300");
document.form1.action = szURL;
document.form1.submit();
}

// --------- detail_list.cgi EOF -------------------------------------

// --------- パンくずで使用(各CGI) -----------------------------------
function SubmitBack(str)
{
        document.form1.action = "/cgi-bin/goojp/used/"+str+"_w.cgi";
	document.form1.target = "_self";
        document.form1.submit();
}
// --------- パンくずで使用(各CGI) EOF -------------------------------

// ---------- 形から検索で使用 ---------------------------------------

function BodytypeJumpPage(offset) {
        document.form1.offset.value = offset;
        document.form1.action = '/cgi-bin/goojp/used/bodytype_disp_w.cgi';
        document.form1.submit();
}

function BodyTypeCheck_form() {
        var cnt = 0;
        for(i=0; i < document.form1.elements.length; i++) {
                if((document.form1.elements[i].name == "car_cd") && (document.form1.elements[i].checked == true)) {
                        cnt = cnt +1;
                }
        }

        if(cnt > 10) {
		window.alert("選択できる車種は10車種までです");
                return(false);
        }
        if(cnt == 0) {
		window.alert("クルマを選択してください");
                return(false);
        }
        return(true);
}

function BodyTypeNextJump(){

        if( true == BodyTypeCheck_form()){
                document.form1.action = "/cgi-bin/goojp/used/select_area_w.cgi";
                document.form1.submit();
        }

}

function BodySortChange (SortObject){

	document.form1.sort_object.value = SortObject;
	if(SortObject == 'D'){
		if(document.form1.sort_daisu.value=='desc'){
			document.form1.sort_daisu.value='asc';
		}else{
			document.form1.sort_daisu.value='desc';
		}

	}else if(SortObject == 'M'){
		if(document.form1.sort_maker.value=='desc'){
			document.form1.sort_maker.value='asc';
		}else{
			document.form1.sort_maker.value='desc';
		}

	}else if(SortObject == 'C'){
		if(document.form1.sort_carnm.value=='desc'){
			document.form1.sort_carnm.value='asc';
		}else{
			document.form1.sort_carnm.value='desc';
		}

	}else if(SortObject == 'P'){
		if(document.form1.sort_price.value=='desc'){
			document.form1.sort_price.value='asc';
		}else{
			document.form1.sort_price.value='desc';
		}

	}
	document.form1.submit();
	return;
}


// ---------- 形から検索で使用 ---------------------------------------

// ----------spread_n.cgi で使用 -------------------------------------

function wopen1( str )

{

window.open("/used/goopon/" + str,"WindowOpen1","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=yes,width=660,height=1000");

}

// --------- spread_n.cgi EOF -----------------------------------------

// ---------- ショールーム zaiko_cassette -----------------------------

// ページジャンプ
function ZaikoCassetteJumpPage(value_str) {
        document.form1.zc_pageno.value=value_str;
        document.form1.action = "/cgi-bin/goojp/used/zaiko_cassette_w.cgi";
        document.form1.submit();
}

function ZaikoCassetteGroupJumpPage(value_str) {
        document.form1.zc_pageno.value=value_str;
        document.form1.action = "/cgi-bin/goojp/used/zaiko_cassette_group_w.cgi";
        document.form1.submit();
}

function ZaikoCassetteBookJumpPage(value_str) {
        document.form1.zc_pageno.value=value_str;
        document.form1.action = "/cgi-bin/goojp/used/zaiko_cassette_book_w.cgi";
        document.form1.submit();
}
//-----------zaiko_casssette EOF -------------------------------------

// ---------- zaiko_n,cgi で使用 ------------------------------------

// ページジャンプ
function TenpoZaikoJumpPage(value_str) {
        document.form1.tenpozaiko_pageno.value=value_str;
        document.form1.submit();
}

//----------- zaiko_n.cgi EOF ---------------------------------------

// ----------- area_search2.cgi で使用 ------------------------------
function AreaSearch2Checkform(){

	var cnt = 0;

	for(i=0; i<document.form1.elements.length; i++){
		if(document.form1.elements[i].checked){
			cnt = cnt + 1;
                }
	}

        if(cnt == 0){
		window.alert("地域を選択してください");
		return(false);
        }else if(cnt > 10){
		window.alert("10地域以上が選択されています")
		return(false);
	}
	
        return(true);
}

function AreaSearch2SubmitForm (){

	if(!(AreaSearch2Checkform())){
		return;
	}
	document.form1.submit();
}

// ----------- friendmail_pre.cgi で使用 ----------------------------
function Check_text(){
        if(document.form1.name.value.search(/[^ 　]/) ==-1){
                window.alert("お名前を入力してください。");
                document.form1.name.focus();
                return(false);
        }else if(document.form1.mail.value.search(/[^ 　]/) ==-1){
                window.alert("メールアドレスを入力してください。");
                document.form1.mail.focus();
                return(false);
        }else if((document.form1.mail.value.search(/[^\!-z]/) != -1) ||
                (document.form1.mail.value.search(/[\"\':\;]/) != -1) ||
                (document.form1.mail.value.search(/\@/) == -1)){
                window.alert("メールアドレスが正しくありません。");
                document.form1.mail.focus();
                return(false);
        }else if(document.form1.mail2.value.search(/[^ 　]/) ==-1){
                window.alert("友達のメールアドレスを入力してください。");
                document.form1.mail2.focus();
                return(false);
        }else if((document.form1.mail2.value.search(/[^\!-z]/) != -1) ||
                (document.form1.mail2.value.search(/[\"\':\;]/) != -1) ||
                (document.form1.mail2.value.search(/\@/) == -1)){
                window.alert("友達のメールアドレスが正しくありません。");
                document.form1.mail2.focus();
                return(false);
        }else{
                return(true);
        }
}

function SubmitFriendMail(){
    if (Check_text()) {
        document.form1.submit();
    }
}
// ----------- friendmail_pre.cgi EOF -------------------------------

// ----------- price_range.cgi で使用 -------------------------------

function SubmitJump2(pri1 , pri2 , ne1 , ne2 ) {

        //元に戻す
        document.form1.price1.value = document.form_org.price1.value;
        document.form1.price2.value = document.form_org.price2.value;
        document.form1.nen1.value = document.form_org.nen1.value;
        document.form1.nen2.value = document.form_org.nen2.value;

        if( pri1 != ""){
                document.form1.price1.value = pri1;
        }
        if( pri2 != ""){
                document.form1.price2.value = pri2;
        }
        if( ne1 != ""){
                document.form1.nen1.value = ne1;
        }
        if( ne2 != ""){
                document.form1.nen2.value = ne2;
        }
        document.form1.action = "/cgi-bin/goojp/used/search_dg_w.cgi";
        document.form1.target = "_parent";
        document.form1.submit();
}

// ----------- price_range.cgi EOF ----------------------------------

//------area_search2.cgiで使用 --------------------------------------
function SubmitAreaSearch(jititai) {
	document.form1.dummy.value = jititai;
	document.form1.dummy.name = "jititai_id";
        document.form1.submit();
}
//------area_search2.cgi EOF ----------------------------------------


// ======= 店舗詳細で使用 add 2005/04/09 shoji ======================
function Opn(url){
	window.open(url,'WindowOpen1','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=650');
}


function ZaikoListJumpPage(value_str) {
        document.frmZaikolist.page.value=value_str;
        document.frmZaikolist.action="/cgi-bin/goojp/used/hdplan_w.cgi";
        document.frmZaikolist.submit();
}

function ClientZaikoJumpPage(value_str) {
        document.frmZaikolist.page.value=value_str;
        document.frmZaikolist.action="/cgi-bin/goojp/used/client_n_w.cgi";
	document.frmZaikolist.zaiko_list_dummy.name="stock";
	document.frmZaikolist.zaiko_list_dummy.value="1";
	document.frmZaikolist.area_id.name="areacd";
	document.frmZaikolist.client_id.name="client_cd";
        document.frmZaikolist.submit();
}

//==============================
// メイン画像のロードエラーチェック
//==============================
function replaceImage(img,error_img){

        //picture1.goo-net.comに画像がない場合、picture.goo-net.comを探す
        //var img_path = img.src;
        //if(img_path.indexOf('picture1.goo-net.com') != -1){
        //        img_path = img_path.replace("picture1.goo-net.com","picture.goo-net.com");
        //        img.src = img_path;
        //}else{
                img.src=error_img;
        //}
}

//==============================
// ソート順切替リンク
//==============================
function SummarySort(str,sort_value) {
        document.form1.sort_flag.value = str;
        document.form1.sort_value.value = sort_value ;
        document.form1.action = "/cgi-bin/goojp/used/search_dg_w.cgi";
        document.form1.submit();
}


