<!-- 
// 브라우저 버젼 체크
/*
function BrowserCheck() 
{
	if(window.navigator.userAgent.indexOf("SV1") != -1) {
		return "SV1";
	} 
	else if(window.navigator.userAgent.indexOf("IE") != -1 ) 
	{
		if(window.navigator.userAgent.indexOf("MSIE 7.0") != -1)
			return "IE7";
		else if(window.navigator.userAgent.indexOf("MSIE 8.0") != -1)
			return "IE8";
		else if(window.navigator.userAgent.indexOf("MSIE 9.0") != -1)
			return "IE9";
		else
			return "IE6";
	} 
	else 
	{
		return "";
	}
}
*/
function BrowserCheck() 
{
	if(window.navigator.userAgent.indexOf("IE") != -1 ) 
	{
		if(window.navigator.userAgent.indexOf("MSIE 9.0") != -1)
		{
			return "IE9";
		}
		else if(window.navigator.userAgent.indexOf("MSIE 8.0") != -1)
		{
			return "IE8";
		}
		else if(window.navigator.userAgent.indexOf("MSIE 7.0") != -1)
		{
			return "IE7";
		}
		else if(window.navigator.userAgent.indexOf("SV1") != -1)
		{
			return "SV1";
		}
		else 
		{
			return "IE6";
		}
	} 
	else
	{
		return "";
	}
}
// 팝업창 자동 리사이즈
function SelfResize()
{
	var szResult = BrowserCheck();
	var add_width = 10;
	var add_height = 0;

	if(szResult == "SV1") {
		add_height = 30;
	} else if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9") {
		add_height = 50;
	} else if(szResult == "" ) {
		add_height = 60;
	} else {
		add_height = 0;
	}

	try
	{
		var oBody  = document.body;
		window.resizeTo(oBody.scrollWidth+add_width, oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight)+add_height );
	}
	catch (e)
	{
		document.domain = DOMAIN;
		var oBody  = document.body;
		top.window.resizeTo(oBody.scrollWidth+add_width, oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight)+add_height );
	}
}


// 팝업창 자동 리사이즈
function SelfResize2(nWidth, nHeight)
{
	var szResult = BrowserCheck();
	var add_width = 10;
	var add_height = 0;
	
	if(szResult == "SV1") {
		add_height = 30;
	} else if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9") {
		add_height = 50;
	} else if(szResult == "" ) {
		add_height = 60;
	} else {
		add_height = 0;
	}

	try
	{
		window.resizeTo(nWidth+add_width, nHeight+add_height );
	}
	catch (e)
	{
		try{
			document.domain = DOMAIN;
			top.window.resizeTo(nWidth+add_width, nHeight+add_height );
		} catch(e2){}
	}
}


// 팝업창 자동 리사이즈 - 아프리카 uv 관련
function SelfResize3(nWidth, nHeight)
{
	var szResult = BrowserCheck();
	var add_width = 10;
	var add_height = 0;

	if(szResult == "SV1") {
		add_height = 30;
	} else if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9") {
		add_height = 50;
	} else if(szResult == "" ) {
		add_height = 60;
	} else {
		add_height = 0;
	}

	try
	{
		top.window.resizeTo(nWidth+add_width, nHeight+add_height );
	}
	catch (e)
	{
		document.domain = DOMAIN;
		top.window.resizeTo(nWidth+add_width, nHeight+add_height );
	}
}

// 브라우저 닫기
function SelfClose()
{
	var szResult = BrowserCheck();		
	//if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9" || szResult == "" )
	if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9")
	{
		window.open('about:blank','_self').close();
	}
	else
	{
		self.opener = this;
		self.close();
	}
}


// 브라우저 닫기 - 아프리카 uv 관련
function SelfClose2()
{
	document.domain = DOMAIN;
	var szResult = BrowserCheck();
	//if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9" || szResult == "" )
	if(szResult == "IE7" || szResult == "IE8" || szResult == "IE9")
	{
		top.window.open('about:blank','_self').close();
	}
	else
	{
		top.self.opener = this;
		top.self.close();
	}
}
//-->

