/* ÇÃ·¡½Ã start */
//<![CDATA[
function Flash(id,url,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=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='sameDomain' />\
<param name='quality' value='high' />\
<param name='menu' value='false' />\
<embed src="+url+" wmode="+t+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />\
</object>\
");
}
//]]>

function file_upload(){
obj = document.getElementById("file").value;
 document.getElementById("text").value = obj;
}

function faq_view(num){
	var title = document.getElementById("q_title"+num).getElementsByTagName("td");
	alert(title.length);
}

//¿ìÆí¹øÈ£
function find_layer(mode, nic){
	if(mode=="show"){
		if(nic=="zip_code"){document.getElementById("zip_code").style.display="block";}
		else if(nic=="photo_box"){window.open('/recruit/find_photo.shn','','width=399,height=120,menubar=0,resizable=0,top=500, left=500,scrollbars=0');}
		else if(nic=="rule_id"){document.getElementById("rule_id").style.display="block";}
		else if(nic=="all_menu"){document.getElementById("all_menu").style.display="block";find_layer('hide','rel_company');}
		else if(nic=="rel_company"){document.getElementById("rel_company").style.display="block";find_layer('hide','all_menu');}
	}
	else if(mode=="hide"){
		if(nic=="zip_code"){document.getElementById("zip_code").style.display="none";}
		else if(nic=="photo_box"){self.close();}
		else if(nic=="rule_id"){document.getElementById("rule_id").style.display="none";}
		else if(nic=="certificate_box"){document.getElementById("certificate_box").style.display="none";}
		else if(nic=="all_menu"){document.getElementById("all_menu").style.display="none";}
		else if(nic=="rel_company"){document.getElementById("rel_company").style.display="none";}
		
	}
}
function trim(txt){return txt.replace(/(^\s*)|(\s*$)/g, "");}

function FileCheck(obj){
	 if (!obj.value.match(/.jpg|.jpeg|.PPT|.ppt|.gif|.JPG|.JPEG|.GIF|.zip|.rar|.xls|.xlsx|.pdf|.PDF|.pptx|.txt|.TXT|.hwp|.HWP|.doc|.DOC|.docx$/i)){
	  alert("Çã¿ëÇÏÁö ¾Ê´Â ÆÄÀÏ ÀÔ´Ï´Ù.");
	  obj.outerHTML = obj.outerHTML;
	  return;
	 }
}

function imgFileCheck(obj){
	 if (!obj.value.match(/.jpg|.jpeg|.PPT|.ppt|.gif|.JPG|.JPEG|.GIF$/i)){
	  alert("Çã¿ëÇÏÁö ¾Ê´Â ÆÄÀÏ ÀÔ´Ï´Ù.");
	  obj.outerHTML = obj.outerHTML;
	  return;
	 }
}

//ÆÐ¹Ð¸®»çÀÌÆ®
	var over =0;
		function go_site(url){
			var obj = document.getElementById("site_id");
			obj.style.display="block";
		try{
			if(url!=0){
				window.open(url,'_blank');
				obj.style.display="none";
			}
			else{}
		}catch(e){
			alert("¿À·ù:"+e);
		}
	}

	//ÆÐ¹Ð¸®»çÀÌÆ® °ü·Ã
	function sel_out(num){
		over = over + num;
		val = over % 2;
			if(val==1){
				document.getElementById("site_id").style.display="block";
			}
			else if(val==0){
				document.getElementById("site_id").style.display="none";
			}
	}

	/* ÇÃ·¡½Ã ÅÇ */
	function biz_swf(num, tot){
		for(i=1;i<= tot ;i++){
			if(i==num){
				document.getElementById("tab_con"+num).style.display="block";
			}
			else if(i!=num){
				document.getElementById("tab_con"+i).style.display="none";
			}
		}
	}

	// ÅÇ¸Þ´º °øÅë
	function tab_menu(num, tot, name){
		var img1, img2;
		for(i=1;i<= tot ;i++){
			if(i==num){
				document.getElementById(name+num).src="/images/tab/"+name+"_tab"+num+"_on.gif";
				document.getElementById("tab"+num).style.display="block";
			}
			else if(i!=num){
				document.getElementById(name+i).src="/images/tab/"+name+"_tab"+i+"_off.gif";
				document.getElementById("tab"+i).style.display="none";
			}
		}
		if(name=="ceo"){
			document.getElementById("ceo_phto").src="/images/company/ceo_photo"+num+".jpg";
			document.getElementById("content").style.backgroundImage="none";
		}
	}

function selectBox(obj){
	if(obj.selectedIndex>0)
	{
		url =obj.options[obj.selectedIndex].value;
		window.open(url, '','')
	}
}

function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = 1000;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
		obj.style.left = obj.left + "px";
	}, 30)
}
function InitializeStaticMenu(){initMoving(document.getElementById("quick"), 1, 0, 0);}
function Media_Load(Url)
{
	document.write('<br><OBJECT id="WMPlayer" style="WIDTH: 600px; HEIGHT: 500px" codeBase="https://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" type="application/x-oleobject" standby="Loading Microsoft Windows Media Player components..." classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="MsPlayer" VIEWASTEXT><PARAM NAME="URL" VALUE="'+Url+'"><PARAM NAME="rate" VALUE="1"><PARAM NAME="balance" VALUE="0"><PARAM NAME="currentPosition" VALUE="0"><PARAM NAME="defaultFrame" VALUE="content"><PARAM NAME="playCount" VALUE="1"><PARAM NAME="autoStart" VALUE="-1"><PARAM NAME="currentMarker" VALUE="0"><PARAM NAME="invokeURLs" VALUE="-1"><PARAM NAME="baseURL" VALUE=""><PARAM NAME="volume" VALUE="50"><PARAM NAME="mute" VALUE="0"><PARAM NAME="uiMode" VALUE="full"><PARAM NAME="stretchToFit" VALUE="-1"><PARAM NAME="windowlessVideo" VALUE="0"><PARAM NAME="enabled" VALUE="-1"><PARAM NAME="enableContextMenu" VALUE="-1"><PARAM NAME="fullScreen" VALUE="0"><PARAM NAME="SAMIStyle" VALUE=""><PARAM NAME="SAMILang" VALUE=""><PARAM NAME="SAMIFilename" VALUE=""><PARAM NAME="captioningID" VALUE=""><PARAM NAME="enableErrorDialogs" VALUE="0"><PARAM NAME="_cx" VALUE="8440"><PARAM NAME="_cy" VALUE="5980"></OBJECT><br>');
}

