//ÇÃ·¡½ÃÁ¦³×·¹ÀÌÅÍ...id,³ÐÀÌ,³ôÀÌ,Åõ¸í¿©ºÎ,Å©·Î½ºµµ¸ÞÀÎÇã¿ë
function FlashGen(id,w,h,url,transPparent,arrowDomain){
//alert(url)
//var _globlURL="./Flash/";
//var _globlURL="./Flash/";
var url=url;
if(arrowDomain){
var arrowDomainT="always";
}else{
var arrowDomainT="always";
}
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width="+w+" height="+h+" id='"+id+"'>")
document.write("<param name='movie' value='"+url+"'/>");
document.write("<param name='quality' value='high' />");
if(!transPparent){
document.write("<param name='wmode' value='transparent' />");
}
document.write("<param name='allowScriptAccess' value='"+arrowDomainT+"' />");
document.write("<embed src='"+url+"' quality='high' wmode='transparent' width="+w+" height="+h+" name='"+id+"' align='middle' allowScriptAccess='"+arrowDomainT+"' type='application/x-shockwave-flash' pluginspage='https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' />");
document.write("</object>");
}
//ÇÃ·¡½ÃÁ¦³×·¹ÀÌÅÍ...id,³ÐÀÌ,³ôÀÌ,Åõ¸í¿©ºÎ,Å©·Î½ºµµ¸ÞÀÎÇã¿ë
function ParamGen(obj) {
	var txt="";
	var z=0;
	for (i in obj) {
		if (z==0) {
			frontT="?";
		} else {
			frontT="&";
		}
		txt+=frontT+i+"="+obj[i];
		z++;
	}
	return txt;
}


function popup(url,cw,ch,scroll,resize) {
    //»õÃ¢ÀÇ Å©±â
   
    //½ºÅ©¸°ÀÇ Å©±â
    var sw=screen.availWidth;
    var sh=screen.availHeight;
    //¿­ Ã¢ÀÇ Æ÷Áö¼Ç
    var px=(sw-cw)/2;
   var py=(sh-ch)/2;
    //Ã¢À» ¿©´ÂºÎºÐ
    window.open(''+url+'','½Å±âÇÑÁý','left='+px+',top='+py+',width='+cw+',height='+ch+',toolbar=no,menubar=no,status=no,scrollbars='+scroll+',resizable='+resize);
}
function pop_sn(url,w,h,n) {
	
	l = (screen.width) ?	(screen.width-w) / 2	: 0;
	t = (screen.height) ?	(screen.height-h) / 2 : 0;	
	var opt='top='+t+',left='+l+',width='+w+',height='+h;
	opt=opt+',toolbar=no,status=no,directories=no,scrollbars='+n+',location=no,resizable=no,menubar=no';
	aa=window.open(url,'',opt);
	aa.document.write("<html><head><title>ÁÖ¿ä½ÇÀû È®´ëº¸±â</title><script>window.resizeTo("+(w+10)+","+(h+49)+")</script></head><body topmargin='0' leftmargin='0'><img src='"+url+"' border='0' width="+w+" height="+h+" onClick='window.close();' style='cursor:hand' alt='¸¶¿ì½º¸¦ Å¬¸¯ÇÏ¸é Ã¢ÀÌ ´ÝÄ¨´Ï´Ù'></body></html>")
//alert()
}

//##########################################################################
//##########################################################################
//##########################################################################
//##########################½ºÅ©·Ñ¸Þ´º######################################
//##########################################################################
//##########################################################################
//##########################################################################
function scrollGen(m, top, bottom) {
	
	var tum = 0;
	var scroll_y = 0;
	var tmp_y = top;
	var scrollTimer, tm, y,docH , bttomH;
	var h = Number(m.style.height.substr(0, (m.style.height.length-2)));
	scrollCHK = function () {
		clearTimeout(scrollTimer);
		docH = document.body.scrollHeight;
		bttomH = docH-(h+bottom);
		y = document.body.scrollTop;
		if (y<top) {
			y = top;
		} else if (y>bttomH) {
			y = bttomH;
		}
		if (tmp_y != y) {
			if (Math.min(0, (y-tmp_y))<0) {
				tum = -5;
			} else {
				tum = 5;
			}
			tm = (Math.round((Math.abs(tmp_y-y))/(docH-top)*100)/100)+.7
		//	JSTweener.addTween(m.style, {time:tm, transition:"easeInCirc", top:y+tum, onComplete:scrollCHKEnd});
			JSTweener.addTween(m.style, {time:tm, transition:"easeInOutExpo", top:y});
			tmp_y = y;
		}
	};
	scrollCHKEnd = function () {
		JSTweener.addTween(m.style, {time:1, transition:"easeOutElastic", top:y});
	};
	window.onscroll = function() {
		clearTimeout(scrollTimer);
		scrollTimer = setTimeout(scrollCHK, 70);
	};
	scrollCHK()
}

////////////////////////////////////
///////////////////////////////////
var OpenLayer;
function open_lay(event, layerNO) {
	var Layer2 = document.getElementById(layerNO);

	if(OpenLayer!=null)
		OpenLayer.style.display="none";

	Layer2.style.display="block";
var div=document.getElementById("div_base")
	div.style.display="block";
	var sw = event.x;
	var sy = event.y + document.body.scrollTop;
	var bottom = document.all._idDiv.offsetHeight;
	var w = Layer2.offsetWidth;
	var h = Layer2.offsetHeight;
	if (sw+w > 1024) {
		sw = sw - 370;
	}
	if ((sy + h) > bottom) {
		sy = sy - h + 60 + (h/2);
		if (sy + h > bottom) {
			sy = sy - (h/2);
		}
	}
	if(sy<270){
	sy=270
	}
	Layer2.style.left = 420
	Layer2.style.top = sy - 20;
	Layer2.style.display="block";
	OpenLayer = Layer2;
}


function none_layer(layerNO) {
	var Layer2 = document.getElementById(layerNO);
	Layer2.style.display="none";

	var div=document.getElementById("div_base")
	div.style.display="none";
}
function hide_in(name) {
	name.style.display='none';

}



function banner() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="174" height="79" id="Shockwaveflash1">');
	document.write('<param name="movie" value="/flash/ban.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src="/flash/ban.swf" quality="high" menu="false" pluginspage="https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="174" height="79"></embed></object>');
}