function WindowOpen(url){
	var name;
	var re = new RegExp("/{0,1}(cancel|return|regist|edit|delete)(.php|_ratio.php)");
	if(re.test(url)){
		name = 'stateFul';
	}else{
		name = '';
	}
	var openWindow = window.open(url,name,'width=850,height=800,resizable=yes,scrollbars=yes');
	openWindow.focus();
	return false;
// 	window.open(url,'admin','width=850,height=800,resizable=yes,scrollbars=yes');
}
function WindowClose(){
	window.close();
}
function Reload(){
	window.opener.location.reload();
}
function SwitchCheckAll(){
	if(document.form.check_flag == true){
		document.form.check_flag = false;
	}else{
		document.form.check_flag = true;
	}
	for(i=0;document.form.length > i;i++){
		if(document.form.elements[i].name.match(/^checkbox\[.*\]$/)){
			document.form.elements[i].checked = document.form.check_flag;
		}
	}
}
function PrintOut() {
   /* print() が使えるブラウザかどうかを判断 */
	if(navigator.userAgent.match(/msie (\d)/i)){
		v = (eval(RegExp.$1) >= 5) ? 1 : 0;
	}else if(self.innerWidth){
		v = (eval(navigator.appVersion.charAt(0)) >= 4) ? 1 : 0;
	}else{
		v = 0;
	}
	if(v){
		self.print();
	}else{
		alert("お使いのブラウザではこの機能は利用できません");
	}
}
function popJumpSW(selOBJ){
	n =  selOBJ.selectedIndex;
	window.open(selOBJ.options[n].value,'','width=800,height=800,resizable=yes,scrollbars=yes');
}

function ListReload(){
	window.opener.document.form.submit();
}

function onSubmit(event){
	form.default_event.value = event;
	form.submit();
	return false;
}
