function getFCKvalue(){
	var text = null; 
	var oEditor = FCKeditorAPI.GetInstance('fck') ; 
	if(oEditor) { 
		text = oEditor.GetXHTML(true);
	} 
	return text;
}

/**
 * career 상시 지원 
 */
function goApply1(){
	
	var url = "/popup/careers_profile.jsp?main_seq=10000012";
	window.open(url, "heerim_carrers", "", "");
}


/**
 * career 수시 지원 
 */
function goApply2(seq){
	
	var url = "/popup/careers_profile.jsp?main_seq="+seq;
	window.open(url, "heerim_carrers", "", "");
}


/**
 * career 이력서 수정 
 */
function goApply3(){
	
	var url = "/popup/careers_profile.jsp";
	window.open(url, "heerim_carrers_profile", "", "");
}



/**
 * career 지원 목록 
 */
function goApply4(){
	
	var url = "/popup/careers_myapplication.jsp";
	window.open(url, "heerim_carrers_myapplication", "", "");
}
 
/**
 * Number Check
 */
 function NumCheck(input, e){
	var number = "0123456789.";
	
	temp = input.value.substring(input.value.length-1,input.value.length);
	
	if ( (e.keyCode != 8) && (number.indexOf(temp) == -1) ){
		alert('only input number')
		input.value = input.value.substring(0,input.value.length-1);
	}
}
 
 /**
  * Number Check
  */
 function NumCheck2(input, e){
	 var number = "0123456789";
	 
	 for ( var i = 0; i < input.value.length; i++ ){
		 
		 //temp = input.value.substring(input.value.length-1,input.value.length);
		 temp = input.value.substring(i, i+1);		 
		 
		 if ( (e.keyCode != 8) && (number.indexOf(temp) == -1) ){
			 alert('only input number')
			 input.value = '';//input.value.substring(0,input.value.length-1);
		 }
	 }
 }


/*
 * textarea maxcount
 * 
 * ex )
 * Event.observe(window, 'load', init);
   function init(){
       makeItCount('fck', 4000);
   }
 */ 
 function makeItCount(id, maxsize, limited, viewCount){
     if(limited == null) limited = true;
     if(viewCount == null) viewCount = false;
     if ($(id)){
         Event.observe($(id), 'keyup', function(){charCounter(id, maxsize, limited, viewCount);}, false);
         Event.observe($(id), 'keydown', function(){charCounter(id, maxsize, limited, viewCount);}, false);
         charCounter(id,maxsize,limited);
     }
 }	
 function charCounter(id, maxlimit, limited, viewCount){
     if (viewCount){
	        if (!$('counter-'+id)){
	            $(id).insert({after: '<div id="counter-'+id+'"></div>'});
	        }
	        if($F(id).length >= maxlimit){
	            if(limited){    $(id).value = $F(id).substring(0, maxlimit); }
	            $('counter-'+id).addClassName('charcount-limit');
	            $('counter-'+id).removeClassName('charcount-safe');
	        } else {    
	            $('counter-'+id).removeClassName('charcount-limit');
	            $('counter-'+id).addClassName('charcount-safe');
	        }
	        $('counter-'+id).update( $F(id).length + '/' + maxlimit );  
     }
     else{
     	if($F(id).length >= maxlimit){
             if(limited){    $(id).value = $F(id).substring(0, maxlimit); }
         } else {    
         }            
     }
         
 }
 
function trim(str) {
	return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}

function isNull(str) {
	if (str == null || str == '' || str.length == 0){
		return true;
	}
	else{
		return false;
	}
}
