//ÀÌ¹ÌÁöÁÜ
function TechImageZoom(obj){
	window.open("/tech/pop_zoom.asp?ImgName="+obj,"ImgZoom","left=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=200, height=200");
}
function ShowLayerPop(obj)
{
	var layerName = obj;
	document.getElementById(layerName).style.display = "block";
}
function HiddenLayerPop(obj)
{
	var layerName = obj;
	document.getElementById(layerName).style.display = "none";
}


//PNG
function setPng24(obj) {
	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 SwfView(URL,SizeX,SizeY,LnkId,Frm,Flag)
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('	width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('	<param name="movie"     value="'+URL+'" />');
    document.write('	<param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('	<param name="wmode" value="transparent"/>');
    }
	document.write('	<param name="allowScriptAccess" value="always"/> ');
	document.write('	<param name="base" value="." />');
    document.write('	<embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'" align="middle" ');
	 if ( Flag == null || Flag != 'N' )
    {
        document.write(' wmode="transparent" ');
    }
    document.write('	type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />'   );
    document.write('</embed></object>');
	
	if ( Frm == 'Y' ) {
		eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
	}
}

function menuOpen()
{
	//eval("gnb").style.display = "block";
	//document.all['gnb'].style.height = 300;
	//document.all['gnb'].focus();
 }
function menuClose()
{
	//eval("gnb").style.display = "block"; 
	//document.all['gnb'].style.height = 105;
}


//¼ýÀÚÀÔ·ÂÃ¼Å©
function isNumber(inputName) 
{ 
	var chars = "0123456789"; 
	return containsCharsOnly(inputName,chars); 
}	
//¼ýÀÚÀÔ·ÂÃ¼Å©
function containsCharsOnly(inputName,chars) 
{ 
	for (var inx = 0; inx < inputName.value.length+1; inx++) 
	{ 
		if (chars.indexOf(inputName.value.charAt(inx)) == -1) 
		{
			alert("¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.");
			inputName.value = "";
			inputName.focus();
			return false;
		}
	} 
	return true;
}

//°ø¹éÁ¦°Å
function SpaceDel(inputName)
{
	var index, len, str;

	str = inputName.value;

	while(true){
		index = str.indexOf(" ");
		if (index == -1) break;
		len = str.length;
		str = str.substring(0, index) + str.substring((index+1), len);
	}

	inputName.value = str;
}

//ÀÚµ¿ ´ÙÀ½ Æû ÀÌµ¿
function moveNext(id_from, id_to, size) 
{
	var a = document.getElementById(id_from).value;
	siz = a.length;

	if (siz == size) {
		document.getElementById(id_to).focus();
	}
}

//rollover
function imgOver(imgObj)
{
	var imgSrc = imgObj.src;
	var imgSrcOver = imgSrc.replace(".gif", "_on.gif");
	imgObj.src = imgSrcOver;
}

function imgOut(imgObj)
{
	var imgSrc = imgObj.src;
	var imgSrcOut = imgSrc.replace("_on.gif", ".gif");
	imgObj.src = imgSrcOut;
}


//tab
function mOver()
{
	this.src = this.src.replace(".gif", "_on.gif");
}
function mOut()
{
	this.src = this.src.replace("_on.gif", ".gif");
}

function TabMenu(menuContainerID, menuTabName) {
	var tabMenu = document.getElementsByName(menuTabName);
	var i = 0;

	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuContainerID);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		if (thismenu.getElementsByTagName("img").item(0)) {
			thismenu.getElementsByTagName("img").item(0).onmouseover = mOver;
			thismenu.getElementsByTagName("img").item(0).onmouseout = mOut;
		}
		thismenu.onclick = tabMenuClick;
	}

	initmenu = tabMenu.item(0);
	initmenu.targetEl.style.display = "block";
	if (initmenu.getElementsByTagName("img").item(0)) {
		initmenu.getElementsByTagName("img").item(0).onmouseover();
		initmenu.getElementsByTagName("img").item(0).onmouseover = null;
		initmenu.getElementsByTagName("img").item(0).onmouseout = null;
	}
	initmenu.menuContainer.current = initmenu;
}


function tabMenuClick() {
	currentmenu = this.menuContainer.current;
	if (currentmenu != this) {
		currentmenu.targetEl.style.display = "none";
		if (currentmenu.getElementsByTagName("img").item(0)) {
			currentmenu.getElementsByTagName("img").item(0).onmouseover = mOver;
			currentmenu.getElementsByTagName("img").item(0).onmouseout = mOut;
			currentmenu.getElementsByTagName("img").item(0).onmouseout();
		}
	
		this.targetEl.style.display = "block";
		if (this.getElementsByTagName("img").item(0)) {
			this.getElementsByTagName("img").item(0).onmouseover = null;
			this.getElementsByTagName("img").item(0).onmouseout = null;
		}
		this.menuContainer.current = this;
	}
	return false;
}



// ÇÃ·¡½Ã
var EmbedStr = "";
function GetFlash3(objid,url,x,y) { 
	
	AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', x,
		'height', y,
		'src', url,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'window',
		'devicefont', 'false',
		'id', objid,
		'bgcolor', '#ffffff',
		'name', 'HubMain',
		'menu', 'true',
		'allowFullScreen', 'false',
		'allowScriptAccess','sameDomain',
		'movie', url,
		'salign', ''
		); //end AC code
		//document.write(EmbedStr);
		//return;
		
	}				
	
//¼±ÅÃ¿µ¿ª ÇÁ¸°Æ®
var initBody 
function beforePrint(){ 
	initBody = document.getElementById("idPrint").innerHTML; 
	document.getElementById("idPrint").innerHTML = idPrint.innerHTML; 
} 
function afterPrint(){ 
	document.getElementById("idPrint").innerHTML = initBody; 
} 
function printArea() { 
	window.print(); 
} 
window.onbeforeprint = beforePrint; 
window.onafterprint = afterPrint; 



//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;
}

//media player
function playMedia(objID, objSource, objWidth, objHeight, objStyle){
	document.write('<OBJECT id="' + objID + '" name="' + objID + '" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ');
	document.write('WIDTH="' + objWidth + '" HEIGHT="' + objHeight + '" ' + objStyle + '>');

	for (var i=0; i<paramInfo.length; i++) {
		document.write('<PARAM NAME="' + paramInfo[i][0] + '" VALUE="'+ paramInfo[i][1] +'">');		

	}	
	document.write('</OBJECT>');
}





//media player
var nVolLeftPosition = 20;							// º¼·ý ¹Ù ¹è°æ ½ÃÀÛÁ¡
var nVolStartPosition = 0;							// º¼·ý ¹Ù ½ÃÀÛ Á¡
var nVolEndPosition = 44;							// º¼·ý ¹Ù ³¡ Á¡
var nVolume = 20;									// º¼·ý ÃÊ±â °ª
var nPrevVol;										// º¼·ýÀÌ º¯°æµÇ±â ÀüÀÇ °ª
var bIsVolumeSet = false;					// º¼·ý¹Ù µå·¡±× ¿©ºÎ
var nZoomed = 0;							// ±âº»°ª 1 : ÁÜµÊ,   0 : Ãà¼ÒµÊ

function killErr(){return true;}

function setVolumeBar(){
	nPrevVol = event.clientX;
	nVolLeftPosition = sound.style.pixelLeft;

	bIsVolumeSet = true;
	document.onmousemove = drag_dropie;
	if (document.all){document.onmouseup = endVolume;}
}

function drag_dropie(){
	if (bIsVolumeSet==true){
		var mov = nVolLeftPosition+event.clientX-nPrevVol;
		if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
			cutpoint=nVolEndPosition-sound.style.pixelLeft;
			document.all.soundbg.style.pixelWidth=39-cutpoint;
			//document.all.sbg.width = 58-cutpoint;
			sound.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
			mplayer.Volume = -2500*(cutpoint/37);
			nVolume=sound.style.pixelLeft
			nVolume1=document.all.sbg.width;
			mplayer.Mute=false;
		}
		return false;
	}
}

function endVolume(){
	bIsVolumeSet = false;
}

function ris(name, nsdoc){
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '') return;
	if (img && img.altsrc) {
		img.src    = img.altsrc;
		img.altsrc = null;
	}
}

function cis(name, nsdoc, rpath, preload){ 
	var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '')	return;
	if (img) {
		img.altsrc = img.src;
		img.src    = rpath;
	}
}		

function mutecheck(){
	if(document.all.mplayer.mute==0) document.all.mplayer.mute=1;
	else document.all.mplayer.mute=0;
}

function setScrollColor(objFrame){  
	try 
	{ 
		self[objFrame.name].document.body.style.scrollbarFaceColor = "#eeeeee";
		self[objFrame.name].document.body.style.scrollbarHighlightColor = "#ffffff";
		self[objFrame.name].document.body.style.scrollbarShadowColor = "#FFFFFF";
		self[objFrame.name].document.body.style.scrollbar3dLightColor = "#b6b6b6";
		self[objFrame.name].document.body.style.scrollbarArrowColor = "#333333";
		self[objFrame.name].document.body.style.scrollbarTrackColor = "";
		self[objFrame.name].document.body.style.scrollbarDarkshadowColor = "";
	} 
	catch(oException) 
	{ 
	// Á¢±Ùº¸¾ÈÀÏ¶§ ¾Æ¹«·± ÀÏµµ ÇÏÁö ¾Ê´Â´Ù. 
	} 
}


function handlePlay(){
	document.mplayer.play();
}

function handleStop(){
	document.mplayer.Stop();
}

function handlepause(){
	document.mplayer.pause();
}

function handleonForward() {
	document.mplayer.FastForward();
}

function handleonReverse() {
	document.mplayer.FastReverse();
}

function setMute() {
    if(mplayer.mute == false)
    {
        //player_mute.src = imgpath+"btn_ctl_soundoff.gif";
        mplayer.mute = true;
    }
    else
    {
        //player_mute.src = imgpath+"btn_ctl_soundon.gif";
        mplayer.mute = false;
    }
}

