
// png 이미지
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 
var faq_n = "";
var faq_t = "";
function faq_list(n) {	
	
	
	q_con = document.getElementById("q"+n);
	a_con = document.getElementById("a"+n);
	
	if(a_con.style.display == "block"){
		q_con.className = "q";
		a_con.style.display ="none";
	}else{
		q_con.className = "q_on";
		a_con.style.display ="block";
	}

	if(faq_n != ""){
		
		q_con = document.getElementById("q"+faq_n);
		a_con = document.getElementById("a"+faq_n);

		q_con.className = "q";
		a_con.style.display ="none";
		

	}
	
	faq_n = n;
	
}
function faq_tab(n) {
	n = (n ? n:"0");
	tab = document.getElementById("faq"+n);
	tab.className = "on";

	if(n != "" && faq_t != ""){
		tab = document.getElementById("faq"+faq_t);
		tab.className = "";
	}
	faq_t = n;
}

function sc_week(n,t) {	
	div_box = document.getElementById(n);
	div_box.style.display ="block";
	
	if(t == "1"){
		top_p = 30;
	}else{
		t = t - 1;
		t = t * 16;
		top_p = 30 + t;
	}
	
	div_box.style.top = top_p;
	
}
var num = 1
function online_prev(n) {		
	
	
	if(n == "next"){
		if(num < 10){
			num_next = num + 1;
		}else{
			num_next = 1;
		}

	}else{
		if(num == 1){
			num_next = 10;
		}else{
			num_next = num - 1;
			
		}
	}
	

		con = document.getElementById("con"+num_next);
		con_prev = document.getElementById("con"+num);

		con.style.display ="block";
		con_prev.style.display ="none";
		
		num = num_next;
	
}
var num_info = 1
function info_prev(con_id,n,many) {		
	
	
	if(n == "next"){
		if(num_info < many){
			num_next = num_info + 1;
		}else{
			num_next = 1;
		}

	}else{
		if(num_info == 1){
			num_next = many;
		}else{
			num_next = num_info - 1;
			
		}
	}
	

		con_img = document.getElementById(con_id+"_img");
		top_num = document.getElementById(con_id+"_0"+num_next);
		top_num_prev = document.getElementById(con_id+"_0"+num_info);

		top_num.src = top_num.src.replace(".gif", "_on.gif");
		top_num_prev.src = top_num_prev.src.replace("_on.gif", ".gif");
		con_img.src="/images/popup/"+con_id+"_img_0"+num_next+".gif";
		
		num_info = num_next;
	
}

var num_pay = 1
var pay_con = 1
function pay_prev(n) {		
	
	
	if(n == "next"){
		if(num_pay < 3){
			num_next = num_pay + 1;
			pay_next = pay_con;
		}else{
			num_next = 1;
			if(pay_con < 3){
				pay_next = pay_con + 1;
				document.getElementById("pay"+pay_con).style.display = "none"
				document.getElementById("pay"+pay_next).style.display = "block"
			}else{
				pay_next = 1;
				document.getElementById("pay"+pay_con).style.display = "none"
				document.getElementById("pay"+pay_next).style.display = "block"
			}
			
		}

	}else{
		if(num_pay == 1){
			num_next = 3;
			
			if(pay_con == 1){				
				pay_next = 3;
				document.getElementById("pay"+pay_con).style.display = "none"
				document.getElementById("pay"+pay_next).style.display = "block"				
			}else{
				pay_next = pay_con - 1;
				document.getElementById("pay"+pay_con).style.display = "none"
				document.getElementById("pay"+pay_next).style.display = "block"
			}

		}else{
			pay_next = pay_con;
			num_next = num_pay - 1;
			
		}
	}
		con_id = "pay"+pay_next;

		con_img = document.getElementById(con_id+"_img");
		top_num = document.getElementById(con_id+"_0"+num_next);
		top_num_prev = document.getElementById(con_id+"_0"+num_pay);

		top_num.src = "/images/popup/0"+num_next+"_on.gif";
		top_num_prev.src = "/images/popup/0"+num_pay+".gif";
		con_img.src="/images/popup/"+con_id+"_img_0"+num_next+".gif";
		
		num_pay = num_next;		
		pay_con = pay_next;
	
}
function info_tab(n) {
	for(i = 0; i <= 6; i++){
		tab_img = document.getElementById("info_tab");
		info = document.getElementById("con_tab_0"+i);
		if(i == n){			
			info.style.display = "block";
			tab_img.src="/images/popup/info_tab_0"+i+".gif";
		}else{
			info.style.display = "none";	
		}
	}
}
function sc_week2(n,t) {	
	div_box = document.getElementById(n);
	div_box.style.display ="block";
	
	if(t == "1"){
		top_p = 0;
	}else{
		t = t - 1;
		t = t * 13;
		top_p = 0 + t;
	}
	
	div_box.style.top = top_p;
	
}
function sc_week_out(n) {	
	div_box = document.getElementById(n);
	div_box.style.display ="none";
	
}
function icon_open() {	
	div_con = document.getElementById("icon_div");
	if (div_con.style.display == "block")
	{
		div_con.style.display = "none";
	}else{
		div_con.style.display = "block";
	}
	
}
function icon_select(n) {	
	icon = document.getElementById("icon_img");
	div_con = document.getElementById("icon_div");
	icon.src = "/images/common/icon_0"+n+".gif";
	div_con.style.display = "none";
}


function time_load() {
	div_info_pop('info');
	setTimeout("div_info_pop('info')", 4000 ); 
}



function flashObj(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="https://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="https://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
	if ( Frm == 'Y' ) { // form 태그 들어가는 페이지에 적용
		eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
	}
}

function resizeSmall() {
	gnb_div= document.getElementById("gnb");
	gnb_div.style.height="88px";
}
function resizeBig(){
	gnb_div = document.getElementById("gnb");
	gnb_div.style.height="175px";
}


function imgOver(imgName) {
imgName.src = imgName.src.replace(".gif", "_on.gif");
imgName.src = imgName.src.replace(".jpg", "_on.jpg");
}
function imgOut(imgName) {
	imgName.src = imgName.src.replace("_on.gif", ".gif");
	imgName.src = imgName.src.replace("_on.jpg", ".jpg");
}

function popsn(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
function popsy(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
function pop_preview() {
	preview = new Popup("pop_preview","/cyber/pop_preview.asp",{overlay:true});
}
function pop_info() {
	info2 = new Popup("pop_info","/etc/pop_service_info.asp",{overlay:true});
}

/*퀵메뉴 스크립트*/
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 = "890px";

	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";
	}, 30)
}
var home_swf;
function showPopup(n) { 
 swf_url = "/include/"+n+".jsp"
 home_swf = new Popup("popOrderList", swf_url, {overlay:true});
}

function swf_close(){
 home_swf.close();
}
