﻿// 쿠키값 가져오기
function getCookie(name) 
{ 
	var nameOfCookie = name + "="; 
	var x = 0; 
	//alert(document.cookie);
	while (x <= document.cookie.length) 
	{ 
		var y = (x+nameOfCookie.length);
		//alert(x +","+ y);alert(document.cookie.substring( x, y ));
		if(document.cookie.substring(x,y) == nameOfCookie){ 
			if((endOfCookie=document.cookie.indexOf( ";", y )) == -1){
				//alert(endOfCookie);
				endOfCookie = document.cookie.length;
			}
			//alert(unescape( document.cookie.substring( y, endOfCookie ) ));
			return unescape(document.cookie.substring(y,endOfCookie));
		} 
		x = document.cookie.indexOf(" ",x) + 1; 
		if(x == 0) 
			break; 
	} 
	return ""; 
}

function Cookie_Win_Open001(cookieNm , str_url , wid , hei , left , top , scroll)
{

 
	if (left == "")
	{left = 110;}
	if (top == "")
	{top = 10;}
 
	if(GetCookie(cookieNm) != 'done') 
	{ 
		var option = "";
		option = 'width=' + wid + ',height=' + hei + ',left=' + left + ',top=' + top  ; 
		option += ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=no";
		var obj = window.open(str_url,cookieNm,option);
 
		try
		{
			obj.focus();
		}
		catch (e)
		{
		}
	}
}
 