var changeCheckBox = false;

/*
 * 初期化
 */
function init(){
	// テキストBox初期化
	document.f2.poi_name.value = "";
	document.f3.poi_name.value = "";
	// 駅・バス停初期化
	document.getElementsByName("sgrp")[0].checked=true;
	// プルダウン初期化
	var geneopt = document.getElementById("select0").options;
	for( i=0; i<geneopt.length; i++ ) {
		if (chksl) {
			if( geneopt[i].value == chksl ) geneopt[i].selected=true;
		} else {
			if( geneopt[i].value == sl ) geneopt[i].selected=true;
		}
	}
	// マウスホイールイベント付与
	var kenS = document.getElementById("ken");
	var cityS = document.getElementById("city");
	var stationS = document.getElementById("station");

	if( mapionFuncs.net.browser.FireFox ) {
		kenS.addEventListener("DOMMouseScroll", wheelFocus, false);
		cityS.addEventListener("DOMMouseScroll", wheelFocus, false);
		stationS.addEventListener("DOMMouseScroll", wheelFocus, false);
	} else if( mapionFuncs.net.browser.ie ) {
		kenS.attachEvent("onmousewheel", wheelFocus);
		cityS.attachEvent("onmousewheel", wheelFocus);
		stationS.attachEvent("onmousewheel", wheelFocus);
	} else if( mapionFuncs.net.browser.safari ) {
		kenS.onmousewheel=wheelFocus;
		cityS.onmousewheel=wheelFocus;
		stationS.onmousewheel=wheelFocus;
	}

};
function free(){return false;};
/*
 * PoiCount取得
 */
function pcount(grpby, code){
	if( code == "00" ) return;

	if( grpby == "ken" ) {
		if( mapionFuncs.net.browser.safari || mapionFuncs.net.browser.ie ) document.getElementById("city").innerHTML = "<option value=\"'00'\">&nbsp;</option>";
	}

	// キャンペーンノーチャックの場合注意書き
	var can = document.getElementById("select0").value;
	if( can == "03" ) {
		var sch = getChkValue( document.search );
		if( sch == "" ) {
			deleteWarn();
			getPosWarn(0);
			return;
		}
	}

	// 引継ぎを取得する
	if( can != "03" ) hikitugi = getChkValue( document.search );
	changeCheckBox = true;

	if( !grpby && !code ){
		document.getElementById("ken").innerHTML = "";
		document.getElementById("city").innerHTML = "";
		document.getElementById("station").innerHTML = "";
		changeDisable(document.search, true);
	}
	if( !pc ) pc=new PoiCount();
	gurl=pc.createParamForForm(document.search);
	if( gurl == "" ) {
		document.getElementById("ken").innerHTML = "";
		document.getElementById("city").innerHTML = "";
		document.getElementById("station").innerHTML = "";
		// checkboxのdisabledを外す
		changeDisable(document.search, false);
		deleteWarn();
		getPosWarn(0);
		return;
	}
	 pc.setGeneralParam(decodeURI(gurl));
	if( grpby=="ken" ) {
		document.getElementById("tmpken").value=code;
		pc.getCountForCity(code);
	} else {
		pc.getCountForKen(code);
	}
	deleteWarn();
};

/*
 * General取得
 */
function getGeneral(kind){
	// 色変更
	chtab(kind);
	if( !gr )gr=new General();
	gr.setGeneralParam("&tno=1&srt=search_cond_group,search_cond_order&pp=print_start_date,print_end_date&search_cond_type="+kind);
	gr.getGeneralData();
	//deleteWarn();
};

// 検索じょうけんbackgroundcolor変更
function chtab(val){
	//dobj = document.getElementById("result_search");
	//dobj.style.visibility="hidden";
	var pnt = document.getElementById("changeTab");
	pnt.parentNode.id="unitselectChed0"+(parseInt(val)-1);
};

/*
 * POI属性、最寄駅を取得
 */
function getNearPoi(code){
	if( mapionFuncs.net.browser.safari || mapionFuncs.net.browser.ie ) {
		document.getElementById("station").innerHTML = "<option value=\"'00'\">&nbsp;</option>";
	}
	if( !pa ) pa=new PoiAttr("station01", "getListNearPoi");
	var nsch;
	switch(document.getElementById("select0").value) {
		case "01" : nsch = "t";break;
		case "02" : nsch = "m";break;
		case "03" : nsch = "c";break;
		default: nsch = "t";break;
	}
	if( !gurl ) gurl=pa.createParamForForm(document.search);
	pa.setGeneralParam(decodeURI(gurl)+"&citycode="+code+"&pm=50&nsearch="+nsch);
	pa.getAttrDataWithNgrp( grp, (dt !=""?dt:"1500") );
	document.getElementById("tmpcity").value=code;
};

/*
 * 注意書きを出す位置を取得してアラート表示
 */
function getPosWarn(flg){
	var dd = document.getElementById("s_r");
	var eps = getElemPosition(dd);
	warnT=(eps.y+17)+"px";
	warnL=(eps.x) + "px";
	outWarn(warnT, warnL, flg);
};

/*
 * 施設一覧ページへ
 * @param citycode
 */
function goList(){
	// 検索条件が何も設定されていなかった場合の処理
	var sch = getChkValue( document.search );
	if( sch == "" ) {
		deleteWarn();
		getPosWarn(0);
		return;
	}

	// 市区町村まで選択していないと何もしない
	if( document.getElementById("city").selectedIndex < 0 ) {
		deleteWarn();
		getPosWarn(3);
		return;
	}

	var citycode = document.getElementById("city").value;
	// 駅選択までいっているか
	if( document.getElementById("station").selectedIndex >= 0 ) {

		st = document.getElementById("station");
		obj = st.options[st.selectedIndex];
		//ph.put("pm", obj.value);
		ph.put("nl", obj.getAttribute("nl"));
		ph.put("el", obj.getAttribute("el"));
		ph.put("ecode", obj.getAttribute("ecode"));
	}
	// 不要パラメータ削除
	ph.remove("xsl");
	ph.remove("srt");
	ph.remove("chkbr");
	ph.remove("chksl");
	// 要パラメータセット
	ph.put('xsl','poiTop');
	ph.put("citycode", citycode);
	// 一覧ボタンからきたフラグ
	//ph.put("listflg", 1);
	// ブランド、selectセット
	if( !sl ) ph.put("select", sl);
	//if( !br ) ph.put("br", br);
	// 現在チェック中の汎用パラメータセット
	ph.put("chksl", document.getElementById("select0").value);
	var chkval = getChkValue(document.search);
	if( chkval ) ph.put("chkbr", chkval);

	// 絞り込み条件別logViewの設定
	setLogView();

	//location.href = top + ph;
	location.href = "PoiAttr?" + ph;
};

/*
 * 地図へボタンが押された時
 */

function goMap() {
	// 検索条件が何も設定されていなかった場合の処理
	var sch = getChkValue( document.search );
	if( sch == "" ) {
		deleteWarn();
		getPosWarn(0);
		return;
	}
	// 市区町村まで選択されていないと飛ばない
	if( document.getElementById("city").selectedIndex < 0 ) {
		deleteWarn();
		getPosWarn(3);
		return;
	}
	var obj;
	// 駅まで選択していたら駅を中心とした地図へ飛ぶ
	if( document.getElementById("station").selectedIndex >= 0 ) {
		st = document.getElementById("station");
		obj = st.options[st.selectedIndex];
	} else {
		obj = document.getElementById("city").options[document.getElementById("city").selectedIndex];
	}
	chkval = getChkValue(document.search);
	_url = map_uc+"grp="+grp+"&nl="+obj.getAttribute("nl")+"&el="+obj.getAttribute("el")+"&scl=70000"+"&citycode="+obj.value;
	_url += "&select="+sl+"&chksl="+(document.getElementById("select0").value)+"&chkbr="+chkval;

	// history.backした時に初期化するため削除
	document.getElementById("tmpken").value="";
	document.getElementById("tmpcity").value="";

	// 絞り込み条件別logViewの設定
	setLogView();

	window.location = _url;
};

/**
 * LogView設定Imgの埋め込み
 */
function setLogView(){
	var sch = getChkValue( document.search );
	var selectIdx = document.getElementById("select0").value
	var schArray = sch.split(",");
	var logImg;
	var pass01 = "/analytics/top/flow/t/";
	var pass02 = "/analytics/top/flow/m/";
	var pass03 = "/analytics/top/flow/ca/ca1";
	var ranNum = Math.floor(Math.random()*1000000000);
	var otherQ = "?grp=bausch&mode=track&ispv=false&random="+ranNum;

	for(i=0; i<schArray.length; i++){
		logImg = "";
		logImg = document.createElement("img");
		if(selectIdx=="01"){
			logImg.src = pass01+schArray[i]+otherQ;
		}else if(selectIdx=="02"){
			logImg.src = pass02+schArray[i]+otherQ;
		}else if(selectIdx="03"){
			logImg.src = pass03+otherQ;
		}
		document.getElementById("logview").appendChild(logImg);
	}
}

/**
 * POI属性検索(POI用)
 */
function searchPOI( poi_name ) {
	var free1 = encodeURI( poi_name );

	ph.put('xsl','searchTop');
	location.href = map + ph + "&poi_name=" + free1;
	return false;
};

/*
 * 都道府県、市区町村リストを作成する
 */
function getList( obj ){
	var select = document.getElementById(obj.mbml.Parameter.grpby);
	document.getElementById("station").innerHTML = "";
	select.innerHTML = "";
	if( obj.mbml.Parameter.grpby == "ken" ) {
		document.getElementById("city").innerHTML = "";
	}

	var opt = '';
	var tmpcode = "";
	// IFAMEのcodeを取得
	try{
		if( obj.mbml.Parameter.grpby == "ken" ) {
			tmpcode = document.getElementById("tmpken").value;
			//document.getElementById("tmpcity").value="";
		} else if( obj.mbml.Parameter.grpby == "city" ) {
			tmpcode = document.getElementById("tmpcity").value;
			document.getElementById("tmpcity").value="";
			document.getElementById("tmpsta").value="";
		}
	} catch(e) {
		// TOPページの場合なのでエラー出て何もしない
	}
	// リストを配列で取得
	var countList = obj.mbml.CountList.Count instanceof Array ? obj.mbml.CountList.Count : [obj.mbml.CountList.Count];
	if( obj.mbml.Parameter.grpby == "ken" ) {
		var op = document.createElement("option");
		op.appendChild( document.createTextNode("都道府県を選択してください") );
		op.value="00";
		select.appendChild( op );
	}
	for( var j=0; j<countList.length; j++ ) {
		// その他を省く
		if( countList[j].count_id == "00" ) continue;
		var opt = document.createElement('option');
		var tex = document.createTextNode( countList[j].count_name );
		opt.value = countList[j].count_id;
		opt.setAttribute("nl", countList[j].count_ido);
		opt.setAttribute("el", countList[j].count_keido);
		opt.id = obj.mbml.Parameter.grpby +'code';
		if( tmpcode == countList[j].count_id ) opt.selected = true;
		if( countList.length == 1 ) {
			opt.selected=true;
			// 20080715追加
			tmpcode = countList[j].count_id;
		}

		opt.appendChild(tex);
		select.appendChild(opt);
	}

	// selectedされたら次も検索
	if( select.selectedIndex >= 0 ) {
		if( obj.mbml.Parameter.grpby == "ken" ) pcount(obj.mbml.Parameter.grpby, document.getElementById("tmpken").value );
		else getNearPoi( tmpcode );
	}
	changeDisable(document.search, false);
};

// 項目
var colum = [ "近視用／遠視用", "乱視用", "遠近両用" ];

// 新商品追加で新デザイン用ファンクション
// キャンペーンは今まで通り同じデザインで出力
function gene( obj ){

	// キャンペーンの場合はいままで通りにレイアウトする
	if( obj.mbml.Parameter.search_cond_type != '03' ){
		var gobj = obj.mbml.GeneralList.General instanceof Array ? obj.mbml.GeneralList.General : [obj.mbml.GeneralList.General];
		dobj = document.getElementById("result_search");

		var col_type = -1;
		var idd;
		var checked_str = " checked=\"checked\"";

		//chkbr内の3桁以上の値を削除
		var chkbrlen = chkbr.split(",").length;

		if( chkbr.split(",")[0] == "" ) chkbr = "99";
		for (chkbrCnt=0; chkbrCnt < chkbrlen; chkbrCnt++){
			if(chkbr.match(/\d{3,}/)){
				delstr=chkbr.match(/\d{3,}/);
				chkbr=chkbr.replace(RegExp(delstr), '');
			}
		}

		// typeから検索項目を決める
		switch(obj.mbml.Parameter.search_cond_type){
			case "01" : idd="t";break;
			case "02" : idd="m";break;
			case "03" : idd="c";break;
		}

		var _html = "";

		// 商品を整列させる
		for( var i=0; i<gobj.length; i++ ){
			var checked_flg = false;
//			if( chkbr == "99" && br == '01' ) checked_flg = true;
//			if( chkbr == "99" && br == '02' && gobj[i].premium_flag == '1' ) checked_flg = true;
//			if( chkbr == "99" && br == '03' && gobj[i].premium_flag == '0' ) checked_flg = true;
			if( chkbr.indexOf( gobj[i].search_cond_no, 0 ) > -1 ) checked_flg = true;

			if( col_type != parseInt(gobj[i].search_cond_group)-1 ){
				col_type = parseInt(gobj[i].search_cond_group)-1;

				if( col_type == 0 ) _html += "<dl class=\"result_search_first\">";
				else if( col_type == 2 ) _html += "<dl class=\"result_search_last\">";
				else _html += "<dl>";

				_html += "<dt>" + colum[col_type] + "</dt>";
				_html += "<dd><ul>";
			}


			_html += "<li><span class=\"product_check\">";
			_html += "<input type=\"checkbox\" id=\"" + idd + "\" name=\"" + idd + "\" value=\"" + gobj[i].search_cond_no + "\" onclick=\"pcount();\"" + (checked_flg?checked_str:"") + " /></span>";
			_html += "<label for=\"\">";
			_html += gobj[i].search_cond_name1;

			//備考がある場合は<em>タグを入れる
			var name2arr = gobj[i].search_cond_name2.split('※');
			var name2 = name2arr.length > 1 ? name2arr[0]+"<em>※"+name2arr[1]+"</em>" : name2arr[0];
			_html += "<span>" + name2 + "</span>";
			_html += "</label>";
			_html += "</li>";


			if( gobj[i+1] == null || col_type != parseInt(gobj[i+1].search_cond_group)-1 ) _html += "</ul></dd></dl>";

		}

		dobj.innerHTML = _html;

		// GeneralのHTML作成した後にカウントを出力
		pcount();

	} else {
		// キャンペーンの場合はいままで通りにレイアウトする
		gene_camp(obj);
	}
}

/*
 * 絞込み検索HTML作成
 * @param obj
 */
 function gene_camp( obj ){
	var gobj = obj.mbml.GeneralList.General instanceof Array ? obj.mbml.GeneralList.General : [obj.mbml.GeneralList.General];
	dobj = document.getElementById("result_search");
	var idd;
	var tr1;
	var tr2=0;
	var group;
	var _html="<table class=\"serTable\"><tr>";
	var lastg;

	// キャンペーン対応
	// add 20091015
	if( obj.mbml.Parameter.search_cond_type == "03"){
		if( !obj.mbml.GeneralList.General ){
			_html +="<td><table><tr><th class=\"text12fix\">　　</th><td class=\"text12fix\">現在実施中のキャンペーンはありません。</td></tr></table></td>";
			dobj.innerHTML=_html;
			deleteWarn();
			getPosWarn(0);
			return;
		}
	}

	// typeから検索項目を決める
	switch(obj.mbml.Parameter.search_cond_type){
		case "01" : idd="t";break;
		case "02" : idd="m";break;
		case "03" : idd="c";break;
	}

	//chkbr内の3桁以上の値を削除
	var chkbrlen = chkbr.split(",").length;
	for (chkbrCnt=0; chkbrCnt < chkbrlen; chkbrCnt++){
		if(chkbr.match(/\d{3,}/)){
			delstr=chkbr.match(/\d{3,}/);
			chkbr=chkbr.replace(RegExp(delstr), '');
		}
	}

	for(i=0; i<gobj.length; i++){
		if( !group ) {
			if( i != 0 && gobj[i].search_cond_group % 2 == 0 ) {
				_html +="<td><table width=\"20px\">";
				// ループ回数をヘッダ画像分増やすために=にした 20090324
				for( t=0; t<=tr2; t++) _html +="<tr><td class=\"bord\">&nbsp;</td></tr>";
				_html +="</table></td>";
			}
			if( gobj[i].search_cond_group % 2 != 0 && i != 0 )  _html += "<tr>";
			_html += "<td>";
			_html += "<table>";

			// メダリストプレミアヘッダ画像追加 20090324
			if(i==0 && idd != "c"){
				_html +="<tr>";
				_html +="<td colspan=\"2\" style=\"padding:0 0 8px 17px;\"><img src=\"/bausch/images/MDPremier_Logo_H.gif\" alt=\"MedalistPremier\" width=\"80\" height=\"26\" /></td>"
				_html +="</tr>";
			}

			tr2=0;
		}
		group=gobj[i].search_cond_group;

		// trのタイミングをgroup毎に変更する
		if( group == "1" && idd != "c" ) tr1=1;
		else if( group == "2" && idd != "c" ) tr1=3;
		else tr1=4;

		if( tr2 % tr1 == 0 ) _html +="<tr>";

		// メダリストヘッダ画像追加 20090324
		if(tr2==0&&tr1==3){
			_html +="<td colspan=\""+tr1+"\" style=\"padding:4px 0 11px 15px;\"><img src=\"/bausch/images/MOD_Logo_H.gif\" alt=\"MedalistPremier\" width=\"76\" height=\"19\" /></td>"
			_html +="</tr><tr>";
		}

		_html +="<th style=\"padding-left:20px;\">";

		_html +="<input id=\"" + idd + "\" name=\"" + idd + "\" type=\"checkbox\" value=\"" + gobj[i].search_cond_no + "\" onclick=\"pcount();\" ";

		if ( gobj[i].search_cond_type != "3" || chkbr ) {
			if( !changeCheckBox ) {
				if( chkbr != "" ) {
					if( chkbr.indexOf( gobj[i].search_cond_no, 0 ) > -1 ) _html += "checked=\"checked\"";
				} else if( hikitugi ) {
					if( hikitugi.indexOf( gobj[i].search_cond_no, 0 ) > -1 ) _html += "checked=\"checked\"";
//				} else {
//					if( Number(brandcode[br]) == group || br == "01" ) _html += "checked=\"checked\"";
				}
			} else {
/*				if( br != "00" ) {
					if( hikitugi ) {
						if( hikitugi.indexOf( gobj[i].search_cond_no, 0 ) > -1 ) _html += "checked=\"checked\"";
					} else {
						if( Number(brandcode[br]) == group || br == "01" ) _html += "checked=\"checked\"";
					}
				} else {
*/					if ( hikitugi && gobj[i].search_cond_type != "3" ) {
						if( hikitugi.indexOf( gobj[i].search_cond_no, 0 ) > -1 ) _html += "checked=\"checked\"";
					}
//				}
			}
		}
		if( gobj[i].search_cond_type == "3" ) _html += "checked=\"checked\"";
		_html +="/>";

		_html +="</th>";
		_html +="<td class=\"text12fix";
		if( gobj[i].search_cond_type == "1" && group == "1" && idd != "m") _html += "";
		else if( group == "2" ) _html += " seihin";
		else  _html += "";

		_html +="\"><strong>" + gobj[i].search_cond_name1 + (gobj[i].search_cond_name2?"</strong><br/>"+gobj[i].search_cond_name2:"") + "</td>";

		tr2++;

		if( tr2 % tr1 == 0 ) _html +="</tr>";
		ii=i+1 == gobj.length?i:i+1;
		if( group && group != gobj[ii].search_cond_group ) {
			_html += "</table></td>";
			group="";
		}
		lastg=group;
	};

	_html += "</table></table>"
	dobj.innerHTML = _html;

	// キャンペーンの場合はいきなり文言を出力する
	if( obj.mbml.Parameter.search_cond_type == "03" ) {
		var sch = getChkValue( document.search );
		if( sch == "" ) {
			getPosWarn(0);
			return;
		}
	}
	// GeneralのHTML作成した後にカウントを出力
	pcount();
};


/*
 * 駅・駅周辺施設数をselectを作成
 */
function getListNearPoi( obj ){
	var select = document.getElementById("station");
	select.innerHTML = '';
	var opt = '';

	if( !obj.mbml.PoiList.Poi ) {
		o=document.createElement("option");
		t=document.createTextNode("該当駅0件");
		o.appendChild(t);
		select.appendChild(o);
		select.disabled=true;
		return;
	}
	var cnt = obj.mbml.PoiList.Poi instanceof Array ? obj.mbml.PoiList.Poi : [obj.mbml.PoiList.Poi];
	var zeroFlg=false;
	for( var j=0; j<cnt.length; j++ ) {
		var list = cnt[j];
		if( !list.nearcount ) return;
		if( list.nearcount <= 0 ) continue;
		zeroFlg=true;
		var opt = document.createElement('option');
		var tex = document.createTextNode( list.st_name );
		opt.setAttribute("nl", list.latitude);
		opt.setAttribute("el", list.longitude);
		opt.setAttribute("ecode", list.id);
		opt.setAttribute("id", "stationcode");
		opt.value=list.citycode;
		opt.appendChild(tex);
		select.appendChild(opt);
	}
	select.disabled=false;
	// 全駅の最寄に施設がなければ0件表示
	if( !zeroFlg ) {
		o=document.createElement("option");
		t=document.createTextNode("該当駅0件");
		o.appendChild(t);
		select.appendChild(o);
		select.disabled=true;
		return;
	}
};

var __fm;
/*
 * 駅・バス停検索が行われた場合
 */
function subMit(_f){
	// 検索ワードが入力されていないと検索にいかない
	if( !_f.poi_name.value ) {
		getPosWarn( 2 );
		return false;
	}
	deleteWarn();
	__fm=_f;
	sgrp="";
	els = _f.elements;
	for( i=0; i<els.length; i++ ) {
		if( els[i].name == "sgrp" ) {
			if( els[i].checked ) {
				sgrp=els[i].value;
				break;
			}
		}
	}
	if( !pa2 ) pa2=new PoiAttr(sgrp, "searchHit");
	if( pa2.getGeneralParam ) pa2.getGeneralParam("");
	genel="";
	if( sgrp=="lm01" ) {
		genel="poi_name=%" + _f.poi_name.value + "%&genre1_code=JUN241";
	} else if( sgrp == "rosen" ) {
		genel = "genre1_name=%"+_f.poi_name.value+"%";
		sgrp = "station01";
	} else {
		genel = "st_name=%"+_f.poi_name.value+"%";
	}
	pa2.setGeneralParam(genel);
	pa2.ph.replace("sgrp",sgrp);
	pa2.getPoiData();

	return false;
};

/*
 * ランドマーク検索が行われた場合
 */
function subMit2(_f){
	// 検索ワードが入力されていないと検索にいかない
	if( !_f.poi_name.value ) {
		getPosWarn(2);
		return false;
	}
	deleteWarn();
	__fm=_f;
	els = _f.elements;
	if( !pa3 ) pa3=new PoiAttr("lm01", "searchHit");
	if( pa3.getGeneralParam ) pa3.getGeneralParam("");
	pa3.setGeneralParam("poi_name=%"+_f.poi_name.value+"%");
	pa3.getPoiData();

	return false;
};

function searchHit(obj){
	if( obj.mbml.Property.hit > 0 ) {
		if( obj.mbml.Parameter.sgrp == "lm01" && !obj.mbml.Parameter.genre1_code ) {
			document.getElementById("chksl2").value = document.getElementById("select0").value;
			document.getElementById("chkbr2").value = getChkValue( document.search );
		} else {
			document.getElementById("chksl").value = document.getElementById("select0").value;
			document.getElementById("chkbr").value = getChkValue( document.search );
		}
		__fm.submit();
	} else {
		getPosWarn( 1 );
		return false;
	}
};

// プルダウンのマウスオーバーイベントハンドラ
function overFocus( obj ){
	if( obj.selectedIndex > 0 ) {
		obj.focus();
	} else {
		document.getElementById("kenhidd").focus();
	}
};

// プルダウンのマウスホイールイベントハンドラ
function wheelFocus(ev){
	e=(ev)?ev:((window.event)?event:null);
	var id;
	if( mapionFuncs.net.browser.IE ) id = e.srcElement.getAttribute("id").replace("code","");
	else id = e.target.id.replace("code","");
	var activeE = document.getElementById(id);
	if( activeE ) {
		if( activeE.selectedIndex > -1 ) {
			return true;
		} else {
			// 選択されていない場合はホイールさせない
			if( mapionFuncs.net.browser.FireFox ) e.preventDefault();
			else e.returnValue = false;
		}
	} else {
		if( mapionFuncs.net.browser.FireFox ) e.preventDefault();
		else e.returnValue = false;
	}
};

// プルダウンのマウスアウトイベントハンドラ
function outFocus(obj){
	if( mapionFuncs.net.browser.ie ) document.getElementById("kenhidd").focus();
	else obj.blur();
};


