<!--

var newWin;
var newPic;
var imgTimerID;
var checkCount, checkCountMax = 10;

var wintitle;

function image_open(url,title){

	newPic = new Image();
	newPic.src = url;
	wintitle=title;
	window.status = "画像読み込み中";
	
	
	checkCount = 0;
	clearInterval(imgTimerID);
	
	imgTimerID = setInterval("loadImage(newPic.src)", 200);
}

function loadImage(url) {
	checkCount++;
	if (newPic.complete || (checkCount > checkCountMax)) {
		if (newPic.complete) {
			window.status = "画像読み込み完了";
		} else {
			window.status = "画像読み込み失敗";
			alert("画像が読み込めませんでした。");
		}
		clearInterval(imgTimerID);
		showPage(url);
	}

}


function showPage(url) {

	
	var w = newPic.width + 20;
	var h = newPic.height + 36;
	
	
	var Size = "width=" + w + ",height=" + h;
	
	if ( newWin ) {
		newWin.close();
	}
	
	newWin=window.open("","nWin",Size);
	
	newWin.document.open();
	newWin.document.write('<html><head><title>' +wintitle+ '</title></head>');
	newWin.document.write('<body style="margin:0px;padding:0px;background:#eee url('+url+') no-repeat fixed center center;">');
	newWin.document.write("</body></html>");
	newWin.document.close();
	newWin.resizeTo(w,h);

}


// -->
