document.write('<scr'+'ipt type="text/javascript" src="./ysrjs/AC_OETags.js" ></scr'+'ipt>');

// PNG filter
function setPng24(obj) {
    obj.width=obj.height=1;
    obj.className=obj.className.replace(/\bpng24\b/i,'');
    obj.style.filter =
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
    obj.src='';
    return '';
}

// Quick menu scroll
function initMoving(target, position, topLimit, btmLimit, mainFlag) {
    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 = obj.initLeft;

    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 0;
        }
    }

    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 / 2;
        if(obj.top > 250 && !mainFlag){
        	if(obj.top < 320){
        		obj.top = 249;
        		return;
        	}else{
        		obj.top = obj.top - 70;
        	}
        }
        obj.style.top = obj.top + "px";
    }, 30)
}


//GNB Login input
function inputValue(objID,cName) {
    var inputEl = document.getElementById(objID).getElementsByTagName('input')[0];

    inputEl.onfocus = function() {
            inputEl.className = "bg_clear";
        }
    inputEl.onblur = function() {
    if (inputEl.value == "") {
            inputEl.className = "bg_in";
        }
    }
}

//-------------------------------------------------------------------
// 좌측 메뉴가 본문보다 길어질때를 위한 스크립트
//-------------------------------------------------------------------
/*
if(typeof Prototype != 'undefined') {
	try {
		Event.observe(window, 'load', function() {
			
			// 회원가입의 경우 left가 없음 null 처리  by kkh (2010.10.25)
			if($('left_side') == null){
				return;
			}
		
			var _menuHeight = $('left_side').getHeight();
			var _contentHeight = $('contents').getHeight();
			
			if(_menuHeight > _contentHeight + 100) {
				$('contents').setStyle({minHeight: (_menuHeight - 100) + 'px'});
			}
		});

		
		Ajax.Responders.register({
			onComplete: function() {
				try {
					// 회원가입의 경우 left가 없음 null 처리  by kkh (2010.10.25)
					if($('left_side') == null){
						return;
					}
			
					var _menuHeight = $('left_side').getHeight();
					var _contentHeight = $('contents').getHeight();
					
					setTimeout(function() {
						$('contents').setStyle({minHeight: (_menuHeight - 100) + 'px'});
					}, 1000);


				} catch(e) {}				
			}
		});
		
		
	} catch(e) {
		// alert(e);
	}
}
*/

//-------------------------------------------------------------------
// 좌측 메뉴가 본문보다 길어질때를 위한 스크립트
//-------------------------------------------------------------------
if(typeof Prototype != 'undefined') {
	try {
		Event.observe(window, 'load', function() {
			adjustContentsHeight($('left_side'), $('contents'), $('contents'));
		});
		
	} catch(e) {
		// alert(e);
	}
}

function adjustContentsHeight(left, content, element){
	
	if($(left) == null || $(content) == null || $(element) == null){
		return;
	}
	
	var leftHeight = $(left).getHeight();
	var listHeight = $(content).getHeight();
	
	//alert(leftHeight+","+listHeight);
	
	if(leftHeight >= listHeight){
		$(element).setStyle({height: (leftHeight) + 'px'});
	}else{
		var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		if(isIE && listHeight > 1500){
			var isIE7  = (navigator.appVersion.indexOf("MSIE 7") != -1) ? true : false;
			if(!isIE7){
				$(element).setStyle({height: (listHeight) + 'px'});
			}else{
				$(element).setStyle({height: 'auto'});
			}
		}else{
			$(element).setStyle({height: 'auto'});
		}
	}
}
function ajaxContentsHeight(left, content, element, element2){
	//alert($(content).getHeight()+","+$(element).getHeight());
	if($(left) == null || $(content) == null || $(element) == null){
		return;
	}
	
	var leftHeight = $(left).getHeight();
	var listHeight = $(content).getHeight();
	
	if(leftHeight > listHeight){
		$(element).setStyle({height: (leftHeight) + 'px'});
		if($(element2)) $(element2).setStyle({height: (leftHeight+200) + 'px'});
	}else{
		var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		if(isIE && listHeight > 1500){
			var isIE7  = (navigator.appVersion.indexOf("MSIE 7") != -1) ? true : false;
			if(!isIE7){
				$(element).setStyle({height: (listHeight) + 'px'});
				if($(element2)) $(element2).setStyle({height: (listHeight+200) + 'px'});
			}else{
				$(element).setStyle({height: 'auto'});
				if($(element2)) $(element2).setStyle({height: (listHeight+150) + 'px'});
			}
			//if($(element2)) $(element2).setStyle({border: 'solid 1px #f53'});
		}else{
			$(element).setStyle({height: 'auto'});
			if($(element2)) $(element2).setStyle({height: (listHeight+150) + 'px'});
			//if($(element2)) $(element2).setStyle({border: 'solid 1px #00f'});
		}
	}
}
