// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';

	function BrowserCheck() {
	appname = navigator.appName;
	useragent = navigator.userAgent;
	 if(appname == "Microsoft Internet Explorer") appname = "IE";
	 IE55 = (useragent.indexOf('MSIE 5.5')>0);  //5.5 ¹öÀü
	 IE6 = (useragent.indexOf('MSIE 6')>0);     //6.0 ¹öÀü

	 if(appname=="IE" && IE55 || IE6) vars = 'ieVer=6'; //ÀÍ½ºÇÃ·Î·¯ÀÌ¸é¼­ 5.5 or 6.0 ¹öÀüÀÌ¸é...
	 else vars= 'ieVer=7';
	}
	//onload=BrowserCheck;




	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowFullScreen' value='true' />";
		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
		flashStr+="		<param name='base' value='.' />";
		
	
	
		flashStr+="		<embed base='.'src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       allowFullScreen='true'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}

function tbctrl(idx, type)
{
	if (type=='on')
	{
		document.getElementById("tpb_"+idx).style.backgroundPosition = "0% 100%";
	}
	else
	{
		document.getElementById("tpb_"+idx).style.backgroundPosition = "0% 0%";
	}
}

function handleCtrl(type)
{
	var handle = document.getElementById("scrollHandle");
	/*
	if (type=='on')
	{
		handle.style.width="3px";
		handle.style.padding="0 16px 0 16px";
		handle.src="../images/img_scrollhandle.jpg"
	}
	else
	{
		handle.style.width="51px";
		handle.style.padding="0px";
		handle.src="../images/ico_scroll.png"
	}
	*/
}

function naviON()
{
	//alert("naviON");
	//top.document.getElementById("fix").style.border = "1px solid red";
	top.document.getElementById('fix').style.zIndex = '9999';
	top.document.getElementById("fix").style.height = "370px";
}
function naviOFF()
{
	//alert("naviOFF");
	top.document.getElementById("fix").style.height = "85px";
}


function mainLink(idx1,idx2)
{
	//alert("¸ÞÀÎ:"+idx1+"¼­ºê:"+idx2);
	mClick(idx1,idx2);
}

function mClick(idx1,idx2)
{
	top.thisMovie("index").mClick(idx1,idx2);
}
function thisMovie(idx)
{
	return top.document[idx];
}
function skip()
{
	document.getElementById("fix").style.display="block";
}

function mvUnit(type,idx)
{
	if (type=='on')
	{
		top.document.getElementById('unitcts').style.display = 'block';
		if (idx==1)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/mv_use_tip.asp'; //µ¿¿µ»óÈ°¿ëÆÁ
		}
		else if (idx==2)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/txt_use_tip.asp'; //ÅØ½ºÆ®È°¿ëÆÁ
		}
		else if (idx==3)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/apps_use.asp'; //¾Û½º¸®ºä
		}
		else if (idx==4)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/notice.asp'; //°øÁö»çÇ×
		}
		else if (idx==5)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/faq.asp'; //FAQ
		}
		else if (idx==6)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/service_center.asp'; //¼­ºñ½º¼¾ÅÍ
		}
		else if (idx==7)
		{
			top.unit.location.href = 'http://www.adminxperia.co.kr/x10/unit/download.asp'; //´Ù¿î·Îµå
		}
		else if (idx==8)
		{
			//top.document.getElementById('unitcts').style.display = 'none';
			top.window.open("http://sonyericsson.diocean.co.kr/cscenter_01.asp"); //X1 CS¼¾ÅÍ
		}
	}
	else
	{
		top.document.getElementById('unitcts').style.display = 'none';
		top.unit.location.href = 'unit/blank.html';
	}
}

function usetip(idx)
{
	if (idx==1)
	{
		top.unit.location.href = 'http://awww.adminxperia.co.kr/x10/mv_use_tip.asp'; //µ¿¿µ»óÈ°¿ëÆÁ
	}
	else if (idx==2)
	{
		top.unit.location.href = 'http://www.adminxperia.co.kr/x10/txt_use_tip.asp'; //ÅØ½ºÆ® È°¿ëÆÁ
	}
	else if (idx==3)
	{
		top.unit.location.href = 'http://www.adminxperia.co.kr/x10/apps_use.asp'; //¾Û½º¸®ºä
	}
}

//·¹ÀÌ¾î¹è°æ opacity
function layer_bg(idx)
{
	var h = document.body.scrollHeight;
	var w = document.body.scrollWidth;
	if (idx==1)
	{
		document.getElementById('layer_bg').style.height=h;
		document.getElementById('layer_bg').style.display="block";
		document.getElementById('layer_bg').style.zIndex = '8000';
		//child.select_hidden(1);
	}
	else if (idx==0)
	{
		document.getElementById('layer_bg').style.display = 'none';
		//child.select_hidden(0);
	}
}

//·Î±×ÀÎ ¿­±â
function pop_login_open()
{
	//document.getElementById('pop_login').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 412;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_login.asp','pop_login','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//·Î±×ÀÎ ´Ý±â
function pop_login_close()
{
	//document.getElementById('pop_login').style.display = 'none';
	//layer_bg(0);
}

//ºñ¹ø ¿­±â
function pop_srch_pw_open()
{
	//document.getElementById('pop_srch_pw').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 412;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_search_pw.asp','pop_search_pw','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//ºñ¹ø ´Ý±â
function pop_srch_pw_close()
{
	//document.getElementById('pop_srch_pw').style.display = 'none';
	//layer_bg(0);
}

//¾ÆÀÌµð ¿­±â
function pop_srch_id_open()
{
	//document.getElementById('pop_srch_id').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 412;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_search_id.asp','pop_search_id','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//¾ÆÀÌµð ´Ý±â
function pop_srch_id_close()
{
	//document.getElementById('pop_srch_id').style.display = 'none';
	//layer_bg(0);
}

//È¸¿ø°¡ÀÔ ¿­±â
function pop_join_open()
{
	//document.getElementById('pop_join').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 851;
	var h = 652;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_join.asp','pop_join','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//È¸¿ø°¡ÀÔ ´Ý±â
function pop_join_close()
{
	//document.getElementById('pop_join').style.display = 'none';
	//layer_bg(0);
}

//È¸¿ø°¡ÀÔ¿Ï·á ¿­±â
function pop_join_result_open(name)
{
	//document.getElementById('pop_join_result').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 273;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_join_result.asp?name='+name,'pop_join_result','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//È¸¿ø°¡ÀÔ¿Ï·á ´Ý±â
function pop_join_result_close()
{
	//document.getElementById('pop_join_result').style.display = 'none';
	//layer_bg(0);
}

//¿ìÆí¹øÈ£Ã£±â ¿­±â
function open_zipcord(idx)
{
	var winFocus;
	var w = 337;
	var h = 384;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('pop_search_zipcord.html','NewWin','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}


//È¸¿øÁ¤º¸¼öÁ¤ ¿­±â
function pop_modify_open()
{
	//document.getElementById('pop_modify').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 489;
	var h = 645;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_modify.asp','pop_modify','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();

}

//È¸¿øÁ¤º¸¼öÁ¤ ´Ý±â
function pop_modify_close()
{
	//document.getElementById('pop_modify').style.display = 'none';
	//layer_bg(0);
}

//È¸¿øÅ»Åð ¿­±â
function pop_withdrew_open()
{
	//document.getElementById('pop_withdrew').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 422;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_withdrew.asp','pop_withdrew','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//È¸¿øÅ»Åð ´Ý±â
function pop_withdrew_close()
{
	//document.getElementById('pop_withdrew').style.display = 'none';
	//layer_bg(0);
}

//½Ã¸®¾óÀÔ·Â ¿­±â
function pop_serial_open()
{
	//alert("23ÀÏ 00½Ã ºÎÅÍ Âü¿©°¡´ÉÇÕ´Ï´Ù");
	document.getElementById('pop_serial').style.display = 'block';
	document.getElementById('pop_serial').style.zIndex = '9999';
	document.serial.location.href = 'http://www.adminxperia.co.kr/x10/unit/pop_serial.asp';
	layer_bg(1);
}

//½Ã¸®¾óÀÔ·Â ´Ý±â
function pop_serial_close()
{
	document.getElementById('pop_serial').style.display = 'none';
	document.serial.location.href = 'http://www.sonyericsson.com/kr/xperia/blank.html';
	layer_bg(0);
}

//½Ã¸®¾óÀÔ·Â¹æ¹ý ¿­±â
function pop_tutorial_open()
{
	document.getElementById('pop_tutorial').style.display = 'block';
	document.getElementById('pop_tutorial').style.zIndex = '9999';
	document.tutorial.location.href = 'http://adminxperia.diocean.co.kr/x10/unit/pop_tutorial.html';
	layer_bg(1);
}

//½Ã¸®¾óÀÔ·Â¹æ¹ý ´Ý±â
function pop_tutorial_close()
{
	document.getElementById('pop_tutorial').style.display = 'none';
	document.tutorial.location.href = 'http://www.sonyericsson.com/kr/xperia/blank.html';
	layer_bg(0);
}


//IDÃ£±â°á°ú ¿­±â
function pop_id_result_open()
{
	//document.getElementById('pop_id_result').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 234;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_id_result.asp','pop_id_result','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//IDÃ£±â°á°ú ´Ý±â
function pop_id_result_close()
{
	//document.getElementById('pop_id_result').style.display = 'none';
	//layer_bg(0);
}

//ºñ¹øÃ£±â°á°ú ¿­±â
function pop_pw_result_open()
{
	//document.getElementById('pop_pw_result').style.display = 'block';
	//layer_bg(1);
	var winFocus;
	var w = 412;
	var h = 234;

	var winl = screen.availWidth/2-w/2;
	var wint = screen.availHeight/2-h/2;

	winFocus = window.open('https://www.adminxperia.co.kr/x10/unit/pop_pw_result.asp','pop_pw_result','left='+winl+', top='+wint+', width='+w+', height='+h+',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,toolbars=no');
	winFocus.focus();
}

//ºñ¹øÃ£±â°á°ú ´Ý±â
function pop_pw_result_close()
{
	//document.getElementById('pop_pw_result').style.display = 'none';
	//layer_bg(0);
}


//¿µ»óÇÃ·¹ÀÌ¾î
function player(type,videoid)
{
	if (type=='on')
	{
		document.player.location.href="unit/pop_player.asp?videoid="+videoid;
		document.getElementById('mvPlayer').style.display = 'block';
		document.getElementById('mvPlayer').style.zIndex = '9999';
		layer_bg(1);
	}
	else
	{
		document.getElementById('mvPlayer').style.display = 'none';
		top.document.player.location.href="unit/blank.html";
		layer_bg(0);
	}
}

//monsterÇÃ·¡½Ã È£Ãâ
function monsterswf(url, w, h, vars, win)
{
	var id = url.split("/")[url.split("/").length-1].split(".")[0];
	if(vars == null) vars='';
	if(win == null) win='transparent';

	var objwrite = "<object ";

	if(navigator.appName.match("Internet Explorer"))
	{
		objwrite += "classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
	}
	else
	{
		objwrite += "type='application/x-shockwave-flash' data='"+url+"' ";
	}

	objwrite +="     id='"+id+"' style='width:"+w+"px; height:"+h+"px;'>";
	objwrite +="    <param name='base' value='.' />";
	objwrite+= "    <param name='showLiveConnect' value='true' />";
	objwrite +="    <param name='allowScriptAccess' value='always' />";
	objwrite +="    <param name='movie' value='"+url+"' />";
	objwrite +="    <param name='FlashVars' value='"+vars+"' />";
	objwrite +="    <param name='wmode' value='"+win+"' />";
	objwrite +="    <param name='menu' value='false' />";
	objwrite +="    <param name='quality' value='high' />";
	objwrite +="  </object>";

	return objwrite;
}

function monsterFunc(type,idx)
{
	//alert(type);
	var container = document.getElementById("mosnterUI");
	if (type=='on')
	{
		layer_bg(1);
		if (idx==1)
		{
			document.getElementById("mosnterUIWrap").style.display = "block";
			container.innerHTML = monsterswf('swf/monster_01_Time_Scape_UI.swf','1200','800','','transparent');
		}
		else if (idx==2)
		{
			document.getElementById("mosnterUIWrap").style.display = "block";
			container.innerHTML = monsterswf('swf/monster_02_Media_Scape_UI.swf','1200','800','','transparent');
		}
		else if (idx==3)
		{
			document.getElementById("mosnterUIWrap").style.display = "block";
			container.innerHTML = monsterswf('swf/monster_03_Infinite_time_UI.swf','1200','800','','transparent');
		}
		else if (idx==4)
		{
			document.getElementById("mosnterUIWrap").style.display = "block";
			container.innerHTML = monsterswf('swf/monster_03_Infinite_media_UI.swf','1200','800','','transparent');
		}
		else if (idx==5)
		{
			document.getElementById("mosnterUIWrap").style.display = "block";
			container.innerHTML = monsterswf('swf/monster_04_Applications_UI.swf','1200','800','','transparent');
		}
		else if (idx==6)
		{
			document.getElementById("monsterSpec").style.visibility = "visible";
		}
	}
	else
	{
		document.getElementById("mosnterUIWrap").style.display = "none";
		container.innerHTML=" ";
		layer_bg(0);
	}
}

function closeSpec()
{
	layer_bg(0);
	document.getElementById("monsterSpec").style.visibility = "hidden";
}

//entÇÃ·¹ÀÌ¾î
function entplayer(type,url,downurl,idx)
{
	var container = document.getElementById("mvWrap");
	//alert("181818181818189");

	if (type=='on')
	{		
		//alert("181818181818189");
		//document.player.location.href="unit/pop_player.html";
		document.view_count.location="http://www.adminxperia.co.kr/view_count.asp?idx="+idx;
		layer_bg(1);
		document.getElementById('entpop').style.display = 'block';
		container.innerHTML = monsterswf('swf/mvplayer.swf?mvURL='+url+'&downURL='+downurl+'&idx='+idx,'374','342','','','transparent');
		//alert("url : "+url+", downurl : "+downurl);
	}
	else
	{
		document.getElementById('entpop').style.display = 'none';
		//top.document.player.location.href="unit/blank.html";
		container.innerHTML="";
		layer_bg(0);
	}
}



// 2010-07-13 Ãß°¡

//´çÃ·ÀÚÆË¾÷ ¿­±â
function pop_evt_result_open()
{
	document.getElementById('pop_evt_result').style.display = 'block';
	document.getElementById('pop_evt_result').style.zIndex = '9999';
	layer_bg(1);
}

//´çÃ·ÀÚÆË¾÷ ´Ý±â
function pop_evt_result_close()
{
	document.getElementById('pop_evt_result').style.display = 'none';
	layer_bg(0);
}



// 2010-07-20 Ãß°¡

//½Ã¸®¾óÀÔ·Â ¿­±â
function pop_serial_2_open()
{
	document.getElementById('pop_serial_2').style.display = 'block';
	document.getElementById('pop_serial_2').style.zIndex = '9999';
	document.serial_2.location.href = 'http://www.adminxperia.co.kr/x10/unit/pop_serial_2.asp';
	layer_bg(1);
}

//½Ã¸®¾óÀÔ·Â ´Ý±â
function pop_serial_2_close()
{
	document.getElementById('pop_serial_2').style.display = 'none';
	document.serial_2.location.href = 'http://www.adminxperia.co.kr/x10/unit/blank.html';
	layer_bg(0);
}

//½Ã¸®¾óÀÔ·Â¹æ¹ý ¿­±â
function pop_tutorial_2_open()
{
	document.getElementById('pop_tutorial_2').style.display = 'block';
	document.getElementById('pop_tutorial_2').style.zIndex = '9999';
	document.tutorial_2.location.href = 'http://www.adminxperia.co.kr/x10/unit/pop_tutorial_2.html';
	layer_bg(1);
}

//½Ã¸®¾óÀÔ·Â¹æ¹ý ´Ý±â
function pop_tutorial_2_close()
{
	document.getElementById('pop_tutorial_2').style.display = 'none';
	document.tutorial_2.location.href = 'http://www.adminxperia.co.kr/x10/unit/blank.html';
	layer_bg(0);
}

//¼³¹®Á¶»ç ¿­±â
function pop_survey_open(gubunnum,mnb)
{
	document.getElementById('pop_survey').style.display = 'block';
	document.getElementById('pop_survey').style.zIndex = '9999';
	document.survey.location.href = 'http://www.adminxperia.co.kr/x10/unit/pop_survey.asp?gubunnum='+gubunnum+'&mnb='+mnb;
	layer_bg(1);
}

//¼³¹®Á¶»ç ´Ý±â
function pop_survey_close()
{
	document.getElementById('pop_survey').style.display = 'none';
	document.survey.location.href = 'http://www.adminxperia.co.kr/x10/unit/blank.html';
	layer_bg(0);
}
