function openwindow (url,wtitle,xsize,ysize)
{

var x,y, windowsize;
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}


function modalpopup(url,xsize,ysize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:No;status: No;"
	var arrRet = window.showModalDialog(url,"",windowsize);
}

function showModelessResize(url,xsize,ysize,resize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:"+resize+";status: No;"
	var arrRet = window.showModelessDialog(url,"",windowsize);
}

function getCookie(name)
		{
			var nameOfCookie = name + "=";
			var x = 0
			while (x <= document.cookie.length) {
				var y = (x + nameOfCookie.length);

				if (document.cookie.substring(x, y) == nameOfCookie) {
					if ((endOfCookie = document.cookie.indexOf(";", y)) == -1)
						endOfCookie = document.cookie.length;
					
					return unescape(document.cookie.substring(y, endOfCookie));
				}
				x = document.cookie.indexOf(" ", x) + 1;
				if (x == 0) 
					break;
			}
			return "";
		}

	function setCookie ( name, value, expiredays, domainname)
	{
		var todayDate = new Date();
		var cookieStr;

		todayDate.setDate( todayDate.getDate() + expiredays );
		cookieStr = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";domain=" + domainname + ";"
		document.cookie = cookieStr;
	}


  function close_swf(){
		setCookie( "tygem_event", "done" , 1 ,"tygem.com");
    document.all.Layer1.style.display = "none";
    document.all.Layer2.style.display = "block";
  }


	// ½ºÅ©·Ñ µÇ´Â°Å
	function openwindow2 (url,wtitle,xsize,ysize) 
	{

	var x,y, windowsize;
	x = Math.round ((screen.width - xsize)/2);
	y = Math.round ((screen.height - ysize)/2);

		windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0';
		open_window = window.open(url, wtitle, windowsize );

		if(open_window != null) open_window.focus();
		if(open_window.opener == null ) open_window.opener = window;
	}

	// ¸®»çÀÌÁî µÇ´Â°Å 
	function openwindow3 (url,wtitle,xsize,ysize)
	{

	var x,y, windowsize;
	x = Math.round ((screen.width - xsize)/2);
	y = Math.round ((screen.height - ysize)/2);

		windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
		open_window = window.open(url, wtitle, windowsize );

		if(open_window != null) open_window.focus();
		if(open_window.opener == null ) open_window.opener = window;
	}

