function openWindow(_url,_name,_features){
	var w = window.open(_url,_name,_features);
	if(w){
		w.focus();
	}
}

function disp(url){
	if(!window.opener || window.opener.closed){
		window.alert('メインウィンドウがありません');
	}else{
		window.opener.location.href = url;
	}
}

function changeDocument(xOn){
	if(document.all){
		var obj = document.all(xOn);
	}else if(document.getElementById){
		var obj = document.getElementById(xOn);
	}
	if(obj.style.display == 'block'){
		obj.style.display = 'none';
	}else{
		obj.style.display = 'block';
	}
}

function changeDateOption(o,yy,mm,dd){
	f = o.form;
	nowDate = new Date(f[yy].value, f[mm].value, 1);
	nowDate.setTime(nowDate.getTime() - (24 * 3600 * 1000));
	lastDay = nowDate.getDate();
	f[dd].options.length = lastDay;
	for(i = 28; i < lastDay ; i++){
		if(! f[dd].options[i].value){
			f[dd].options[i].text = i+1;
			f[dd].options[i].value = i+1;
		}
	}
}

function printer(text){
	text = document;
	print(text);
}