// 플레시 박스 감추기
function makeflash(Url,Width,Height,backUrl)
{
  document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + Width + "\" height=\"" + Height + "\">");
  document.writeln("<param name=\"movie\" value=\"" + Url + "\">");
  document.writeln("<param name=\"quality\" value=\"high\" />");
  document.writeln("<param name=\"wmode\" value=\"transparent\">");
  document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">");
  document.writeln("<param name=\"FlashVars\" value=\"backUrl="+backUrl+"\">");
  document.writeln("</object>");
}


/***** 팝업창 시작 *****/
function popup(url,width,height,scroll)
{
window.open(url,"_blank", "location=no,resizable=no,status=no,toolbar=no,menubar=no,width="+width+",height="+height+",scrollbars="+scroll);
}
/***** 팝업창 종료 *****/


/***** 링크 시작 *****/
function link(url)
{
	location.href=url;
}
/***** 링크 종료 *****/


/***** 시계 시작 *****/
today = new Date()

// 시계
function MakeArrayday(size) {
	this.length = size;
	for(var i = 1; i <= size; i++) { this[i] = ""; }
	return this;
}
function MakeArraymonth(size) {
	this.length = size;
	for(var i = 1; i <= size; i++) { this[i] = ""; }
	return this;
}

function funClock() {

	if (!document.layers && !document.all) { return; }

	var runTime = new Date();
	var hours = runTime.getHours();
	var minutes = runTime.getMinutes();
	var seconds = runTime.getSeconds();
	var dn = "AM";

	if (hours >= 12) {
		dn = "PM";
		hours = hours - 12;
	}
	if (hours == 0) { hours = 12; }
	if (minutes <= 9) { minutes = "0" + minutes; }
	if (seconds <= 9) { seconds = "0" + seconds; }

	var month = today.getMonth()+1;
	var date = today.getDate();
	if (month <= 9) { month = "0" + month; }
	if (date <= 9) { date = "0" + date; }

	movingtime = today.getYear()+"-"+month+"-"+date + "&nbsp;&nbsp;&nbsp;" + dn +" "+ hours + ":" + minutes + ":" + seconds;

	if (document.layers) {
		document.layers.clock.document.write(movingtime);
		document.layers.clock.document.close();
	} else if (document.all) { clock.innerHTML = movingtime; }

	setTimeout("funClock()", 1000);
}
/***** 시계 종료 *****/


/***** forTopBt 시작 *****/
function moveRightEdge() {
    var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
    yMenuFrom = parseInt(document.getElementById('divMenu').style.top,10);

    // Y축 위치 설정방법(상단으로부터 40픽셀을 의미)
    yMenuTo = document.body.scrollTop + 300;
    timeoutNextCheck = 500;
    if (yMenuFrom != yMenuTo) {
        yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
        if (yMenuTo < yMenuFrom)
        yOffset = -yOffset;
        document.getElementById('divMenu').style.top = parseInt (document.getElementById('divMenu').style.top, 10) + yOffset;
        timeoutNextCheck = 10;
    }
    setTimeout ("moveRightEdge()", timeoutNextCheck);
}

function setRightX() {
    // X축 위치 설정방법 1(가운데 정렬의 경우에 적용가능, 화면의 중심에서부터 410(800/2+10)픽셀 떨어진 위치를 의미)
    //document.getElementById('divMenu').style.left = document.body.clientWidth/2 + 765/2 + 10;

    // X축 위치 설정방법 2(왼쪽 정렬의 경우에 적용가능, 950픽셀을 의미)
	document.getElementById('divMenu').style.left = 950;
    moveRightEdge();
}

function setRightY() {
    document.getElementById('divMenu').style.top = document.body.scrollTop + 300;
    document.getElementById('divMenu').style.visibility = "visible";
    setRightX();
}
/***** forTopBt 종료 *****/



/***** 드림위버에서 만든 이미지 롤오버 효과 시작 *****/
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
/***** 드림위버에서 만든 이미지 롤오버 효과 종료 *****/


var seq3 = "";
function qa(qa_num){
	if(seq3 != qa_num){
		if(seq3 !=""){
			//seq3.style.display = "none";
		}
		qa_num.style.display = "block";
		seq3 = qa_num;
	}
	else{
		qa_num.style.display = "none";
		seq3 = "";
	}
}