//submit 
document.write("<s"+"cript language='javascript' src='/common/SecuiPKIScript.js'></s"+"cript>");
window.name="rootwindow";
//====================================================
// post·Î url³Ñ±è (2004-10-02)
// 
// ex)
// SLink("proc.asp?a=1&b=2")
//====================================================
//20070207-m4gyoung
function ViewSLink(vUrl) {
		SLink(vUrl , "_self") ;
}
function download(d_file){
	var nUrl = "/common/pop_filedown.asp?file1="+d_file;
	newWin = window.open(nUrl,'filedownload','width=390,height=250');
}
function SLink(url,target)
{
	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;
	}

	//alert(SecuiSS.getKEYIV());
	
/*
	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);
}


// 2004-10-03 ±èÁ¤Çå ¼öÁ¤ style : display:none Ãß°¡
document.write("<form method=post name=bLaNk style='margin:0;display:none'></form>");

//====================================================
//·Î±×ÀÎ °ü·Ã
function loginWin()
{
	window.name = "mainChild";	// 2007-08-02 Ãß°¡ - ·Î±×ÀÎ½Ã /common/checkLogin.asp¿¡¼­ »ç¿ë 
	window.open("","loginWin","width=350,height=340");
	SLink("/join/login.asp","loginWin");
}
function logOut()
{
	SLink("/common/checkLogout.asp");
}
function myinfoEdit()
{	
	SLink("/join/join_input.asp?act=edit");
}
function down_chk1(attchfile){
	download('cyber\\'+attchfile);
}
//¸ÞÀÎ´º½º¸µÅ©
function _centerNews(idx)
{
	if(idx) 
		SLink("/center/news_view.asp?prc_seq=V&midx=CN01&didx="+idx);
}
//pagelist
function _gotoPage(objForm,p,filename)
{
	objForm.page.value=p;
	TargetSecuiSubmit(objForm , filename , '2', '_self');
}
//pagelist2
function _gotoPage2(objForm,p,filename)
{
	objForm.page.value=p;
	objForm.submit();
}

//¿ë¾î»çÀü ¶ç¿ì±â
function dicWindow(idx)
{
	window.open("","dic","width=500,height=400");
	SLink("/children/forteacher/institute/pop_dic.asp?idx="+idx,"dic");

}
//ÀÌ¹ÌÁöº¸±â»õÃ¢
function popimgView(url)
{
	window.open("","img","width=100,height=100");
	SLink("/common/Image_View.asp?url="+url,"img")
}

function popimgView_WithBtn(url,id)
{
	window.open("","img","width=100,height=100,scrollbars=yes");
	SLink("/common/Image_View_WithBtn.asp?url="+url+"&idx="+id,"img")
}
// 2004-11-10 ¼öÁ¤ ÀÌÀÚ¿µ

function mainmenu(args){
	//¸ÞÀÎ ³×ºñ°ÔÀÌ¼ÇÀÇ °¢ ¸µÅ©
var url="";
	switch (args){
		//ÇÑ±Û »çÀÌÆ®
		//¼¾ÅÍÁ¤º¸ 
		case "k11" : url ="/center/greeting.asp" ; break;		      //¼¾ÅÍ¼Ò°³
		case "k12" : url ="/center/childhouse.asp" ; break;		      //ÁÖ¿ä»ç¾÷
		case "k13" : url ="/center/news.asp" ; break;                 //¼¾ÅÍ¼Ò½Ä
		case "k14" : url ="/center/map.asp" ; break;                  //¿À½Ã´Â±æ
		
		//¾Æµ¿±³À°
		case "k21" : url ="/children/forteacher/index.asp" ; break;		//±³Á÷¿øÀ» À§ÇØ
		case "k22" : url ="/children/forfamily/index.asp" ; break;		            //°¡Á·À» À§ÇØ 
		case "k23" : url ="/children/forchildren/index.asp" ; break;		        //¾î¸°ÀÌ¸¦ À§ÇØ

		//Ã»¼Ò³â±³À°	
		case "k31" : url ="/youth/foryouth/index.asp" ; break;            //Ã»¼Ò³âÀ» À§ÇØ
		case "k32" : url ="/youth/forparents/index.asp" ; break;	      //ÇÐºÎ¸ð¸¦ À§ÇØ
		case "k33" : url ="/youth/forexpert/index.asp" ; break;	                                          //Àü¹®°¡¸¦ À§ÇØ  
		
		//»õ·Î Ãß°¡µÈ ¸ÞÀÎÀÇ ¼­ºê¸Þ´º
		case "k111" : url ="/center/greeting.asp" ; break;	//ÀÎ»ç¸»
		case "k112" : url ="/center/purpose.asp" ; break;	//¼³¸³ÃëÁö
		
		case "k121" : url ="/center/childhouse.asp" ; break;	//»ï¼º¾î¸°ÀÌÁý
		case "k122" : url ="/center/childedu.asp" ; break;	//¾Æµ¿±³À°»ç¾÷
		case "k123" : url ="/center/youthedu.asp" ; break;	//Ã»¼Ò³â±³À°»ç¾÷

		case "k131" : url ="/center/news.asp" ; break;	//´º½º
		case "k132" : url ="/center/letter.asp" ; break;	//¼Ò½ÄÁö
		
		case "k141" : url ="/center/map.asp" ; break;	//¾àµµ ¹× ¿¬¶ôÃ³


		case "k211" : url ="/children/forteacher/institute/operate.asp?midx=CS01" ; break;	      //º¸À°,½Ã¼³ Á¤º¸
		case "k212" : url ="/children/forteacher/culture/event.asp" ; break;	      //¹®È­Á¤º¸  
		case "k213" : url ="/children/forteacher/nurture/seminar.asp" ; break;		  //ÇÐ¼ú¼¼¹Ì³ª

		case "k221" : url ="/children/forfamily/familyinfo/happy.asp" ; break;		  //°¡Á·Á¤º¸	
		case "k222" : url ="/children/forfamily/environment/physical.asp?midx=CF06" ; break;       //ÁÁÀº °¡Á¤ È¯°æ
		case "k223" : url ="/children/forfamily/culture/event.asp" ; break;       //¹®È­Á¤º¸
		case "k224" : url ="/children/forfamily/site/site.asp?cate=1" ; break;       //ÃßÃµ»çÀÌÆ®

		case "k231" : url ="/children/forchildren/index.asp" ; break;       // ¾î¸°ÀÌ¸¦ À§ÇØ

		case "k311" : url ="/youth/foryouth/study/subject.asp" ; break;       //ÇÐ½À°¡ÀÌµå
		case "k312" : url ="/youth/foryouth/friend/friends.asp" ; break;		  //Ä£±¸°ü°è°¡ÀÌµå
		case "k313" : url ="/youth/foryouth/course/search.asp" ; break;		  //Áø·Î°¡ÀÌµå	
		case "k314" : url ="/youth/foryouth/report/report.asp" ; break;		 //¹®È­¸®Æ÷Æ®	

		case "k321" : url ="/youth/forparents/column/column.asp" ; break;			//¸í»çÄ®·³
		case "k322" : url ="/youth/forparents/coach/time.asp" ; break;			//ÇÐ½ÀÁöµµ µµ¿ì¹Ì	
		case "k323" : url ="/youth/forparents/job/interest.asp" ; break;			//Áø·ÎÁöµµ µµ¿ì¹Ì
		case "k324" : url ="/youth/forparents/life/help.asp" ; break;         //»ýÈ°Áöµµ µµ¿ì¹Ì

		case "k331" : url ="/youth/forexpert/studyinfo/human.asp" ; break;			//Ã»¼Ò³â ±³À°Á¤º¸
		case "k332" : url ="/youth/forexpert/data/report.asp" ; break;			//ÀÚ·á½Ç

		//¿µ¹®»çÀÌÆ®
		case "e11" : url ="/english/center/greeting.asp" ; break;			//introduction
		case "e12" : url ="/english/center/youthedu.asp" ; break;			//program overview
		case "e13" : url ="/english/center/greeting" ; break;			//for education
		case "e14" : url ="/english/center/greeting" ; break;			//for family
		
		case "e21" : url ="/english/children/foreducator.asp" ; break;			//for children
		case "e22" : url ="/english/children/forfamily.asp" ; break;		
		case "e23" : url ="/english/children/forchildren.asp" ; break;		

		case "e31" : url ="/english/youth/foryouth.asp" ; break;
		case "e32" : url ="/english/youth/forparents.asp" ; break;	
		case "e33" : url ="/english/youth/forexport.asp" ; break;	

	}

	//top.document.location.href = url;
	//alert(url);
	SLink(url);
}
function sidemenu(args)
{
	var url="";

	switch (args){
		case 0 : 
			url ="/index.asp" ;
		break;	
		case 1 : 
			loginWin();
			return;
		break;		
		case 2 :
			myinfoEdit();
			return;
		break;
		case 3 : 
			url ="/etc/sitemap/sitemap.asp" ; 
		break;
		case 4 : 
			url ="/etc/qsearch/center.asp" ;
			_qsearch(url)
			return;		
		break;
		case 5 : 
			url ="/english/center/greeting.asp" ; 
		break;
		case 6 : 
			url ="/center/greeting.asp" ; 
		break;
	}
	
	SLink(url);
}

function _qsearch(url)
{
	window.open(url,"qsearch","width=236,height=600,scrollbars=no");
	SLink(url,"qsearch");
}

function submenu(args){ // from
var url="";
	switch (args){
		case 1 : url ="/children/forteacher/campus/index.asp" ; break;		
		case 2 : url ="/counsel/counsel.asp" ; break; //»ó´ã½Ç
		case 3 : url ="/children/forchildren/index.asp" ; break;
 		case 4 : url ="/etc/pop_cyber.asp" ;        // »çÀÌ¹ö ±³À° °ü·Ã ¹®ÀÇ¸¦ ¸ÞÀÏ·Î ¹ÞÀ» ¼ö ÀÖµµ·Ï º¯°æ
			openContact(url)
			return;
			break;
		case 5 : url ="javascript:kids()" ; break; 
		case 6 : url ="/children/forteacher/campus/status.asp" ; break; //³ªÀÇ ¼ö°­ÇöÈ² º¸±â
		case 8 : url ="javascript:start()" ; break; //»çÀÌ¹ö°­ÀÇ ¾È³» µ¿¿µ»ó
		case 9 : url ="http://kids.samsungfoundation.org/" ; break; //»ï¼º¾î¸°ÀÌ¹Ú¹°°ü 2008-04-10 ½Ç¼­¹ö °æ·Î·Î ¼öÁ¤
		case 10 : url ="javascript:AdmWIN()" ; break; //º¸¼ö±³À° ½Ã±º±¸´ã´ç °ü¸®ÆäÀÌÁö
//		case 10 : url ="http://www.naver.com" ; break;
		case 7 : url ="cyber/cyber_class.pdf" ; break; 
		case 11 : url ="/ansan_rental/index.asp" ; break;
		case 12 : url ="javascript:win12()" ; break; //º¸¼ö±³À° ½Ã¼³Àå °ü¸®ÆäÀÌÁö
		case 13 : url ="http://www.naver.com" ; break; //º¸¼ö±³À° ½Â±Þ±³À° °úÁ¤
	//	case 14 : url ="/children/forteacher/campus/bosu.asp" ; break; //º¸¼ö±³À° ½Ã¹ü»ç¾÷ ¾È³»
		case 14 : url ="http://smhi.samsunghospital.com/" ; break;
//		case 12 : url ="http://www.credu.com" ; break;
//		case 12 : url ="/children/forteacher/campus/bosu.asp" ; break;
//		case 11 : url ="javascript: alert('¾È»ê»ï¼º±³±¸´ë¿©¼¾ÅÍ È¨ÆäÀÌÁö´Â 3¿ù 9ÀÏ ¿ÀÇÂµË´Ï´Ù.');" ; break;
	}

	if (args == 7){
		var len = navigator.appVersion.indexOf('MSIE')+5;
		var word = navigator.appVersion.substring(len,len+1);

		if (word == 7)
		{
			file_nm = "cyber/cyber_class.zip";
			//window.open("/common/pop_filedown.asp?file1="+file_nm,"","scrollbars=no,resizable=no,status=no,width=500,height=500,left=100,top=50");
			_downloadFile(file_nm)
		}else{
			window.open("http://file.samsungchild.org/samsungchild_upload/cyber/cyber_class.pdf"); 
		}
		//_downloadFile(url)
		//window.open("/upload/cyber/cyber_class.pdf");
	}else if (args == 13){
		var len = navigator.appVersion.indexOf('MSIE')+5;
		var word = navigator.appVersion.substring(len,len+1);

		if (word == 7)
		{
			file_nm = "cyber/information.zip";
			_downloadFile(file_nm)
		}else{
			window.open("http://www.naver.com"); 
		}
		//_downloadFile(url)
		//window.open("/upload/cyber/information.pdf");
	}else if(args == 9 || args == 11){
		SLink(url,"_blank");
	}else if(args == 14 || args == 11){
		SLink(url,"_blank");
	}else{
		SLink(url);
	}
function openContact()
{
	window.open(url,'faq2' ,'left=300,top=150,width=500,height=510' );
	SLink( url , 'faq2') ; 
}
}
function submenu_add(args){ // 
var url="";
	switch (args){
		case 1 : url ="/children/forteacher/institute/contest.asp" ; break;
//		case 2 : url ="/children/forteacher/institute/goodhouse/childhouse06_09.asp" ; break;
//		case 2 : url ="/children/forteacher/institute/goodhouse/2007/LectureApply/childhouse07.asp" ; break;
//		case 3 : url ="/children/forteacher/nurture/conference.asp" ; break;
		case 3 : url ="/children/forteacher/nurture/conference.asp" ; break;
		case 4 : url ="/center/letter.asp" ; break;

	}
	//top.document.location.href = url;
	SLink(url)
}
function sitemap(){parent.location.href="/html/etc/sitemap/sitemap.asp";}

function _downloadFile(url)
{
	SLink("/common/download.asp?file1="+ url,"FileDownLoad");
}
document.write("<iframe name='FileDownLoad' style='display:none'></iframe>");

function aa(){parent.location.href="javascript:alert('ÁØºñÁßÀÔ´Ï´Ù.')";}
function kids(){window.open("http://kids.samsungfoundation.org/");} //2008-04-10 ½Ç¼­¹ö °æ·Î·Î ¼öÁ¤
function start(){ window.open("/children/forteacher/campus/start.html","movie","width=825,height=552,left=0,top=0"); }

