<!--
// JavaScript Document
function addLoadEvent(func){
	var oldonload = window.onload;
	
	if(typeof window.onload != 'function'){
		window.onload = func;
		
	}else{
		window.onload = function(){
			oldonload();
			func();
		}
	}

}

//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
	//인자 값
	function isAgm(agm, len, val){
		var agmL = agm.length - 1;
		return agmL < len ? val : agm[len];
	};

	//브라우져 별 아이디 객체 스타일
	function getStyleObject(objectId) {
		if(document.getElementById && document.getElementById(objectId)){
			return document.getElementById(objectId).style;
		}else if (document.all && document.all(objectId)){
			return document.all(objectId).style;
		}else if (document.layers && document.layers[objectId]){
			return document.layers[objectId];
		}else{
			return false;
		}
	};

	//브라우져 별 아이디 객체
	function getObject(objectId) {
		if(document.getElementById && document.getElementById(objectId)){
			return document.getElementById(objectId);
		}else if (document.all && document.all(objectId)){
			return document.all(objectId);
		}else if (document.layers && document.layers[objectId]){
			return document.layers[objectId];
		}else{
			return false;
		}
	};

	//플래쉬 써주기
	function writeEmbed(url,wd,ht){
		var id		= isAgm(writeEmbed.arguments, 3, null);
		var n			= 0;
		while(getObject("writeValue_" + n)) n++;
		document.write("<textarea id=\"writeValue_" + n + "\" style=\"display:none;\" cols=\"0\" rows=\"0\">");
		document.write("	<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=\"" + wd + "\" height=\"" + ht + "\" id=\"fmedia_\"" + n + ">");
		document.write("	<param name=\"movie\" value=\"" + url + "\">");
		document.write("	<param name=\"menu\" value=\"false\">");
		document.write("	<param name=\"wmode\" value=\"transparent\" >");
		document.write("	<param name=\"quality\" value=\"high\">");
		document.write("	<param name=\"allowScriptAccess\" value=\"always\">");
		document.write("	<param name=\"FlashVars\" value=\"" + id + "\">");
		document.write("	<embed src=\"" + url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wd + "\" height=\"" + ht + "\" wmode=\"transparent\" allowScriptAccess=\"always\" name=\"ExtInterface\" FlashVars=\"" + id + "\"></embed>");
		document.write("	</object>");
		document.write("</textarea>")

		document.write(getObject("writeValue_" + n).value);
	};

	// 동영상 출력		<script>display_object('<embed src="주소" width="" height=""></embed>');<//script>
function display_object(tag){
	var _object_ = tag;
	document.write(_object_);
}

function imgResize(obj, limitW){//미리 보기 이미지 사이즈 일괄적으로
		var limitH	= isAgm(imgResize.arguments, 2, null);
		if(obj){
			var w, h, resizeW, resizeH
			if(obj.width && obj.height){
				w		= obj.width;
				h		= obj.height;
				if(w > h || !limitH){		//원본 이미즈 사이즈가 가로가 더 크면
					resizeW	= w > limitW ? limitW : w;
					resizeH = (resizeW * h) / w;
				}else{			//반대이면
					resizeH = h > limitH ? limitH : h;
					resizeW = (resizeH * w) / h;
				}
			}
			obj.width = resizeW;
			obj.height = resizeH;
		}
	};

//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
		//showlayer & hidelayer
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
  function showlayer(lay) {
  			document.getElementById(lay).style.display = document.getElementById(lay).style.display == "none" ? "" : "none";
  		};
  function hidelayer(lay) {
  			document.getElementById(lay).style.display = document.getElementById(lay).style.display == "" ? "none" : "";
  		};
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
		//link onfocus blur
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
function focusblur() {
  for (i = 0; i < document.links.length; i++) {
    var obj = document.links[i];
    if(obj.addEventListener) obj.addEventListener("focus", oneblur, false);
    else if(obj.attachEvent) obj.attachEvent("onfocus", oneblur);
  }
}

function oneblur(e) {
  var evt = e ? e : window.event;

  if(evt.target) evt.target.blur();
  else if(evt.srcElement) evt.srcElement.blur();
}
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
		//reSize
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
	function reSize(){
		try {
			var frameBody	= document.body;
			var frameHeight	= frameBody.scrollHeight + (frameBody.offsetHeight - frameBody.clientHeight);
//			alert(frameBody.scrollHeight+"   "+frameBody.offsetHeight+"   "+frameBody.clientHeight);
//			alert(frameHeight);
			if(!frameHeight){
				setTimeout("reSize()", 500);
			}else{
				if(parent) parent.getObject("comment", "style").height	= frameHeight + "px";//frameReSize(frameHeight);
			}
		}catch(e){
		// Do nothing
		}
	};
	function checkForm(obj_){
		if(!obj_.comment.value){
			alert("댓글을 입력 해주세요!!        ");
			obj_.comment.focus();
			return false;
		}
	};
	function inform(str_){
		var conf	= confirm(str_ + " 하시겠습니까?      ");
		if(!conf) return false;
	};
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// Layer Top Position
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
function resize () {
	if (self.innerHeight) { // IE 외 모든 브라우저
	document.getElementById('center_layer').style.top=(self.innerHeight / 2 - 116) + 'px';
	}
	else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict 모드
	document.getElementById('center_layer').style.top=(document.documentElement.clientHeight / 2 - 116) + 'px';
	}
	else if (document.body) { // 다른 IE 브라우저( IE < 6)
	document.getElementById('center_layer').style.top=(document.body.clientHeight / 2 - 116) + 'px';
	}
}
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// onload
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
this.onload	= function(){
	//포커스 블러
	focusblur();
	if(this.init)
		init();	
};

//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// onload
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
var isMove;
function moveIMG(loc_){
	if(isMove) return;
	else isMove = 1;
	var imgCon	= document.getElementById("imgCon");
	var i = 1, oldNode = imgCon.childNodes, len= oldNode.length;
	var target	= imgCon.style.marginLeft ? parseInt(imgCon.style.marginLeft) : 0;
	var width	= 151;
	if(loc_ == "prev"){
		if(target < 0){
			target	+= width;
			imgCon.appendChild(oldNode[0]);
			imgCon.style.marginLeft	= target + "px";
		}
		target	-= width;
	}else{
		target	+= - width;
		imgCon.insertBefore(oldNode[len - 1], oldNode[0]);
		imgCon.style.marginLeft	= target + "px";
		target	-= - width;
	}
	var interval = setInterval(function(){
		var pos			= imgCon.style.marginLeft ? parseInt(imgCon.style.marginLeft) : 0;
		var movePos		= (target - pos) * .27;
		imgCon.style.marginLeft	= pos + movePos  + "px";
		if(Math.abs(movePos) < 1){
			isMove				= 0;
			imgCon.style.marginLeft	= target + "px";
			clearInterval(interval);
		}
	}, 13);
};


//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// quickmenu
//~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 930 //set x offset of bar in pixels
var startY = 20 //set y offset of bar in pixels

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

var verticalpos="fromtop"

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("quickmenu").style.visibility="hidden"
}

function staticbar(){
if(!document.getElementById("quickmenu"))
	return;

    var ns = (navigator.appName.indexOf("Netscape") != -1);
    var d = document;
    function ml(id){
        var el=d.getElementById(id);
        if (!persistclose || persistclose && get_cookie("remainclosed")=="")
        el.style.visibility="visible"
        if(d.layers)el.style=el;
        el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
        el.x = startX;
        if (verticalpos=="fromtop")
        el.y = startY;
        else{
        el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
        el.y -= startY;
        }
        return el;
    }
    window.stayTopLeft=function(){
        if (verticalpos=="fromtop"){
        var pY = ns ? pageYOffset : iecompattest().scrollTop;
        ftlObj.y += (pY + startY - ftlObj.y)/8;
        }
        else{
        var pY = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
        ftlObj.y += (pY - startY - ftlObj.y)/8;
        }
        ftlObj.sP(ftlObj.x, ftlObj.y);
        setTimeout("stayTopLeft()", 10);
    }
    ftlObj = ml("quickmenu");
    stayTopLeft();
}

if (window.addEventListener)
	window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
	window.attachEvent("onload", staticbar)
else if (document.getElementById)
	window.onload=staticbar
	

/**************************************************************************
*
*				type Name
*
**************************************************************************/
	function typeName(type_){
		var type = typeof type_;
		if(type == "object"){
			if(type_.constructor == Array)
				return	"array";
			else if(/[A-Z]/.test(type_.tagName))
				return	"element";
		}
		return type;
	};
	
	
/**************************************************************************
*
*				elements
*
**************************************************************************/
	function el(){
		var owner, i = 0;
		if(typeName(arguments[i]) == "element")
			owner	= arguments[i ++];
		if(!arguments[i])
			return	owner || document;
		if(arguments.length > i + 1){
			var array	= [];
			for(var len = arguments.length; i < len; i ++)
				array.push(owner ? el(owner, arguments[i]) : el(arguments[i]));
			return array;
		}

		return	/[^A-Z]/.test(arguments[i]) ?
				document.getElementById(arguments[i]) :
				(owner || document).getElementsByTagName(arguments[i]);
	};	

/**************************************************************************
*
*		Junkyo 	swf
*
**************************************************************************/

function swf(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="menu" value="false">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="allowScriptAccess" value="always">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" wmode="transparent" id="param" name="param" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}


function swfMov(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="fmov" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="menu" value="false">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="allowScriptAccess" value="always">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" wmode="transparent" id="fmov" name="fmov" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}

//-->


