document.write("<s"+"cript language='javascript' src='/common/SecuiPKIScript.js'></s"+"cript>");

function cal(){ window.open('http://www.samsungfoundation.org/html/news/event_default.asp');}
function kor()
{
	if(top.location == null)
	{
		location.href="/index.asp";
	}
	else
	{
		top.location.href="/index.asp";
	}
}
function eng()
{
	if(top.location == null)
	{
		location.href="/eng/index.asp";
	}
	else
	{
		top.location.href="/eng/index.asp";
	}
}

//function login() {window.top.location.href="javascript:SLink('http://hoam.samsungfoundation.org/info/member/login_main.asp');" }
//function join() {window.top.location.href="javascript:SLink('http://member.samsungfoundation.org/join/MemJoinInfo.asp?site=HM');" }
//function logout() {window.top.location.href="javascript:SLink('http://hoam.samsungfoundation.org/common/checkLogout.asp');" }
//function mypage() {window.top.location.href="javascript:SLink('http://hoam.samsungfoundation.org/info/member/join_main.asp');" }

function login() {window.top.location.href="javascript:SLink('/info/member/login_main.asp');" }
function join() {window.top.location.href="javascript:SLink('http://member.samsungfoundation.org/join/MemJoinInfo.asp?site=HM');" }
function logout() {window.top.location.href="javascript:SLink('/common/checkLogout.asp');" }
function mypage() {window.top.location.href="javascript:SLink('/info/member/join_main.asp');" }

u1="/info/main.html";
u2="/gallery/main.html"
//u2="http://www.leeum.org/html/collection/ancient.asp";
u3="/exhibit/main.html";
u4="/heewon/main.html";
u5="/program/research.html";
u6="/program/main.html";
u7="/sitemap/main.html";

function link()
{
	var url = "";
	var depth = arguments.length;
	
	try
	{
		if(depth==0) return;
		else if(depth==1) url = eval("u"+arguments[0]);
		else if(depth==2) url = eval("u"+arguments[0]+arguments[1]);
		else if(depth==3) url = eval("u"+arguments[0]+arguments[1]+arguments[2]);
		else if(depth==4) url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]);

		//if(arguments[0]==2) { window.open(url,'leeum','width=1024,height=768,location=1,directories=1,resizable=1,status=1,toolbar=1,menubar=1,scrollbars=1');}
		if(url=="")
			alert("ÁØºñÁßÀÔ´Ï´Ù.");
		else
		{
			if(top.location == null)
			{
				location.href=url;
			}
			else
			{
				top.location.href=url;
			}
			//window.top.location.href = url;
		}

	}
	catch(e)
	{
		alert("ÁØºñÁßÀÔ´Ï´Ù.!!"); 
	}
}

//ÀÌ¿Ã¶ó½º
function getFlash(url, wid, hei){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+wid+" height="+hei+"><param name='movie' value='"+url+"'><param name='quality' value='high'><param name='allowScriptAccess' value='sameDomain'><param name='wmode' value=transparent><embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width="+wid+" height="+hei+"></embed></object>");
}
//ÀÌ¿Ã¶ó½º
function getFlash1(url, wid, hei){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+wid+" height="+hei+"><param name='movie' value='"+url+"'><param name='quality' value='high'><param name='wmode' value=transparent><embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width="+wid+" height="+hei+"></embed></object>");
}

// SLink¿¡¼­ »ç¿ëµÇ´Â form
document.write("<form method=post name=bLaNk style='margin:0;display:none'></form>");

//SLink
function SLink(url,target)
{
	//alert(url);
	
	//alert(SecuiSS.getKEYIV());
	
	var f=document.bLaNk;
	if(!target) target="_self";
	f.innerHTML="";

	pos=url.indexOf("?");
	if(pos!=-1)
	{
		action_url=url.substring(0,pos);
		value=url.substring(pos+1,url.length);

		arr = value.split("&");
	
		for(i=0;i<arr.length;i++)
		{
			tmp = arr[i].split("=");
			f.innerHTML+="<input type=hidden name='"+tmp[0]+"' value='"+tmp[1]+"'>";
		}
		f.innerHTML+="<input type=hidden name='__default' value=''>";	
	}
	else
	{
		action_url=url;
	}
/*
	if(SecuiSS.getKEYIV().length > 0)
	{ 
			//alert("Å°ÀÖ´Ù");
		TargetSecuiSubmit(f, action_url, '2', target);
	}
	else
	{
		//alert("Å° ¾ø´Ù");
		TargetSecuiSubmit(f, action_url, '1', target);
	}
*/

		TargetSecuiSubmit(f, action_url, '1', target);
}

