
    function addLoadEvent(func)
	{	
		var oldonload = window.onload;
		if (typeof window.onload != 'function') 
		{	 
			window.onload = func;
		}
		else 
		{
			window.onload = function() { oldonload(); func();}
		} 
	}   

	function addResizeEvent(func)
	{
		var oldonresize = window.onresize;
		if (typeof window.onresize != 'function') 
		{	 
			window.onresize = func;
		}
		else 
		{
			window.onresize = function() { oldonresize(); func();}
		} 
	}   

	function addScrollEvent(func)
	{			
		var oldonscroll = window.onscroll;
		if (typeof window.onscroll != 'function') 
		{	 
			window.onscroll = func;
		}
		else 
		{
			window.onscroll = function() { oldonscroll(); func();}
		} 
	}
	

	function setVisible(eleId, visible)
    {
	    var ele = document.getElementById(eleId);
    	
	    if(visible)
	    {
		    ele.style.visibility = "visible";
		    ele.style.display = "";
	    }
	    else
	    {
		    ele.style.visibility = "hidden";
		    ele.style.display = "none";
	    }
    } 
    function getDocmentSize()
    {
	    var de = document.documentElement;
	    var b = document.body;

	    var size = {};

	    if(navigator.userAgent.toLowerCase().indexOf("msie") < 0)
	    {
		    size.width = de.clientWidth -1;
		    size.height = de.clientHeight -1;
	    }
	    else
	    {
		    size.width = de.clientWidth ? de.clientWidth : b.clientWidth;
		    size.height = de.clientHeight ? de.clientHeight : b.clientHeight;
	    }

	    return size;
    }

    function toCenter(eleId)
    {	
	    var ele = document.getElementById(eleId);
    	
	    var now = getScrollLocation();

	    var size = getDocmentSize();
	    var width = size.width;
	    var height = size.height;
    	  	
	    var eWidth = parseInt(ele.style.width);
	    var eHeight = parseInt(ele.style.height);
	    var eLeft = parseInt(ele.style.left);
	    var eTop = parseInt(ele.style.top);

	    var x, y;

	    if(eWidth >= width)
	    {
		    //x = 0;		
		    x = now.X;
	    }
	    else
	    {		
		    x = width / 2;				    
		    x -= eWidth / 2;				    
		    x += now.X;	    		    
		    
	    }
	    if(eHeight >= height)
	    {		
		    //y = 0;
		    y = now.Y;
	    }
	    else
	    {			
		    y = height / 2;
		    y -= eHeight / 2;
		    y += now.Y;
	    }	
    	ele.style.left = x + "px";
	    ele.style.top  = y + "px";
    }

    function getScrollLocation()
    {
	    var de = document.documentElement;
	    var b = document.body;
	    
	    var now = {};            

	    now.X = document.all ? (de.scrollLeft ? de.scrollLeft : b.scrollLeft) : (window.pageXOffset ? window.pageXOffset : window.scrollX);
	    now.Y = document.all ? (de.scrollTop ? de.scrollTop : b.scrollTop) : (window.pageYOffset ? window.pageYOffset : window.scrollY); 

	    return now;
    }
    
   // ============================ Start :: Font 관련 함수 =============================
 // var article_fontSize = parseInt(getCookie("article_fontSize")); 		

  function initFont() { 
    if ( (article_fontSize < 13) || (article_fontSize > 17) || (isNaN(article_fontSize) == true)) {
      article_fontSize = 12;  // 특별한, 폰트크기의 지정이 없을 경우 디폴트로 저장(쿠키로)되는 폰트 사이즈 입니다.	
    }                        // 쿠키로 저장되는 경우, 어떤 스타일클래스보다 우선하게 됩니다.
    setFont(article_fontSize);
  }
	
  function setFont(article_fontSize) { 
	try{
		document.getElementById("setFontBody").style.fontSize = article_fontSize+"px";  
		
		//var svalue="";
		for(i=0;i<document.getElementById("setFontBody").all.length;i++){
			//svalue += document.getElementById("setFontBody").all[i].nodeName + "\n";
			if(document.getElementById("setFontBody").all[i].style.fontSize){
				document.getElementById("setFontBody").all[i].style.fontSize= article_fontSize;//+"px"; 
			}else{
				if(document.getElementById("setFontBody").all[i].nodeName.toUpperCase()=="FONT"){
					switch(article_fontSize){
						case 12, 13 :
							document.getElementById("setFontBody").all[i].size=2;
							break;
						case 14, 15 :
							document.getElementById("setFontBody").all[i].size=3;
							break;
						case 16 :
							document.getElementById("setFontBody").all[i].size=4;
							break;
					}
				}
			}
		}
		//alert(svalue);
		// 실제 HTML 페이지에서, 폰트조정에 사용할 엘리먼트 값:setFontBody (필요에 따라 엘리먼트 이름 변경 가능)
		setFontCookie(article_fontSize);
	}catch(e){}
  }	
	
  function setFontCookie(article_fontSize) {
    var expiry = new Date();
    var path = "/";
    var domain = ".krei.re.kr/";  // 다음 스크립트를 사용할 도메인에 맞게 사용해야 합니다.
    var secure = "";

    expiry.setTime(expiry.getTime() + 90 * (24 * 60 * 60 * 1000));
    setCookie("article_fontSize",article_fontSize,expiry,path,domain,secure);
  }	
	
  function fontPlus() {		
    if (article_fontSize <16) {  // 최대 16px 까지 크기설정을 할 수 있습니다.
      article_fontSize = article_fontSize + 1; 
      setFont(article_fontSize); 
    }
  }

  function fontMinus() {
    if (article_fontSize > 12) {  // 최소 12px 까지 크기설정을 할 수 있습니다.
      article_fontSize = article_fontSize - 1; 
      setFont(article_fontSize); 
    }
  }	
// ============================ End :: Font =============================
//font-size 조절 //
var objFont="11";
function fontSize(temp) 
{	
	var ele =document.getElementById("fontCont");
 
	if(temp=='1'){
		
		if(objFont<'17'){
			objFont++;
			ele.style.fontSize = objFont+"px";
		}
	}else{
		
		if(objFont>'10'){
		 objFont--;     
		 ele.style.fontSize = objFont+"px";
		}
	}	
}
/*privacy*/
function isPolicy(num){
		var ele = document.getElementById("policyBox");
		var titleEle=ele.getElementsByTagName('span');
		var contEle=ele.getElementsByTagName('div');
		var end=titleEle.length-1;
		for(var i=0;i<titleEle.length;i++){
			if(i==num){
				if(contEle[i].className=="onTitle"){
					titleEle[i].className="";
					contEle[i].className="";
				}else{
					titleEle[i].className="onTitle";
					contEle[i].className="onCont";
				}
			}else{
			titleEle[i].className="";
			contEle[i].className="";
			}
			if(num==end){
				ele.className="on";
			}else{
				ele.className="off"; 
			} 
		} 
	}

/* transparent background */
function IE_enablePng(img)
{
	if (typeof(img.style.filter) == "string") {
		//img.style.display = "none";
		img.onload = function ()
		{
			img.style.width = img.offsetWidth + "px";
			img.style.height = img.offsetHeight + "px";
			img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='scale')";
			img.src = "../images/pop/blank.gif";
			//img.style.display = "inline";
		}
	}
}


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 ''; 
} 
    
function seminarOpen(url) { 

  	if(typeof(bottomUid)!='undefined'){
	  	if(bottomUid == null || bottomUid == ""){
	   		alert("로그인 하셔야합니다.");
	   		location.href="javascript:showLogin()";
	 	}else{
	 		window.open(url,"seminar","toolbar=no,scrollbar=no,location=no,width="+1008+",height="+610+",resizable=0");
		 }
	}else{
		window.open(url,"seminar","toolbar=no,scrollbar=no,location=no,width="+1008+",height="+610+",resizable=0");
	}
  }
  
  function seminarOpen2(url) { 

  	if(typeof(bottomUid)!='undefined'){
	  	if(bottomUid == null || bottomUid == ""){
	   		alert("로그인 하셔야합니다.");
	   		location.href="javascript:showLogin()";
	 	}else{
	 		window.open(url,"seminar","toolbar=no,scrollbar=no,location=no,width="+1088+",height="+730+",resizable=0");
		 }
	}else{
		window.open(url,"seminar","toolbar=no,scrollbar=no,location=no,width="+1088+",height="+730+",resizable=0");
	}
  }
    