//ロールオーバーボタン用
function swapImage() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<swapImage.arguments.length; i+=2) {
			document[swapImage.arguments[i]].src = swapImage.arguments[i+1];
		}
	}
}

//検索チェック用
function searchKeyCheck() {
  if(document.searchTable.query.value.length == 0) {
    alert("検索したいキーワードを入力して下さい。");
    return false;
  } else {
    return true;
  }
}
function popup(url, name, width, height){
	var winParam = "newwin = window.open(url,name,'screenX=10,left=10,screenY=10,top=10,width=";
	if((width == 0) || (width > (screen.width-30))){
		winParam = winParam + (screen.width - 30)+ ",height=";
	}else{
		winParam = winParam + width + ",height=";
	}
	if((height == 0) || (height > (screen.height - 90))){
		winParam = winParam + (screen.height - 90);
	}else{
		winParam = winParam + height;
	}
		winParam = winParam +",location=0,scrollbars=1,directories=0,menubar=0,toolbar=0,resizable=1,titlebar=0,alwaysRaised=0,status=1,fullscreen=0');";	
	eval(winParam);
	if (navigator.appName.indexOf('Netscape') > -1){
		setTimeout('newwin.focus()',40);
	}else{
		newwin.focus();
	}
}
//コピーライトの年号
function MakeFoot(){
	var y=""; //年をいれるはこ
	today = new Date();
	y = today.getFullYear();
	document.write("<a href=\"http://www.kepco.co.jp/siteinfo/index.html\" onfocus=\"this.blur(); return true\">");
	document.write("<img src=\"http://www.kepco.co.jp/Common/images/foot_copyright.gif\" alt=\"Copyright 1995-"+ y +" THE KANSAI ELECTRIC POWER CO., INC. All Rights Reserved.\" height=\"20\" width=\"360\" border=\"0\" />");
	document.write("</a>");
}


function winopen(url, name, wid, hei,x,y){
	/*if(wid > (screen.width-30)){
		wid=screen.width - 30;
	}
	if(hei > (screen.height - 90)){
		hei= screen.height - 90;
	}*/
	//var w = window.open(url,'','width='+wid+',height='+hei+',left='+x+',top='+y+',screenX='+x+',screenY='+y+',location=0,scrollbars=1,directories=0,menubar=0,toolbar=0,resizable=1,status=1');
	var w = window.open('','','left='+x+',top='+y+',screenX='+x+',screenY='+y+',location=0,scrollbars=1,directories=0,menubar=0,toolbar=0,resizable=1,status=1');
	w.resizeTo(wid,hei);
	w.location.href=url;
}

