// title---------

document.title="SKT Global";

// ---------title



document.write("<script type='text/javascript' src='/eng/js/common_const.js'></script>");

document.write("<script type='text/javascript' src='/eng/js/common_url.js'></script>");





// mnav---------



var globalHn="";

var globalSn="";

var globalCn="";

var globalId="";

function Mnav(hn,sn,cn){



	globalHn = (hn) ? hn :"" ;

	globalSn = (sn) ? sn :"" ;

	globalCn = (cn) ? cn :"" ;

	globalId = (hn) ? hn : globalId ;

	globalId = (sn) ? globalId+"_"+sn : globalId ;

	globalId = (cn) ? globalId+"_"+cn : globalId ;

	var FlaUrl="/eng/flash/sub_nav.swf";

	var FlaParam="hn="+globalHn+"&sn="+globalSn;

	document.write("<div id='GnbArea'>");

	FlashObj('mnavFla',FlaUrl,FlaParam,'850','215','#FFFFFF','transparent');

	document.write("</div>");

}



// ---------mnav



// 좌측네비---------

function Snav(){

	var FlaUrl="/eng/flash/snav"+globalHn+".swf";

	var FlaParam="sn="+globalSn+"&cn="+globalCn;

	document.write("<div id='LeftMenu'>");

	FlashObj('snavFla',FlaUrl,FlaParam,182,500,'#FFFFFF','transparent');

	document.write("</div>");

}







// line map---------



function setString(node){

	var spStr = "" , last="";

	try{

		var url  = eval(node+"[0]");

		var name = eval(node+"[1]");

	}

	catch(e){

//		document.write("<div id='path' style='margin-top:-10px;'>id unfined : " + node+"</div>");

	}

	var nodeId  = node;

	var spStr = "&nbsp;&nbsp;<img src='/eng/img/common/ico_path2.gif' class='mt3' align='absmiddle'>&nbsp;";

	if(node.lastIndexOf('_') != -1) setString(node.substring(0,node.lastIndexOf('_')));

	else lineMapStr += "<a href='"+eval("u0[0]")+"'>"+ eval("u0[1]")+"</a>" + spStr;

	if(currentPath != nodeId)

		lineMapStr += "<a href='"+url+"'>"+ name+"</a>" + spStr;

	else

		lineMapStr += name;



	return lineMapStr

}



function path(){

	try{

		lineMapStr = "";

		index = 0;

		currentPath="u"+globalId;

		setString(currentPath);

		document.write("<div id='path'>"+lineMapStr+"</div>");

	}catch(e){

		document.write(" : " +  e);

	}

}





// ---------line map



// 2008-09-08 힐리오 이미지 삭제

function Footer(){

	document.write("\
	<div>\
		<div class='left'>\
			<img src='/eng/img/common/footer1.gif' alt='footer' usemap='#Footer' />\
		</div>\
		<div class='right mr50' style='display:inline'>\
			<a href='http://www.sk.com' target='_blank'><img src='/eng/img/common/footer2.gif' class='mt5' alt='www.sk.com' /></a>\
		</div>\
	</div>\
	<map name='Footer'>\
		<area shape=rect coords='0,7,33,14' href='javascript:link(9);' />\
		<area shape=rect coords='43,5,89,15' href='javascript:link(11);' />\
		<area shape=rect coords='98,5,176,14' href='javascript:;;' onclick=pop('/eng/html/notice/NoticePrivacyPop.html','privacy',460,430); />\
		<area shape=rect coords='187,6,245,15' href='javascript:;;' onclick=pop('/eng/html/notice/NoticeLegalPop.html','notice2',460,430); />\
	</map>\
");

}









function link(){

	var url = "";

	var depth = arguments.length;

	try {

		if(depth==0) return;
		else if(depth==1) url = eval("u"+arguments[0]+"[0]");
		else if(depth==2) url = eval("u"+arguments[0]+"_"+arguments[1]+"[0]");
		else if(depth==3) url = eval("u"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"[0]");
		else if(depth==4) url = eval("u"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"_"+arguments[3]+"[0]");
		else if(depth==5) url = eval("u"+arguments[0]+"_"+arguments[1]+"_"+arguments[2]+"_"+arguments[3]+"_"+arguments[4]+"[0]");

		if(url=="") alert("준비중입니다");
		else if(arguments[0]==11 && arguments[1]==1) pop(url,'pop_contact','500','620');
		else if(arguments[0]==20) pops(url,'2010mwc','717','800');
		else if(arguments[0]==13 && (arguments[1]==1 || arguments[1] == 2)) n_pop(url,'pop_contact','600','760');
		else if(arguments[0]==14) window.open(url);
		else 
		{
			if(arguments[0]==12)
			{
				parent.location.href = url;
			}else
			{
				location.href = url;
			}
		
		}	
	}catch(e) { alert("준비중입니다"); }

}





function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no,status=1') } //Popup(스크롤바없음)

function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(스크롤바있음)



/*ActiveX 플래쉬*/

// id: flash id

// url: source url

// w: source width

// h: source height

// t: wmode (window/transparent/opaque)

function Flash(id,url,w,h,bg,t){

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="+w+" height="+h+" id="+id+">\
	<param name='movie' value="+url+" />\
	<param name='wmode' value="+t+" />\
	<param name='bgcolor' value="+bg+" />\
	<param name='allowScriptAccess' value='always' />\
	<param name='quality' value='high' />\
	<param name='menu' value='false' />\
	<embed src="+url+" width="+w+" height="+h+" wmode="+t+" name="+id+" bgcolor="+bg+" allowScriptAccess='always' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\
	</object>\
");

}

function FlashObj(id,url,param,w,h,bg,t){

document.write("\
	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+w+" height="+h+" id="+id+">\
	<param name='movie' value="+url+" />\
	<param name='FlashVars' value="+param+" />\
	<param name='wmode' value="+t+" />\
	<param name='bgcolor' value="+bg+" />\
	<param name='allowScriptAccess' value='always' />\
	<param name='quality' value='high' />\
	<param name='menu' value='false' />\
	<embed src="+url+" width="+w+" height="+h+" wmode="+t+" name="+id+" bgcolor="+bg+" allowScriptAccess='always' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' FlashVars="+param+" />\
	</object>\
");

}



//동영상 미디어플레이어---------
var media_str = "" ;
function MediaPlayer(n_div,url){
	if(navigator.userAgent.indexOf("MSIE") != -1)
	{
		media_str = '<OBJECT id="myMedia" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" width="100%" height="275">\n' ;
		media_str += '<param name="filename" value="'+url+'" >\n' ;
		media_str += '</object>' ;
	}else
	{
	//	if(navigator.userAgent.indexOf("Firefox") != -1)
	//	{
			media_str = '<OBJECT id="myMedia" type="video/x-ms-asf-plugin" data="'+url+'" width="100%" height="275">';
			media_str += '<param name="url" value='+url+' >';
			media_str += '<param name="ShowControls" value="0">' ;
			media_str += '<param name="AutoRewind" value=1>' ;
			media_str += '<param name="PlayCount" value="-1">' ;
			media_str += '<param name="Balance" value=0>' ;
			media_str += '<param name="DisplaySize" value="4">' ;
			media_str += '<param name="EnablePositionControls" value="1">' ;
			media_str += '<param name="EnableContextMenu" value="1">' ;
			media_str += '<param name="Volume" value="-100">' ;
			media_str += '</object>' ;
	/*		
		}else
		{
			media_str = '<OBJECT id="myMedia" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ' ;
			media_str += 'type="video/x-ms-asf-plugin" '; 
			media_str += 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,0,02,902" ' ;
			media_str += 'data="'+url+'" width="100%" height="275">';
			media_str += '<param name="url" value="'+url+'" >';
			media_str += '<param name="ShowControls" value="0">' ;
			media_str += '<param name="AutoRewind" value=1>' ;
			media_str += '<param name="PlayCount" value="-1">' ;
			media_str += '<param name="Balance" value=0>' ;
			media_str += '<param name="DisplaySize" value="4">' ;
			media_str += '<param name="EnablePositionControls" value="1">' ;
			media_str += '<param name="EnableContextMenu" value="1">' ;
			media_str += '<param name="Volume" value="-100">' ;
			media_str += '</object>' ;
		}
		*/
	}
	document.getElementById(n_div).innerHTML = media_str ;
}
/* 2010. 10.26추가 */
function media_reload(n_div , url)
{
	if(navigator.userAgent.indexOf("MSIE") != -1)
	{
		document.getElementById("myMedia").filename = url ;
	}else
	{
		var m = "" ;
		document.getElementById("myMedia").data = url ;
		document.getElementsByTagName("param")[0].value = url ;
		if(navigator.userAgent.indexOf("Firefox") == -1 )
		{
			m = document.getElementById(n_div).innerHTML ;
			document.getElementById(n_div).innerHTML = m ;
		}
	}
}

// ---------동영상 미디어플레이어




function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no,status=1') } //Popup(스크롤바없음)

function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(스크롤바있음)

function newwin(url){ window.open(url,'new','location=1,directories=1,resizable=1,status=1,toolbar=1,menubar=1,scrollbars=1') } //NewPopup(스크롤바없음)

function listover(obj){obj.className="listover";}

function listout(obj){obj.className="listout";}



function Img(n,tog){eval("document.m"+n+".src=m"+n+"_"+tog+".src"); } //이미지 롤오버

function ImgOver(obj){obj.src = obj.src.replace(".gif","_.gif")}

function ImgOut(obj){obj.src = obj.src.replace("_.gif",".gif")}



function ScrollTop(){

	self.window.scroll(0,0);

}



function korean() { parent.location.href="/index.html?kor"; }

function chinese() { window.open(CONST_SITE_URL+'/chi/');}



function Disclaimer(){

	pop('/eng/html/invest/DisclaimerPop.html','dis',450,200);

}



function IR_news(){

	location.href="/eng/jsp/tlounge/presscenter/PressCenterList.jsp";

}



/* left 영역 다운로드*/

function left_download(num){

	var down =new Array();

	if(num==1){

		down[1]="/eng/About Sktelecom/SKTBR-eng.pdf";

		__fnDirectFileDown(down[1]);

	}

	else if(num==2){

		down[2]="/eng/jsp/sktelecom/rule/PopReportDownload.jsp?f_year_gb=2009"

		pop(down[2],'PopReportDown',430,332);

	}

	else if(num==3){

		down[3]="/eng/jsp/sktelecom/rule/PopReportChiDownload.jsp?f_year_gb=2009"

		pop(down[3],'PopReportChiDown',430,332);

	}

	else if(num==4){

		down[4]="/eng/jsp/sktelecom/rule/PopReportVietDownload.jsp"

		pop(down[4],'PopPdfVietDown',430,302);

	}

	else if(num==5){

		down[5]="/eng/jsp/sktelecom/rule/PopPdfDownload.jsp"

		pop(down[5],'PopPdfDown',430,392);

	}

}

/* left 영역 다운로드*/



function media_pop(){

	link(11,1);

}



function service_banner(num){



	var URL = new Array();

	URL[1] = '/eng/html/service/WirelessInternet/Multimedia.html';

	URL[2] = '/eng/html/service/WirelessInternet/Game.html';

	URL[3] = '/eng/html/service/WirelessInternet/Music.html';

	location.href = URL[num];

}



function main_b(){

document.write("\
	<param name='movie' value='/eng/flash/main_banner.swf' />\
	<param name='quality' value='high' />\
	<embed src='/eng/flash/main_banner.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='214' height='34' /></embed>\
	</object>\
");

}



function main_banner(num){



	var URL = new Array();

	URL[1] = '/eng/html/LocalService/ServicesAtKorea/ServiceSubscription.html';

	URL[2] = '/eng/html/service/Ubiquitous/Network.html';

	URL[3] = '/eng/html/service/Ubiquitous/Satellite.html';

	location.href = URL[num];

}



/* tab 스크립트*/

var faqnum = 1;

function faqClick(ovchk) { //list 항목을 mouseclick시 contentsList 보임

  if(ovchk != faqnum) {

		//이전 선택항목 초기화



	if (faqnum != 0) {



	  document.getElementById('tab'.concat(faqnum)).className = "tabOf";

	  document.getElementById('tabcon'.concat(faqnum)).style.display = "none";

	}



	//현재 선택항목의 contentsList 보이기

	lifaqTit = document.getElementById('tab'.concat(ovchk));

	lifaqTit = lifaqTit.className = "tabOn";

	document.getElementById('tabcon'.concat(ovchk)).style.display = "block";



	//현재 선택항목 값 저장 (이전 선택항목 초기화에 이용 // 전역변수)

	faqnum = ovchk;

  }

}











/* tab 스크립트 두줄*/

var tabnum = 1;

function tabClick(ovchk) { //list 항목을 mouseclick시 contentsList 보임

  if(ovchk != tabnum) {

		//이전 선택항목 초기화



	if (tabnum != 0) {



	  document.all['tabb'.concat(tabnum)].className = "tabbOf";

	  document.all['tabbcon'.concat(tabnum)].style.display = "none";

	}



	//현재 선택항목의 contentsList 보이기

	lifaqTit = document.all['tabb'.concat(ovchk)];

	lifaqTit = lifaqTit.className = "tabbOn";

	document.all['tabbcon'.concat(ovchk)].style.display = "";



	//현재 선택항목 값 저장 (이전 선택항목 초기화에 이용 // 전역변수)

	tabnum = ovchk;

  }

}









/* 이미지 바뀌면서 레이어 디스플레이*/

function idrsrc(obj,num){

	var max = document.getElementsByName("idrimage");

//	document.write("<div style='height:100px; width:10px;'></div>");

	for(i=1;i<=max.length;i++){

		var txt = max[i-1].src;

		var lastIndex = txt.lastIndexOf("_");

		if(num == i)

		{

			if(txt.substring(lastIndex+1) != '.gif'){



				document.getElementById("faq"+i).style.display = "block";

				max[i-1].src = max[i-1].src.replace(".gif","_.gif");

			}

				document.getElementById("faq"+i).style.display = "block";



		}else {

			max[i-1].src = max[i-1].src.replace("_.gif",".gif");

			document.getElementById("faq"+i).style.display = "none";

		}

	}



}







/* 탭이미지 바꾸기 */

function idrsrc2(obj,num){

var max = document.getElementsByName("idrimage");

for(i=1;i<=max.length;i++){

	if (num != i){

		document.getElementById("tabcon"+(i)).style.display = "none";

		document.all['tab'.concat(i)].className = "picOf";

		max[i-1].src = max[i-1].src.replace("_.gif",".gif");

	}else{

		document.getElementById("tabcon"+(i)).style.display = "block";

		if(document.all['tab'.concat(i)].className != "picOn"){

			document.all['tab'.concat(i)].className = "picOn";

			max[i-1].src = max[i-1].src.replace(".gif","_.gif");

		}

	}

	}

}







//특정영역 인쇄---------

function printDiv () {

    window.onbeforeprint = beforeDivs;
    window.onafterprint = afterDivs;

    window.print();
}

function beforeDivs () {

  if (document.all) {

    objContents.style.display = 'none';



    objSelection.innerHTML = document.all['print_contents'].innerHTML; // 이곳에서 ID를 지정

  }

}

function afterDivs () {

  if (document.all) {

    objContents.style.display = 'block';



    objSelection.innerHTML = "";

  }

}

//---------특정영역 인쇄



//특정이미지 인쇄---------

function printimg(url) {

	var newwindow = window.open(url, "printsrc", "status=no,toolbar=no,scrollbars=no,resizable=no,menubar=no,width=20,height=20");

	newwindow.print()

	newwindow.blur()

}

//---------특정이미지 인쇄



/* 레이어보이기 감추기 */

function layerView(id, num) {

	obj_C = document.getElementById(id);

	if( num == 1 ){

		obj_C.style.display="block";

	}else if(num == 2){

		obj_C.style.display="none";

	}



	iframe_init();

}



/*IFRAME 자동리사이징*/

function iframe_init(){

	var doc = document.getElementById("ifr_id");

	doc.style.top=0;

	doc.style.left=0;

	if(doc.offsetHeight == 0){

	} else {

	pageheight = doc.offsetHeight;

	pagewidth = doc.offsetWidth;

	parent.document.getElementById("frame_id").height = pageheight;

	}

}



function iframe_init2(num){

  ifr="ifr_"+num;

  fra="frame_"+num;

	var doc = document.getElementById(ifr);

	doc.style.top=0;

	doc.style.left=0;

	if(doc.offsetHeight == 0){

	} else {

	pageheight = doc.offsetHeight;

	pagewidth = doc.offsetWidth;

	try{

		parent.frames[fra].resizeTo(pagewidth,pageheight);

	}catch(e){}

	}

}



// 플래쉬와 자바스립트 연동 form

document.write("<form name=\"__flashSearchForm\" method=\"post\">");

document.write("<input type=\"hidden\" name=\"__search_query\">");

document.write("</form>");



/** FTP 파일 다운로드 form */

document.write("<form name=\"__frmDirectDown\" method=\"post\">");

document.write("<input type=\"hidden\" name=\"f_path\">");

document.write("</form>");

document.write("<iframe name=\"__iframeDirectFileDown\" style=\"width:0px;height:0px\" frameborder=\"0\" src=\"/blank.html\"></iframe>");



/** FTP 파일 다운로드 */

function __fnDirectFileDown(path)

{

	var oFrm = document.__frmDirectDown;

	oFrm.f_path.value = path;

	oFrm.action = CONST_FILE_DIRECT_DOWNLOAD_URL;

	oFrm.target = "__iframeDirectFileDown";

	oFrm.submit();

}



/** 서치 **/

function f_search(param) {

		today = new Date();





		this_year   = today.getYear();

		this_month  = today.getMonth()+1;

		if(this_month <10){

			this_month="0" + this_month;

		}

        this_hour   = today.getHours();

        this_min    = today.getMinutes();

        this_second = today.getSeconds();



		this_day=today.getDate();



		if(this_day<10){

			this_day="0" + this_day;

		}



		if(this_hour<10){

			this_hour="0" + this_hour;

		}

		if(this_min<10){

			this_min="0" + this_min;

		}



		if(this_second<10){

			this_second="0" + this_second;

		}



   this_day1 = this_year +""+  this_month +""+ this_day +""+ this_hour  +""+ this_min +""+ this_second;





    if((this_day1 > '20100723000000' )&&( this_day1 < '20100723020000')){

     alert('This service is temporarily unavailable. Please try again after a few minutes.');

    }else{



		var form = document.__flashSearchForm;

		form.__search_query.value = param;

		form.action = CONST_SITE_URL+"/eng/jsp/search/Search.jsp";

		form.submit();

		}

}





/* 2010-01-19 이환 추가 [/2010mwc.html 전용] */

function over_show(tar, obj){

	var tarid = document.getElementById(tar);

	var objid = document.getElementById(obj);

	objid.style.display = 'none';

	tarid.onmouseover = function(){

		objid.style.display = 'block';

	}

	tarid.onmouseout = function(){

		objid.style.display = 'none';

	}

	objid.onmouseout = function(){

		this.style.display = 'none';

	}

}

function tab_view(obj, num){

	var total = document.getElementById(obj).getElementsByTagName('li');

	for(var i=1; i<=total.length; i++){

		var srcname = total[i-1].getElementsByTagName('img')[0].src;

		var lastIndex = srcname.lastIndexOf("_");

		if(i == num){

			if(srcname.substring(lastIndex+1) != '.gif'){

				total[num-1].getElementsByTagName('img')[0].src = total[num-1].getElementsByTagName('img')[0].src.replace(".gif","_.gif");

				total[num-1].className = 'on';

				document.getElementById(obj+num).style.display = 'block';

			}

		}else{

			total[i-1].getElementsByTagName('img')[0].src = total[i-1].getElementsByTagName('img')[0].src.replace("_.gif",".gif");

			total[i-1].className = '';

			document.getElementById(obj+i).style.display = 'none';

		}

	}

}

function f_mainNews(rk,seq) {
//	f_logAboutSkt('C11');
	var form = document.__flashMainNews;
	form.f_rk.value = rk;
	form.f_reportdata_seq.value = seq;
//	form.action = "/jsp/tlounge/mediacenter/MediaCenterDetail.jsp?menucode=C1" ;
	form.action = "/eng/jsp/n_prcenter/PressReleasesView.jsp" ;
	form.submit();
}

document.write("<form name=\"__flashMainNews\" method=\"post\">");
document.write("<input type=\"hidden\" name=\"f_rk\">");
document.write("<input type=\"hidden\" name=\"f_reportdata_seq\">");
document.write("</form>");

