/***************************************
* Flash Function(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
***************************************/

//object ÆÄÀÏ ÆÐÄ¡ ´ëºñ 
var paramInfo = new Array;

function initParam(){
  var oldSize = paramInfo.length;

	for (var i=0; i<oldSize; i++) {
		paramInfo.length--;
	}	
}
function setParam(paramName, paramValue){
	var idx = paramInfo.length;

	paramInfo[idx] = [];
	paramInfo[idx][0] = paramName;  
	paramInfo[idx][1]= paramValue;
}

function flashWrite(url,w,h,id,bg,vars,win){
var flashStr=
"<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='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
"<param name='allowScriptAccess' value='always' />"+
"<param name='movie' value='"+url+"' />"+
"<param name='FlashVars' value='"+vars+"' />"+
"<param name='wmode' value='"+win+"' />"+
"<param name='menu' value='false' />"+
"<param name='quality' value='high' />"+
"<param name='bgcolor' value='"+bg+"' />"+
"<param name='base' value='.'>"+

"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' qinitTabMenu uality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/etflashplayer' />"+
"</object>";
document.write(flashStr);
}

/*Main-flash*/
function mainFlashObject(flash_src,mheight,flash_id){
	flashStr_main = "<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='100%' height='"+mheight+"' id='"+flash_id+"' align='middle' />"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+flash_src+"' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='' />"+
	"<param name='wmode' value='transparent' />"+
	"<param name='menu' value='false' />"+
	"<embed src='"+flash_src+"' quality='high' bgcolor='' width='100%' height='"+mheight+"' name='"+flash_id+"' align='middle' wmode='transparent' allowscriptaccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	document.write(flashStr_main);
}

/***************************************
* IMAGE_ROLLOVER
***************************************/
function menuOn(imgEl)
{
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

function goMenu(Val,Sel)
{
	Sel.value = '';
	if (Val) location=Val;

}

// Tab Content
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}

			this.targetEl.style.display = "block";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}
function tabSwap(sw) {  // ¼±ÅÃÇÏ¸é ¹Ù²î´Â ·¹ÀÌ¾î
	for (i = 1; i < 3; i++) {
		if (sw == i) {		
			document.getElementById('cont_tab0'+i).style.display='';
		} else {
			document.getElementById('cont_tab0'+i).style.display='none';
		}
	}
}

/* open WIN*/	
function openWin(theURL,winName,features) { //v2.0
	 window.open(theURL,winName,features);
}

/* Åõ¸í png Ä¡È¯ */
function setPng24(obj,switche) {
	//aa = document.getElementById(obj).className;
	//alert(aa);
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');

	obj.style.filter ="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='';
	return '';
}


function Change (target,type){  // ±âº» value°ªÀ» Å¬¸¯ÇÏ¸é »ç¶óÁö°Ô 
	if ( target.value == target.defaultValue && type==0) target.value = ''; 
	if ( !target.value && type==1) target.value = target.defaultValue; 
}

/***************************************
*  Áö³­ÀÌº¥Æ® º¸±â	
***************************************/
function Show_eventend() {
	document.getElementById('eventend').style.display = "block";
}
function Showlayer() {
	document.getElementById('Showlayer').style.display = "block";
}

/***************************************
* Search Service	
***************************************/
function Show_ss() {
	document.getElementById('ss').style.display = "block";
}
function Close_ss(){
	document.getElementById('ss').style.display = "none";
}

/***************************************
* Product View
***************************************/
function Show_product(val) {
	document.getElementById('product').style.display = "block";
	vl="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='1077' height='690' id='' align='middle'><param name='allowScriptAccess' value='always' /><param name='allowFullScreen' value='false' /><param name='movie' value='/common/flash/product_detail.swf?code="+val+"' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><embed src='/common/flash/product_detail.swf?code="+val+"' quality='high' wmode='transparent' width='1077' height='690' name='' align='middle' allowScriptAccess='always' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>";
	alert(vl);
	document.getElementById('product_box').innerHTML = vl;
}
function Close_product(){
	document.getElementById('product').style.display = "none";
}

/***************************************
* ÀüÃ¼ ¸Þ´º º¸±â
***************************************/
function Show_wmenu() {
	document.getElementById('wmenu').style.display = "block";
	var ele = document.all;
	for (var i = 0; i < ele.length; i++) {
		if (ele[i].tagName == "SELECT") {
			ele[i].style.display = "none";
		}
	}
}
function Close_wmenu() {
	document.getElementById('wmenu').style.display = "none";
	var ele = document.all;
	for (var i = 0; i < ele.length; i++) {
		if (ele[i].tagName == "SELECT") {
			ele[i].style.display = "";
		}
	}
}

/***************************************
* ÆäÀÌÁö ³ôÀÌ°ª
***************************************/
function page_height() {
	var ph="";

	if(screen.height <= 768) {
		ph=500;
	} else if (screen.height <= 1024){
		ph=500;
	} else if (screen.height <= 1200){
		ph=680;
	} else{
		ph=900;
	}
	var pheightStr="<style type='text/css'>#contents{min-height:"+ph+"px;}* html #contents{height:"+ph+"px;}</style>"
	document.write(pheightStr);
}

/***************************************
* FAQ
***************************************/
function Show_FAQ(curr) {
	for(i=1;i<19;i++){
		faqObj = document.getElementById('faq_txt'+i);
		
		if(curr==i){
			faqObj.style.display = "block";
		}else{
			faqObj.style.display = "none";
		}
	}
}

/***************************************
*  ÄûÁîÆË¾÷ Á¤´äº¸±â
***************************************/
function quiz(val) {
	obj = document.getElementById('a'+val);
	img = document.getElementById('a_btn'+val);

	obj.style.display = "block";
	img.src = "/images/common/btn/btnp_quiz_on.gif";

}

/***************************************
*  µ¿¿µ»óÁ¸
***************************************/
function playIt(PyrId){
	if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) {
		document.getElementById(PyrId).Play();
	}
}
function pauseIt(PyrId){
	if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) {
		document.getElementById(PyrId).pause();
	} 
}
function stopIt(PyrId){
	if ((navigator.userAgent.indexOf('IE') > -1) && (navigator.platform == "Win32")) {
		document.getElementById(PyrId).Stop();
		document.getElementById(PyrId).CurrentPosition=0;
	} 
}
function Wmv_View(URL,SizeX,SizeY,Flag,Astr,PyrId)
{
	document.write('<object id="'+PyrId+'" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft?Windows?Media Player components..." type="application/x-oleobject" ' );
	document.write(' width="'+SizeX+'" height="'+SizeY+'" >');
	document.write('	<param name="transparentAtStart" value="True" />'	);
	document.write('	<param name="transparentAtStop" value="True" />'	);
	document.write('	<param name="AnimationAtStart" value="False" />'	);
	if ( Astr == null || Astr != 'F' ) {
		document.write('	<param name="AutoStart" value="true" />'	);
	} else {
		document.write('	<param name="AutoStart" value="false" />'	);
	}
	document.write('	<param name="AutoRewind" value="true" />'	);
	document.write('	<param name="DisplaySize" value="0" />'	);
	document.write('	<param name="AutoSize" value="false" />'	);
	document.write('	<param name="ShowDisplay" value="false" />'	);
	document.write('	<param name="ShowStatusBar" value="false" />'	);
	if ( Flag == null || Flag != 'F' ) {
		document.write('	<param name="ShowControls" value="true" />'	);
	} else {
		document.write('	<param name="ShowControls" value="false" />'	);
	}
	document.write('	<param name="EnableContextMenu" value="False" />'	);
	document.write('	<param name="FileName" value="'+URL+'" />'	);
	document.write('	<param name="Volume" value="0" />'	);
	document.write('	<embed src="'+URL+'"  displaysize=0 showcontrols=0 autostart=0 '	);
	document.write('	width="'+SizeX+'" height="'+SizeY+'"name="'+PyrId+'" '	);
	document.write('	type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" />');
	document.write('	</embed></object>	'	);
}

function infocus(obj){
	obj.focus();
}
/***************************************
* ÄÁÅÙÃ÷ ÆäÀÌÁö ¸µÅ©
***************************************/
function pop_careers(){ //CAREERS - Apply Online
	window.open("/careers/pop_careers.jsp", "pop_careers", "scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=600,height=430");
} 
function pop_movie(){ //µ¿¿µ»óº¸±â
	window.open("/pop_movie.jsp", "pop_movie", "scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=476,height=422");
} 