
//ÀÌ¹ÌÁö Å¬¸¯½Ã Å×Åõ¸® ¾Èº¸ÀÌ°Ô..
function autoBlur(){ 
  if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
  document.body.focus(); 
} 
  document.onfocusin=autoBlur; 

//½ºÅ©·Ñ no
function new_pop_ns(path, win_name, wid, hei) {
	window.open(path,win_name,"toolbar=no,directories=no,menubar=no,scrollbars=no,width=" + wid + ",height=" + hei + ",resizable=no");
}

//ÄíÅ°
function getCookie(name) {
var Found = false
var start, end
var i = 0 

// cookie ¹®ÀÚ¿­ ÀüÃ¼¸¦ °Ë»ö
while(i <= document.cookie.length) {
start = i
end = start + name.length
// name°ú µ¿ÀÏÇÑ ¹®ÀÚ°¡ ÀÖ´Ù¸é
if(document.cookie.substring(start, end) == name) {
Found = true
break
}
i++
} 
// name ¹®ÀÚ¿­À» cookie¿¡¼­ Ã£¾Ò´Ù¸é
if(Found == true) {
start = end + 1
end = document.cookie.indexOf(";", start)
// ¸¶Áö¸· ºÎºÐÀÌ¶ó´Â °ÍÀ» ÀÇ¹Ì(¸¶Áö¸·¿¡´Â ";"°¡ ¾ø´Ù)
if(end < start)
end = document.cookie.length
// name¿¡ ÇØ´çÇÏ´Â value°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏÇÑ´Ù.
return document.cookie.substring(start, end)
}
// Ã£Áö ¸øÇß´Ù¸é
return ""
} 


 function openMsgBox1()
{
var eventCookie=getCookie("event6");
if (eventCookie != "no")
window.open('../upload/event/event_10/event_1.html','event6','scrollbars=yes,width=530,height=700,top=100,left=0');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}

 function openMsgBox2()
{
var eventCookie=getCookie("pop5");
if (eventCookie != "no")
window.open('../upload/event/pop_05/pop_00.html','pop5','scrollbars=no,width=530,height=520,top=100,left=430');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}


// function pop6()
//{
//var eventCookie=getCookie("pop6");
//if (eventCookie != "no")
//window.open('event/pop_06/popup_1.html','pop6','width=405,height=500,top=100,left=530');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
//}

 function pop1()
{
var eventCookie=getCookie("pop4");
if (eventCookie != "no")
window.open('event/pop_07/popup_1.html','pop4','width=355,height=430,top=100,left=0');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}

// 20071115 ¸Þ¼¼ÁöÆË¾÷ Function

 function pop12()
{
var eventCookie=getCookie("pop12");
//if (eventCookie != "no")
//window.open('upload/event/pop_12/popup.html','pop12','width=500,height=530,top=100,left=0');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}

 function event12()
{
var eventCookie=getCookie("event12");
if (eventCookie != "no")
window.open('upload/event/event_12/popup.html','event12','scrollbars=yes,resize=yes,width=450,height=650,top=100,left=550');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}

 function event00()
{
var eventCookie=getCookie("event00");
if (eventCookie != "no")
window.open('upload/event/event_00/popup.html','event00','scrollbars=no,resize=no,width=470,height=500,top=100,left=50');
//ÆË¾÷Ã¢ÀÇ ÁÖ¼Ò, °°Àº µµ¸ÞÀÎ¿¡ ÀÖ¾î¾ß ÇÑ´Ù.
}
// 

function move1(whichlayer){   
	tlayer=eval(whichlayer)   
	if (tlayer.top>0&&tlayer.top<=num){   
		tlayer.top=0   
		setTimeout("move1(tlayer)",scrollspeed)   
		setTimeout("move2(document.main.document.second)",scrollspeed)   
		return   
	}
		
	if (tlayer.top>=tlayer.document.height*-1){   
		tlayer.top-=num 
		setTimeout("move1(tlayer)",waitingtime)   
	}else{   
		tlayer.top=scrollerheight   
		tlayer.document.write(image[j])   
		tlayer.document.close()   
		if (j==image.length-1)   
			j=0   
		else   
		j++   
	}   
}   
           
function move2(whichlayer){   
	tlayer2=eval(whichlayer)   
	if (tlayer2.top>0&&tlayer2.top<=num){   
		tlayer2.top=0   
	setTimeout("move2(tlayer2)",scrollspeed)   
	setTimeout("move1(document.main.document.first)",scrollspeed)   
	return   
	}   
	if (tlayer2.top>=tlayer2.document.height*-1){   
		tlayer2.top-=num 
		setTimeout("move2(tlayer2)",waitingtime)   
	}else{   
		tlayer2.top=scrollerheight   
		tlayer2.document.write(image[j])   
		tlayer2.document.close()   
	if (j==image.length-1)   
		j=0   
	else   
		j++   
	}   
}   
           
function move3(whichdiv){   
	tdiv=eval(whichdiv)   
	if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=num){   
		tdiv.style.pixelTop=0   
		setTimeout("move3(tdiv)",scrollspeed)   
		setTimeout("move4(second2)",scrollspeed)   
		return   
	}   
	if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){   
		tdiv.style.pixelTop-=num 
		setTimeout("move3(tdiv)",waitingtime)   
	}else{   
		tdiv.style.pixelTop=scrollerheight   
		tdiv.innerHTML=image[j]   
		if (j==image.length-1)   
			j=0   
		else   
			j++   
	}   
}   
           
function move4(whichdiv){   
	tdiv2=eval(whichdiv)   
	if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=num){   
		tdiv2.style.pixelTop=0   
		setTimeout("move4(tdiv2)",scrollspeed)   
		setTimeout("move3(first2)",scrollspeed)   
		return   
	}   
	if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){   
		tdiv2.style.pixelTop-=num   
		setTimeout("move4(second2)",waitingtime)   
							 
//Ã³À½2°³ÀÇ »óÇ°À» ÇÑ¹ø¸¸ º¸¿©ÁÜ!                         
		if(j==index) { 
		index= 200; 
		j=2; 
		} 
	}else{
		tdiv2.style.pixelTop=scrollerheight   
		tdiv2.innerHTML=image[j]   
		if (j==image.length-1)   
			j=0   
		else   
			j++   
	}   
}   
           
function startscroll(){   
	if (document.all){   
		move3(first2)   
		second2.style.top=scrollerheight   
		second2.style.visibility='visible'   
	}else if (document.layers){   
		document.main.visibility='show'   
		move1(document.main.document.first)   
		document.main.document.second.top=scrollerheight+num   
		document.main.document.second.visibility='show'   
	}   
}   

function goPage(menu,main)
{
	parent.lftmenu.location = menu;
	parent.content.location = main;
}

function openSetup4(url)
{
	mySetup = window.open(url,'setup','width=548,height=550,top=20,left=30,resizable=no,scrollbars=yes');
	mySetup.window.focus()
}