var refreshinterval = 10*60;  	// ¸®ÇÁ·¹½¬ Å¸ÀÓ ÁöÁ¤
var displaycountdown = 'no';  	// »óÅÂ¹Ù¿¡ ³²Àº ½Ã°£À» º¸¿©ÁÙÁö ¸»Áö ¿©ºÎ (yes/no)

var starttime;
var nowtime;
var reloadseconds = 0;
var secondssinceloaded = 0;

function starttime() {
	starttime = new Date();
	starttime = starttime.getTime();
	countdown();
}

function countdown() {
	nowtime = new Date();
	nowtime = nowtime.getTime();

	secondssinceloaded = (nowtime-starttime)/1000;
	reloadseconds = Math.round( refreshinterval-secondssinceloaded );
	if( refreshinterval >= secondssinceloaded ) {
		var timer = setTimeout( 'countdown()', 1000 );
		if( displaycountdown == 'yes' ) {
			window.status = 'ÀÌ ÆäÀÌÁö´Â ' + reloadseconds + 'ÃÊ ÈÄ¿¡ »õ·Î°íÄ§µË´Ï´Ù.';
		}
	}
	else {
		clearTimeout(timer);
		window.location.reload(true);
	} 
}
window.onload = starttime;

