var timer = 0
var ws;
function zoomPicture(path){
	timer++;
	clearInterval(ws);
	//イメージサイズ取得
	var img = new Image();
	img.src = path;
	if ((img.width==null)||(img.width>=1)){
		if ((img.height==null)||(img.height>=1)){
			var ww = img.width;
			var wh = img.height;
			zoomWindow(path,ww,wh);
		}else{
			if(timer <= 50){
				ws = setInterval('zoomPicture("'+path+'")',10);
			}else{
				var ww = 400;
				var wh = 400;
				zoomWindow(path,img);
			}
		}
	}else{
		if(timer <= 50){
			ws = setInterval('zoomPicture("'+path+'")',10);
		}else{
			var ww = 400;
			var wh = 400;
			zoomWindow(path,ww,wh);
		}
	}
}
function zoomWindow(path,ww,wh){
	//ウィンドウ内容の構築
	var titleName = document.getElementsByTagName('h1').item(0).innerHTML;
	var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">\n'+
			   '<html><head><meta http-equiv="Content-Type" content="text/html; charset=shift_jis">\n'+
			   '<title>JALUX : '+titleName+' - 拡大画像</title>\n'+
			   '<style type="text/css">body {background-color:#FFFFFF;margin-left:0px; margin-top:0px; margin-right:0px; margin-bottom: 0px;} img{border:none}</style></head><body>\n'+
			   '<a href="javascript:window.close();" alt="閉じる"><img src="'+path+'"></a>\n'+
			   '</body></html>';
	var win = window.open('','subWin',"screeX=15,screenY=15,left=15,top=15,directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width="+ww+",height="+wh);
	win.document.open();
	win.document.write(html);
	win.focus();
}