var popwin= null;
function imgPop(img){
	if(popwin!= null) popwin.close();
	opt='width=200,height=200,toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=yes,resizable=no';
	popwin=window.open('','',opt)
	popwin.document.clear()
	popwin.document.write('<title>NS Image Viewer</title>');
	popwin.document.write('<body topmargin=0 leftmargin=0>');
	popwin.document.write('<a href="javascript:window.close()" title="ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ½Ã¸é Ã¢ÀÌ ´ÝÈü´Ï´Ù.">');
	popwin.document.write('<img name="ima" src="'+img+ '" border=0></a>');
	popwin.document.write('<script>setTimeout("self.resizeTo(document.ima.width + 25,document.ima.height + 50)", 1000);<\/script></body>');
}


//iFrame Å©±â Á¶Àý
function syncHeight(el) {
	el.height = eval(el.name+".document.body.scrollHeight");
}

function WinPop(Url, Name, Width, Height, Opt)
{
	if (Opt == 1) {var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=no,resizable=no';}
	else if (Opt == 2){var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=no,resizable=auto';}
	else if (Opt == 3){var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=yes,resizable=no';}
	var Option='width=' + Width + ',height=' + Height + OptV;
	winup=window.open(Url, Name, Option);
	if (!winup) {
	for (i=0;i<3 ;i++ ) {setTimeout(WinPop(Url, Name, Width, Height, Opt),500);}
		alert('ÆË¾÷ Â÷´ÜÀ» Çã¿ëÇØ ÁÖ¼¼¿ä.');
	}
	else {winup.focus();}
}

function imgreload(imgobj) {
	re = 1; // ÀÌ¹ÌÁö ¿¡·¯ÀÌº¥Æ®°¡ ¹ß»ýÇßÀ»¶§ ÀÌ¹ÌÁö¸¦ È£ÃâÇÏ´Â Ä«¿îÅÍ
	imgobj.recount++;
	if(imgobj.recount >= re) {
		imgobj.src = "../images/noimage.jpg"; // re Ä«¿îÅÍ ¸¸Å­ ÀÌ¹ÌÁö¸¦ ¸®·ÎµåÈÄ¿¡µµ ¿¡·¯°¡ ¹ß»ýÇÏ¸é ´Ù¸¥ ¿¡·¯ÀÌ¹ÌÁö¸¦ º¸¿©ÁØ´Ù.
		return;
	}
	imgobj.src=imgobj.src;
}



