function selectUrl(sel){
    if(sel.options[sel.selectedIndex].value){
        location.href = sel.options[sel.selectedIndex].value;
    }
}

var data ="<%now_year><%now_month>";
var year = data.substring(0,4);
var month = data.substring(4,6);
var nodes = document.getElementById('monthlylist').getElementsByTagName("option");
for (var i = 0; i < nodes.length; i++) {
    var selectYear = nodes[i].innerHTML.substring(0,4);
    var selectMonth = nodes[i].innerHTML.substring(5,7);
    if(year == selectYear && month == selectMonth){
        nodes[i].selected = true;
    }
}

function serchResult(){
    window.open("about:blank","sonoko","width=700,height=700,menubar=no,toolbar=no,scrollbars=yes");
    document.inform.action = "http://www.sonoko.co.jp/blog/mt-search.cgi";
    document.inform.target = "sonoko";
    document.inform.method = "get";
    document.inform.submit();
}

function disp(url){
	if(!window.opener || window.opener.closed){ // メインウィンドウの存在をチェック
		window.alert('メインウィンドウがありません'); // 存在しない場合は警告ダイアログを表示
	}
	else{
		window.opener.location.href = url; // 存在する場合はページを切りかえる
		window.close();
	}
}

