    function clearText() {
			var idx = $("petKindName").options.length;
			var cnt = 0;
			var pt = 0;
			var fg = true;

			while(fg) {
				if (cnt > idx - 1) {
					break;
				}
				if ($("petKindName").options[cnt - pt].selected) {
					$("petKindName").options[cnt - pt] = null;
					pt++;
				}
				cnt++;
			}
    }

    function selectPet(text, value) {
    	if (value == '' || value == 0) {
    		alert("ペットを選択してください");
    		return false;
    	}

			var idx = $("petKindName").options.length;
			$("petKindName").options[idx] = new Option(text, value);

    }
    
    function rating(ahId) {
    	var popup = window.open('/Rating.html?ahId=' + ahId,'rating','scrollbars=1,width=800,height=600,menubar=0,resizable=1,directories=0,toolbar=0,status=0,location=0');
    	popup.focus();
    }

    function moveToRegist(ratingId) {
			var win = window.opener;
			if (!win) {
				win = parent.parent;
			}
			window.opener = win;
			if (win != undefined) {
				win.location.href = "/RegistMember.html?from=" + ratingId;
			} else {
				window.open("/RegistMember.html?from=" + ratingId);
			}
			window.close();
    }

    function search(cty) {
    	if (cty == '' || cty == 0 || cty == null) {
    		alert("都道府県・エリアを選択してください。");
    		return false;
    	}
    }

    function searchAh(cty) {
    	if (cty == '' || cty == 0 || cty == null) {
    		alert("都道府県・エリアを選択してください。");
    		return false;
    	}
    	document.fromArea.submit();
    }

    function searchAhName(name) {
    	if (name == "" || name == null) {
    		alert("動物病院名を入力してください。");
    		return false;
    	}
    }
