<!--
// Last Modified On : 2004.10.07
// Script Version   : v2.00
//

var monIP = "61.74.246.50"
var port = "80"

function nStart()// ½ÃÀÛÁ¡¿¡¼­ È£ÃâÇÑ´Ù.
{
//	alert("½ÃÀÛ!!");
	var today = new Date();
	var setTM = today.getTime();
	today.setMinutes(today.getMinutes() + 3) ; //3ºÐ ÀÌÈÄ¸é ÄíÅ° ¸¸·á

	document.cookie = "monStart=" + setTM + ";path=/; expires="+today.toGMTString() + ";";
}

function nStop(tr) // Å»Ãâ ÆäÀÌÁö¿¡¼­ È£ÃâÇÑ´Ù.
{
//	alert("³¡!!");
    var monStart = wikiGET("monStart");

	if(monStart)
	{
		var today = new Date();
		var gabTM = today.getTime() - monStart;
		var stref = document.referrer;
		var re = /&/gi;
		var reff = stref.replace(re,"*");

		(new Image()).src='http://' + monIP + ':' + port + '/Prt/wikiMon.php?dct='
   		+ gabTM + '&d=' + today.getTime() + '&x=' + tr +'&ref='+reff;

//		today.setMinutes(today.getMinutes() + 15) ; //15 Minute
//		document.cookie = "checkTime=" + today.getTime() + ";path=/; expires="+today.toGMTString() + ";";
	}

    wikiSET("monStart");
}

function wikiGET(name)  	// Internal Function
{
	var index = document.cookie.indexOf(name + "=");	
	if(index == -1) return null;	
	index = document.cookie.indexOf("=",index) + 1;
	
	var endstr = document.cookie.indexOf(";",index);
	if(endstr == -1)
	   endstr = document.cookie.length;
	   return unescape(document.cookie.substring(index,endstr));		
}

function wikiSET(name)	// Internal Function
{
	var today = new Date();
	today.setMinutes(today.getMinutes() - 3) ; // ÇöÀç ½Ã°£º¸´Ù ÀÌÀüÀ» ¸¸·áÀÏ·Î Á¤ÇØÁØ´Ù.

	document.cookie = name + '=; path=/; expires=' + today.toGMTString() +";";	
}

//-->
