document.domain = "joymax.com";

var result = 0;
function keepSession()
{
	
	 var myAjax = new Ajax.Request('/sessionKeep.jmx',
		{
			method: 'get',
			onSuccess: function(transport)
			{
				result = transport.responseText;
											
				// 0 : ¼º°ø
				// ¼º°øÀÌ ¾Æ´Ò °æ¿ì Ã³¸®
				if (result != 0)
				{
					// °¢Á¾ ¿À·ù¿¡ ´ëÇÑ Ã³¸®
					// ·Î±×¾Æ¿ô ½ÃÅ²´Ù.
					// ·Î±×ÀÎ µÇ¾î ÀÖÁö ¾ÊÀ» °æ¿ì´Â 1À» ¸®ÅÏÇÏ¹Ç·Î ¿©±â¿¡ ÇØ´çµÇÁö ¾Ê´Â´Ù.
					if (result < 0)
					{
						logoutByForce("http://portalcp.joymax.com/Joymax.jmx");
					}
				}
			}
		}
	);
}

function portalURL(pageURL)
{
	location.href = pageURL;
}

keepSession();

setInterval(keepSession, 25000);