var SearchImgLoader = new Image();// preload image
SearchImgLoader.src = '/jj/jjcommon/img/kurukuru.gif';

String.prototype.trim = function() {
		return this.replace(/(^[\s\u3000]*)|([\s\u3000]*$)/g, "");
	}
String.prototype.unEscapeHTML = function() {
	return this.replace(/\&amp;/g,'&').replace(/\&lt;/g,'<').replace(/\&gt;/g,'>').replace(/\&#39;/g,'\'').replace(/\&quot;/g,'\"');
}
function norikaePop(formName) {
	var LeftPosition = (screen.width) ? (screen.width-600)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-550)/2 : 0;
	var SubWindow=window.open("about:blank", "compinfo", "width=600, height=550, toolbar=1, location=0, status=0, menubar=1, scrollbars=1, resizable=1,top=" + TopPosition + ",left=" + LeftPosition);
	SubWindow.focus();
	document.forms[formName].submit();
}

function linkClick(id) {
	var linkId = '#' + id;
	$(linkId).click();
}

function syncOnload(thickBoxId,imgUrl) {

	$(thickBoxId).empty();
	var html = '<div style=\"position:absolute;z-index:8;\"><img src=\"'+SearchImgLoader.src+'\" style=\"margin: 250px 250px 0pt;z-index:8;border:0;padding:0\"/></div>'
	$(thickBoxId).html(html);
}

function syncAjax(url,param,syncFunction){
	$.ajax({
		type:"POST",
		url:url,
		data:param,
		success:function(msg){
			if(typeof syncFunction == 'function') {
				syncFunction(msg);
			}
		}
	})
}

function getAjaxResult(url,formId,jspId) {
	var param = $(formId).serialize();
	var syncFun = function(msg){
		$(jspId).html(msg);
	}
	syncAjax(url,param,syncFun);
}

function searchKodawari(url,imgUrl,formId,jspId) {

	syncOnload(jspId,imgUrl);

	if($("#tm_tmpRn li") != null && $("#tm_tmpRn li").length > 0) {
		var tmpRn = Array();
		$("#tm_tmpRn li").each(function(index){
			tmpRn[index] = $(this).attr('id');
		});
		if(tmpRn.length > 0) {
			$("#section :checkbox[id^=ensenCdrn]").each(function(index){
				if(jQuery.inArray(this.value, tmpRn) != -1) {
					$("#section :checkbox[id^=rn"+index+"_]").each(function(){
						if($("#section :checkbox[id^=rn"+index+"]").attr("checked")) {
							this.disabled = "disabled";
						}
					});
				}
			});
		}
	}
	getAjaxResult(url,formId,jspId);
}

function doSubmitALL(formId,actionUrl,trgs){
	var form = document.getElementById(formId);

    var rnSelectId = $("#rnSelectId");
	var taSelectId = $("#taSelectId");
	if(rnSelectId != null && rnSelectId.val() == "") {
		rnSelectId.attr("disabled","disabled");
	}
	if(taSelectId != null && taSelectId.val() == "") {
		taSelectId.attr("disabled","disabled");
	}
	if($("#tm_tmpRn li") != null && $("#tm_tmpRn li").length > 0) {
		var tmpRn = Array();
		$("#tm_tmpRn li").each(function(index){
			tmpRn[index] = $(this).attr('id');
		});
		if(tmpRn.length > 0) {
			$("#section :checkbox[id^=ensenCdrn]").each(function(index){
				if(jQuery.inArray(this.value, tmpRn) != -1) {
					$("#section :checkbox[id^=rn"+index+"_]").each(function(){
						if($("#section :checkbox[id^=rn"+index+"]").attr("checked")) {
							this.disabled = "disabled";
						}
					});
				}
			});
		}
	}
    dispSearchImg();
    //document.location.href = actionUrl + "?" + $.param(params);
    form.action = actionUrl;
	form.submit();
}


function doSubmit(formId,actionUrl,trg,fwValue,radioValue){
	if(null != trg && trg.type == "radio"){
		if(trg.value == radioValue){
			return ;
		}
	}
	var form = document.getElementById(formId);
	if(form.fw2 != null) {
		if(null != trg && trg.id != "fwWord") {
			if(fwValue != null) {
				form.fw2.value = fwValue;
			} else {
				form.fw2.value = "";
			}
		}
	}
	//var params = $('#'+formId).serializeArray();
	//params = $.grep(params, function(item, i){
    //    return item.value == "";
    //}, true);
    var rnSelectId = $("#rnSelectId");
	var taSelectId = $("#taSelectId");
	if(rnSelectId != null && rnSelectId.val() == "") {
		rnSelectId.attr("disabled","disabled");
	}
	if(taSelectId != null && taSelectId.val() == "") {
		taSelectId.attr("disabled","disabled");
	}
	if($("#tm_tmpRn li") != null && $("#tm_tmpRn li").length > 0) {
		var tmpRn = Array();
		$("#tm_tmpRn li").each(function(index){
			tmpRn[index] = $(this).attr('id');
		});
		if(tmpRn.length > 0) {
			$("#section :checkbox[id^=ensenCdrn]").each(function(index){
				if(jQuery.inArray(this.value, tmpRn) != -1) {
					$("#section :checkbox[id^=rn"+index+"_]").each(function(){
						if($("#section :checkbox[id^=rn"+index+"]").attr("checked")) {
							this.disabled = "disabled";
						}
					});
				}
			});
		}
	}
    dispSearchImg();
    //document.location.href = actionUrl + "?" + $.param(params);
    form.action = actionUrl;
	form.submit();
}
function doSubmitFw(formId,actionUrl,trg,fwValue){
	var form = document.getElementById(formId);
	var name = trg.name;
	if(name == "tfClear") {
		form.ta.disabled = "disabled";
		form.sc.disabled = "disabled";
		if(form.oz != null) {
			form.oz.disabled = "disabled";
		}
	}
	if(name == "scClear") {
		form.sc.disabled = "disabled";
		if(form.oz != null) {
			form.oz.disabled = "disabled";
		}
	}
	if(name == "ozClear") {
		form.oz.disabled = "disabled";
	}
	if(name == "rnClear") {
		form.rn.disabled = "disabled";
		form.ek.disabled = "disabled";
	}
	if(name == "ekClear") {
		form.ek.disabled = "disabled";
	}
	doSubmit(formId,actionUrl,trg,fwValue);
}
function checkBoxInit() {
	$("#section :checkbox[id^=rn]").each(function(){
		if(this.name == null || name == "") {
			if($("#section :checkbox[id^="+this.id+"_]").length != 0) {
				var ensenChecked = true;
				$("#section :checkbox[id^="+this.id+"_]").each(function(){
					if(!this.checked) {
						ensenChecked = false;
					}
				});
				if(ensenChecked) {
					this.checked = true;
				}
			} else {
				if($("#section :checkbox[id=ensenCd"+this.id+"]").attr("checked") == true) {
					this.checked = true;
				}
			}
		}
	});
	$("#section :checkbox[name=sc]").each(function(){
		var ensenChecked = true;
		if($("#section :checkbox[id^="+this.id+"_]").length != 0) {
			$("#section :checkbox[id^="+this.id+"_]").each(function(){
				if(!this.checked) {
					ensenChecked = false;
				}
			});
			if(ensenChecked) {
				this.checked = true;
			}
		}
	});
}
function doSubmitTaRa(formId,actionUrl,trg,fwValue) {
	doSubmitTaRa2(formId,actionUrl,trg,fwValue);
	doSubmit(formId,actionUrl,trg,fwValue);
}
function doSubmitTaRa2(formId,actionUrl,trg,fwValue) {

	var msgArr = {
		rnMessage:"沿線・駅を１個以上選択してください。",
		scMessage:"エリアを１個以上選択してください。"
	};

	var form = document.getElementById(formId);
	var name = trg.name;
	if(name == null || name == "") {
		if(trg.checked) {
			$("#section :checkbox[id^="+trg.id+"]").attr("checked","true");
			$("#section :checkbox[id=ensenCd"+trg.id+"]").attr("checked","true");
		} else {
			$("#section :checkbox[id^="+trg.id+"]").attr("checked","");
			$("#section :checkbox[id=ensenCd"+trg.id+"]").attr("checked","");
			if($("#section :checkbox[checked]").length == 0) {
				trg.checked = true;
				$("#section :checkbox[id^="+trg.id+"]").attr("checked","true");
				$("#section :checkbox[id=ensenCd"+trg.id+"]").attr("checked","true");
				alert(msgArr.rnMessage);
				return;
			}
		}
	}
	if(name == "ek") {
		var id = trg.id.split('_');
		if(!trg.checked) {
			$("#section :checkbox[id="+id[0]+"]").attr("checked","");
			$("#section :checkbox[id=ensenCd"+id[0]+"]").attr("checked","");
			if($("#section :checkbox[checked]").length == 0) {
				trg.checked = true;
				if($("#section :checkbox[id^="+id[0]+"_]").length == 1) {
					$("#section :checkbox[id="+id[0]+"]").attr("checked","true");
				}
				$("#section :checkbox[id=ensenCd"+id[0]+"]").attr("checked","true");
				alert(msgArr.rnMessage);
				return;
			}
			var flag = true;
			$("#section :checkbox[id^="+id[0]+"_]").each(function(){
				if(this.checked) {
					flag = false;
				}
			});
			if(flag) {
				$("#section :checkbox[id=ensenCd"+id[0]+"]").attr("checked","");
			} else {
				$("#section :checkbox[id=ensenCd"+id[0]+"]").attr("checked","true");
			}
		} else {
			var flag = true;
			$("#section :checkbox[id^="+id[0]+"_]").each(function(){
				if(!this.checked) {
					flag = false;
				}
			});
			if(flag) {
				$("#section :checkbox[id="+id[0]+"]").attr("checked","true");
			}
			$("#section :checkbox[id=ensenCd"+id[0]+"]").attr("checked","true");
		}
	}
	if(name == "sc") {
		if(trg.checked) {
			$("#section :checkbox[id^="+trg.id+"_]").attr("checked","true");
		} else {
			$("#section :checkbox[id^="+trg.id+"_]").attr("checked","");
			if($("#section :checkbox[checked]").length == 0) {
				trg.checked = true;
				$("#section :checkbox[id^="+trg.id+"_]").attr("checked","true");
				alert(msgArr.scMessage);
				return;
			}
		}
	}
	if(name == "oz") {
		var id = trg.id.split('_');
		if(!trg.checked) {
			$("#section :checkbox[id="+id[0]+"]").attr("checked","");
			if($("#section :checkbox[checked]").length == 0) {
				trg.checked = true;
				if($("#section :checkbox[id^="+id[0]+"_]").length == 1) {
					$("#section :checkbox[id="+id[0]+"]").attr("checked","true");
				}
				alert(msgArr.scMessage);
				return;
			}
		} else {
			var flag = true;
			$("#section :checkbox[id^="+id[0]+"_]").each(function(){
				if(!this.checked) {
					flag = false;
				}
			});
			if(flag) {
				$("#section :checkbox[id="+id[0]+"]").attr("checked","true");
			}
		}
	}
}

$.ichiranInit = function() {
	var msgArr = {
		shiryouMessage0:"一括問い合わせチェックボックスが選択されていません。",
		shiryouMessage1:"一括問い合わせチェックボックスが31個以上選択されています。",
		// 17795 2009/11/20 WangCT start
		shiryouMessage2:"チェックボックスが11個以上選択されています。\r\n（まとめて詳細表示は10物件まで可能です）"
		// 17795 2009/11/20 WangCT end
	};
	$('select[id=pc]').change(function() {
		$('select[id=pc]').val($(this).val());
		var path = $('a[id=pcLink]').attr("href");
		// 17743 2009/11/17 WangCT start
		var query = removeQueryParams2('pc|pn', path);
		// 17743 2009/11/17 WangCT end
		var actionUrl = query + "&pc=" + $(this).val();
		location.href = actionUrl;
	});
	$('img[id=shiryoSanFlgId]').click(function(){
		var form = $("form[id='postAction']");
		var $checkbox = $(".data_table").find("input:checkbox[checked]");
		var count = 0;
		$checkbox.each(function(){
			var id = this.id;
			var flag = id.split("_")
			if(flag.length == 2) {
					var bck = $("#kskbnId").val() + "_" + this.value;
					form.append("<input type='hidden' name='bck' value='" + bck + "'/>");
					count += 1;
			}
		});
		if(count == 0) {
			alert(msgArr.shiryouMessage0);
			return false;
		} else if(count > 30) {
			alert(msgArr.shiryouMessage1);
			return false;
		} else {
			form.submit();
		}
	});
	$('a[id=detailId]').click(function(){
		var url = this.href;
		var $checkbox = $(".data_table").find("input:checkbox[checked]");
		if($checkbox.length == 0) {
			alert(msgArr.shiryouMessage0);
			return false;
		} else if($checkbox.length > 10) {
			alert(msgArr.shiryouMessage2);
			return false;
		} else {
			this.href = url + "&" + $(".data_table").find("input:checkbox[checked]").serialize();
		}
	});
}

function shiryoSanPostAction(bckValue) {
    var form = $("form[id='postAction']");
    form.append("<input type='hidden' name='bck' value='" + bckValue + "'/>");
    form.submit();
}

function loadKakudaiImg(kakudaiImg,kakudaiImgPath) {
	$(kakudaiImg).attr('src',$(kakudaiImgPath).html());
}

function norikaePostAction(lndtr,lndtm,lndmk,lndst) {
	var LeftPosition = (screen.width) ? (screen.width-600)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-550)/2 : 0;
	var SubWindow=window.open("about:blank", "compinfo", "width=600, height=550, toolbar=1, location=0, status=0, menubar=1, scrollbars=1, resizable=1,top=" + TopPosition + ",left=" + LeftPosition);
    var form = $("form[id='norikaepostAction']");
    form.append("<input type='hidden' name='lndtr' value='" + lndtr + "'/>");
    form.append("<input type='hidden' name='lndtm' value='" + lndtm + "'/>");
    form.append("<input type='hidden' name='lndmk' value='" + lndmk + "'/>");
    form.append("<input type='hidden' name='lndst' value='" + lndst + "'/>");
    SubWindow.focus();
    form.submit();
}

function searchFw(url) {

	var fwValue = $("#keyword").val();
	if(fwValue != "") {
		url = url + "&" + $("#keyword").serialize();
		location.href = url;
	} else {
		return false;
	}
}
/**
 * 検索条件を表示する/隠す
 * BJB苗興
 */
function showKensakuJyoken(showId){
    $(showId).toggle();
}
/**
 * ページに表示する項目数変更
 * BJB zhoucw
 */
jQuery.changePc = function(trg) {
	document.getElementById("FORM_021").value = $(trg).val();
	document.getElementById("FORM_022").value = $(trg).val();
}

/**
 * 沿線方面選択タブを選択する/隠す
 * BJBSH:LiuHui
 */


function point_JS() {
	this.X = function(obj) {
		var curleft = 0;

		if (obj.offsetParent) {
		   while (obj.offsetParent) {
		    	curleft += obj.offsetLeft;
		   	 	obj = obj.offsetParent;
		   }
		} else if (obj.x) curleft += obj.x;
		return curleft;
	};
	this.Y = function(obj) {
		var curtop = 0;
		if (obj.offsetParent) {
		   while (obj.offsetParent) {

		    curtop += obj.offsetTop;
		    obj = obj.offsetParent;
		   }
		} else if (obj.y) curtop += obj.y;
		return curtop;
	};
}
var point = new point_JS();

function alt(event,t2,trg){

	$("#alt #a2").html(t2);
	$("#alt").css("left", event.clientX + 10);
	$("#alt").css("top", point.Y.call(this,trg) + 30);
	$("#alt").show();

}

function halt() {
	$("#alt").hide();
}

function changeBgImage(obj, url){
         obj.style.cssText="background:url(" + url +  ")";
}

function urlarrange(url) {
	var ekNm = $(".section :input[name=ekNm]");
	if(ekNm.val() == ekNm.attr("title")){
		ekNm.val("");
	}
	if($("#commonSection :input").serialize().length != 0){
		url = url + "&" + $("#commonSection :input").serialize();
	}
	window.location.href = url;
}

function popUpMap(action,popWidth,popHeight)
{
	var LeftPosition = (screen.width) ? (screen.width-popWidth)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-popHeight)/2 : 0;
	SubWindow=window.open(action,"isizejjmap","width="+popWidth+",height="+popHeight
							+",toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,top=" + TopPosition + ",left=" + LeftPosition);
	SubWindow.focus();
}
/**
 * テキスト入替
 * BJBSH:葉
 */

function swapText(codeDisp,caption,index,src, width,height) {

         $("img[id^='thumbnailImg"+index+"']").removeAttr("height");
		 $("img[id^='thumbnailImg"+index+"']").removeAttr("width");
		if(height != null && height != ""&&height!="undefined"){
 			$("img[id^='thumbnailImg"+index+"']").attr("height",height);
 		 }
		 if(width != null && width != ""&&width!="undefined" ){
 			$("img[id^='thumbnailImg"+index+"']").attr("width",width);
 		 }
 		 $("img[id^='thumbnailImg"+index+"']").attr("src",src);
 		 //MANTIS 18540 対応
		 document.getElementById("swapCodeDisp"+index).innerHTML=codeDisp;
		 document.getElementById("swapCaption"+index).innerHTML=caption;
}
 function checkAll(obj,size){
    for(var i=0;i<size;i++){
        var checkBox = document.getElementById("check_box"+i);

     if(obj.checked==true){
	        if(checkBox!=null&&checkBox!=undefined){
	        	checkBox.checked = true;
	        }
   	 }else{
	   		if(checkBox!=null&&checkBox!=undefined){
	        	checkBox.checked = false;
	        }
   	 }
    }
 }
  function shiRyou(size){
  var form = document.getElementById("siryouForm");
  var count = 0;
    for(var i=0;i<size;i++){
     var checkBox = document.getElementById("check_box"+i);
    if(checkBox!=null&&checkBox!=undefined&&checkBox.checked == true){
			count++;
			var bckHidden =document.createElement("input");
			bckHidden.type = "hidden";
			bckHidden.name = "bck";
			bckHidden.value = document.getElementById("check_box"+i).value;
	        form.appendChild(bckHidden);
		}
   	 }
   	 if(count==0){
   	    var msg = "一括問い合わせチェックボックスが選択されていません。";
		alert(msg);
		return;
   	 }else{
   	   form.submit();
   	 }

 }
/*
 *
 * 画像拡大縮小処理
 * height
 * width
 *
 */
	function resizeImg(photo,pWidth,pHeight,flg){
		var _self = $(photo);
		_self.hide();
		var imgDem = {};
		imgDem.width  = 0;
		imgDem.height  = 0;
		///画像自分のサイズ小を取得
		var image = new Image();
		$(image).load(function(){
		if(image.width>0 && image.height>0){
			//縦なりゆき
			if(pHeight == null || pHeight == undefined || pHeight == ""){
				//画像サイズ小:元サイズ生きで表示。天地左右センタリング
				if(image.width <= pWidth){
					imgDem.height = image.height;
					imgDem.width = image.width;
				}else{
					imgDem.width = pWidth;
					imgDem.height = (image.height*pWidth)/image.width;
				}

			}else{
				if(image.width/image.height>= pWidth/pHeight){
		             if(image.width>pWidth){
		                 imgDem.width=pWidth;
		                 imgDem.height=(image.height*pWidth)/image.width;
		             }else{
		                 imgDem.width=image.width;
		                 imgDem.height=image.height;
		             }
		         } else{
		             if(image.height>pHeight){
		                 imgDem.height=pHeight;
		                 imgDem.width=(image.width*pHeight)/image.height;
		             }else{
		                 imgDem.width=image.width;
		                 imgDem.height=image.height;
		             }
		        }
			}
		}
		photo.width = imgDem.width;
		photo.height = imgDem.height;
		if(flg == null || flg == undefined || flg == ""){
			$(photo).parent().css("align","center");
			$(photo).parent().css("vertical-align","top");
			if(imgDem.height > 0 && imgDem.height <= pHeight){
			    $(photo).css("margin-top",(pHeight - imgDem.height)*0.5);
			}
		}


		}).attr("src",photo.src+"?"+new Date().getTime());
		_self.show();
	}

function popUpMap2(action)
{
	SubWindow=window.open(action);
	SubWindow.focus();
}
/**
 * クエリにから指定したパラメータを削除する
 * BJB苗興
 */
function removeQueryParams(params)
{
    var query = location.search.substring(1);
	var regExp = new RegExp ('(&?)(' + params + ')=([^&]*)', 'g');
    result = query.replace(regExp, "");
	result = result.replace('?&', '?');
    return result;
}
function removeQueryParams2(params,query)
{
	var regExp = new RegExp ('(&?)(' + params + ')=([^&]*)', 'g');
    result = query.replace(regExp, "");
	result = result.replace('?&', '?');
    return result;
}
/**
 * クエリにから指定したパラメータの値を取得する
 * BJB苗興
 */
function getParamsValue(name)
{
    var query = location.search.substring(1);
	var regExp = new RegExp (name + '=([^&]*)', "g");
    var result ;
	var array = new Array();
	while ((result = regExp.exec(query)) != null) {
		if(result[1] != null && '' != result[1]) {
			array.push(result[1]);
		}
	}
    return array;
}
function getParamsValue2(name,query)
{
	var regExp = new RegExp (name + '=([^&]*)', "g");
    var result ;
	var array = new Array();
	while ((result = regExp.exec(query)) != null) {
		if(result[1] != null && '' != result[1]) {
			array.push(result[1]);
		}
	}
    return array;
}
/**
 * クエリによって、パラメータの値かあるか判定する
 * BJB苗興
 */
function containsParamValue(name, value)
{
    var query = location.search.substring(1);
    return query.search(name + '=' + value) != -1;
}
function containsParamValue2(name, value, query)
{
    return query.search(name + '=' + value) != -1;
}

/**
 * ホバー、クリック拡張JavaScript
 * BJBchenys
 */
$.hoverClick1_JS = function() {
		//ホバー時の追加クラス
	var hoverClass = 'ov';
	//ホバー、クリックの1つの枠組み
	var sct = $('.js_hover_click');
	sct.each(
		function(){
			//クリック対象
			var clickElm = $(this).find('#link');
			//ホバー対象
			var hoverElm;

			//枠自体がホバー対象
			if($(this).hasClass('js_hover_click_hover'))
			{
				hoverElm = $(this);
			}
			//枠内の対象
			else
			{
				hoverElm = $(this).find('.js_hover_click_hover');
			}

			hoverElm
				//ホバー処理
				.hover(
					function(){
						hoverElm.addClass(hoverClass);
					},
					function(){
						hoverElm.removeClass(hoverClass);
					}
				)
				//クリック処理
				.click(
					function (){
						clickElm.click();
						if( clickElm )
						{

							window.location.href = clickElm.attr('href');
						}
						return false;
					}
				)
		}
	);

	//ホバー、クリックの1つの枠組み
	var cai = $('.comp_area-item');
	cai.each(
		function(){
			//クリック対象
			var clickElm = $(this).find('#link');
			//ホバー対象
			var hoverElm;

			hoverElm = $(this);

			hoverElm
				//クリック処理
				.click(
					function (){
						clickElm.click();
						if( clickElm )
						{

							window.location.href = clickElm.attr('href');
						}
						return false;
					}
				)
		}
	);
}

/**
 * 資料請求するJavaScript
 * BJBchenys
 */
// 2009/11/11 yingwy Start
 //var submitted = false;
function shiryoSanPost(kckvalue){
	//if(submitted){
	//	return false;
	//}else{
		submitted = true;
		var form = $("form[id='postAction']");
	    if(kckvalue == 0){
	        var kskbn = $('#form2 :input[name=kskbn]').val();
	        var checkboxs =  $(".data_table").find("input:checkbox[checked]");
	        var len = checkboxs.size();
	        if(len == 0)
	        {alert(msgArr.shiryouMessage0); return false;}
	        else if(len > 30)
	        {alert(msgArr.shiryouMessage1); return false;}
	        else {
		        $.each(checkboxs, function(i){
	                    var kckvalue = kskbn + "_" + $(this).val();
	                    form.append("<input type='hidden' name='kck' value='" + kckvalue + "'/>");
		        });
	        }
	    }else{
	        form.append("<input type='hidden' name='kck' value='" + kckvalue + "'/>");
	    }
	    form.submit();
	//}
}
// 2009/11/11 yingwy End
//-----------

function dispSearchImg() {
 $('#searchImg').each(function() {

  $(this).css('position', 'absolute');
  $(this).css('z-index', '10000');
  $(this).css('overflow', "hidden");
  $(this).css('width', '300px');
  $(this).css('height', '250px');
  $(this).css('filter', 'Alpha(opacity=30)');
  $(this).css('background-color', '#ffffff');
  $(this).css('border', '2px solid black');
  $(this).html("<table><tr><td style='width:300px; height:250px; text-align:center; vertical-align:middle;'><img src='" + SearchImgLoader.src + "' style='margin:10px'><br><span style='font-size:150%; font-weight:bold; color:#228b22;'>検索中</span></td></tr></table>");

  $("#TB_ajaxContent").each(function() {
   $("#TB_ajaxContent").children().hide();
   $("#TB_window").children("p.js_message").hide();
  });

  tb_show(null, "TB_inline?height=260&amp;width=310&inlineId=searchImg&modal=true", false);

  $("#TB_overlay").unbind('click', tb_remove);
  $("#TB_closeWindowButton").unbind('click', tb_remove);
 });
}

/**
 * この条件のRSS
 * BJB:GuoYF
 */
function windowOpen(uri) {
	var allUrl = window.location.href;
	allUrl = allUrl + "&rssFlg=1";
	var index1 = allUrl.indexOf("?");
	var param = allUrl.substring(index1);
	allUrl = uri + param;
	var searchDisp = $("input:hidden[name=searchDisp]").attr("value");
	allUrl = allUrl + "&searchDisp=" + encodeURIComponent(searchDisp);
	SubWindow=window.open(allUrl,"","width=780,top=0,left=0,toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1");
	SubWindow.focus();
}

function popUpMapHttps(formId, popWidth, popHeight)
{
    var url = $(formId).attr('action');
	var LeftPosition = (screen.width) ? (screen.width-popWidth)/2 : 0;
	var TopPosition = (screen.height) ? (screen.height-popHeight)/2 : 0;
	var subWindow=window.open('about:blank',"isizejjmap","width="+popWidth+",height="+popHeight
							+",toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,top=" + TopPosition + ",left=" + LeftPosition);

    subWindow.document.write('<html><body><form method="POST" action="' + url + '">'+$(formId).html()+'</form></body></html>');
    subWindow.document.forms[0].submit();
    //subWindow.focus();
}