/*
    Page Name : Refee Extend Search Script
    Language : Javascript
    First Update : by nhkim
    Last Update : 2008. 08. 18(by ynmoon)
*/
// È®Àå °Ë»ö class
keywordRF = function(objName){

	this.selObj = null;			// ¼±ÅÃÇÑ °Ë»ö¾î
	this.keyCount = 0;			// °Ë»öµÈ ÃÑ °³¼ö
	this.keyPos = -1;			// °Ë»ö¾î À§Ä¡
	this.docXML_FD;				// XMLµ¥ÀÌÅÍ return °ª
	this.callback = null;		// XML°á°ú returnÇÔ¼ö
	this.httpRequest = null;	// httpRequest°´Ã¼
	this.objName = objName;		// »ý¼ºµÈ °´Ã¼¸í
	this.wordWidth=null;      // È®Àå°Ë»ö¾î width
	document.getElementById("id_qt").autocomplete="off";     // ÀÚµ¿È®Àå Á¦¾î

	// httpRequest °´Ã¼ »ý¼º ÇÔ¼ö
	keywordRF.prototype.getXMLHttpRequest = function() {
		if (window.ActiveXObject) {
			try {
				return new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					return new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e1) { return null; }
			}
		} else if (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		} else {
			return null;
		}
	}	//	end getXMLHttpRequest function
	
	// httpRequest send ÇÔ¼ö
	keywordRF.prototype.sendRequest = function(url, params, callback, method) {
		this.callback = callback;

		this.httpRequest = this.getXMLHttpRequest();
		var httpMethod = method ? method : 'GET';
		if (httpMethod != 'GET' && httpMethod != 'POST') {
			httpMethod = 'GET';
		}
		var httpParams = (params == null || params == '') ? null : params;
		var httpUrl = url;
		if (httpMethod == 'GET' && httpParams != null) {
			httpUrl = httpUrl + "?" + httpParams;
		}
		this.httpRequest.open(httpMethod, httpUrl, true);
		this.httpRequest.setRequestHeader(
			'Content-Type', 'application/x-www-form-urlencoded');
		
		var request = this;
		this.httpRequest.onreadystatechange = function() {
			request.onStateChange.call(request);
		}
		this.httpRequest.send(httpMethod == 'POST' ? httpParams : null);	
	}	// end sendRequest function

	// httpRequest return ÇÔ¼ö
	keywordRF.prototype.onStateChange = function() {
		this.callback(this.httpRequest);
	}	// end onStateChange end


	// ÄíÅ° Á¤º¸ return
	keywordRF.prototype.getCookieFD = function(name){ 
		key = name;
		//fullDownCK
		arr_name = null;

		var aCookie = document.cookie.split("; ");
		var ret = '';

		for (var i=0; i < aCookie.length; i++) {
			if(!arr_name) {
				if(aCookie[i].substring(0, key.length) == key) {
					ret = unescape(aCookie[i].substring(key.length+1));
					break;
				}
			} else {
				if(aCookie[i].substring(0, arr_name.length) == arr_name) {
					var arCook = aCookie[i].substring(arr_name.length+1).split("|");
					for( var j=0; j < arCook.length; j++) {
						if(arCook[j].substring(0, key.length) == key) {
							ret = unescape(arCook[j].substring(key.length+1));
							break;
						}
					}
				}
			}
		}
		if(!ret) ret = '';
		return ret;
	}	// end getCookieFD function


	// set cookie ÇÔ¼ö
	keywordRF.prototype.setCookieFD = function(name, val){ 

		var argc = this.setCookieFD.arguments.length;
		var argv = this.setCookieFD.arguments;
		var expiredays = 365;

		var expires = (argc > 2) ? argv[2] : 0;
		var path = (argc > 3) ? argv[3] : null;
		var domain = (argc > 4) ? argv[4] : null;
		var secure = (argc > 5) ? argv[5] : false;

		if(expiredays != 0) {
			var todayDate = new Date(); 
			todayDate.setDate( todayDate.getDate() + expiredays );
			var expst = "; expires="+todayDate.toGMTString();
		} else expst = '';

		var cookstr = name + "=" + val +
		((expiredays == 0) ? "" : (expst)) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");

		document.cookie = cookstr;
	}	// end setCookieFD function


	// °Ë»öÅ°¿öµå ¾×¼Ç
	keywordRF.prototype.qtSearch = function(e){

		if(e){
			var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;		
		}else{
			var keyCode = null;
		}
		
		// °Ë»ö¾î ¼±ÅÃÈÄ ¾Æ·¡·Î ÀÌµ¿½Ã
		if(keyCode == 40 && this.keyCount != 0 || keyCode == 38 && this.keyCount != 0){
			this.keyPressFullDown(document.getElementById('keyID_0'), null, keyCode);
		}else{
			keyword = this.trim(document.sform.qt.value);
			if(keyword != ""){
				saveCookie = this.getCookieFD('fullDownCK');			
				menuCookie = this.getCookieFD('fullDownMN');

				if(saveCookie != 'off'){	// È®Àå°Ë»öÀÌ ¿­·ÁÀÖÀ»°æ¿ì¸¸
					// »ç¿ëÀÚ °Ë»ö ±â·Ï
					if(menuCookie != "myKey"){	
						// Å°¿öµå ÀÖÀ»°æ¿ì¸¸
						if(keyword != ''){
							params  = "key="+encodeURIComponent(keyword);
							params += "&keyMenu="+encodeURIComponent(this.getCookieFD('fullDownMN'));
							this.sendRequest("/union/ajax/keyword.html", params, this.getFullDown, "POST");
						}
					}else{					
						// »ç¿ëÀÚ °Ë»öÀÌ ¿­·ÁÀÖÁö ¾ÊÀ»°æ¿ì¸¸
						params  = "key="+encodeURIComponent(keyword);
						params += "&keyMenu="+encodeURIComponent(this.getCookieFD('fullDownMN'));				
						this.sendRequest("/union/ajax/keyword.html", params, this.getFullDown, "POST");
					}
				}
			// °Ë»ö¾î ¾øÀ»½Ã hide
			}else{
				this.ocFullDown('open');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
				document.getElementById('fullDown').style.display = 'none';

			}
		}
	}	// end qtSearch function


	// ³»¿ë °¡Á®¿È
	keywordRF.prototype.getFullDown = function(){
		if(this.httpRequest.readyState == 4){
			if(this.httpRequest.status == 200){
    			var txt = this.httpRequest.responseText;

	    		if(txt != "") {
    				this.docXML_FD = this.httpRequest.responseXML;
    				var code = this.docXML_FD.getElementsByTagName("code").item(0).firstChild.nodeValue;				
    
    				if(code == "success"){
    					this.keySch = document.sform.qt.value;
    
    					this.keyPos = -1; // °Ë»ö¾î Æ÷Ä¿½º À§Ä¡ Àç¼³Á¤
    					document.getElementById('fullDown').style.display = "block";
    					this.addFullDown();
    					this.docXML_FD = null;
    				}else{
    					document.getElementById('fullDownSRL').style.height = "0px";
    					document.getElementById('fullDown').style.display = "none";
    					this.ocFullDown('open');
    					this.clearFullDown();
    				}
				}
			}
		}
	}	// end getFullDown function


	// °Ë»ö ³»¿ª »èÁ¦
	keywordRF.prototype.clearFullDown = function(){
		// °Ë»ö¾î 
		var titleText = document.getElementById('titleText');
		var total_row = titleText.getElementsByTagName("div").length;
		var del_row;
		
		for(i=0; i<total_row; i++){
			del_row = titleText.getElementsByTagName("div").item(0);
			del_row.parentNode.removeChild(del_row);
		}
		this.keyCount = 0;

		// °Ë»ö¾î Á¤º¸
		var fullDownSRL = document.getElementById('fullDownSRL');
		total_row = fullDownSRL.getElementsByTagName("div").length;
		for(i=0; i<total_row; i++){
			del_row = fullDownSRL.getElementsByTagName("div").item(0);
			del_row.parentNode.removeChild(del_row);
		}
	}	// end clearFullDown function


	// ¼±ÅÃ ³»¿ª mouse over
	keywordRF.prototype.mouseOverFullDown = function(obj){

		var fullDownSRL = document.getElementById('fullDownSRL');
		var total_row = fullDownSRL.getElementsByTagName("div").length;
		
		for(i=1; i<total_row; i++){
			selRow = fullDownSRL.getElementsByTagName("div").item(i);			
			if(selRow == obj){
				selRow.style.backgroundColor = "#e3ecf5";
			}else{
				selRow.style.backgroundColor = "#FFFFFF";
			}
		}
	}	// end mouseOverFullDown function


	// ¼±ÅÃ °Ë»ö¾î mouse out
	keywordRF.prototype.mouseOutFullDown = function(){
		var fullDownSRL = document.getElementById('fullDownSRL');
		var total_row = fullDownSRL.getElementsByTagName("div").length;
		
		for(i=1; i<total_row; i++){
			selRow = fullDownSRL.getElementsByTagName("div").item(i);	
			selRow.style.backgroundColor = "#FFFFFF";
		}
	}	// end mouseOutFullDown function


	// ¼±ÅÃ °Ë»ö¾î Å¬¸¯ÈÄ °Ë»ö ÁúÀÇ
	keywordRF.prototype.mouseClickFullDown = function(obj){
		document.sform.qt.value = obj.value;
		document.sform.submit();
	}	//	end mouseClickFullDown function


	// °Ë»ö¾î ¼±ÅÃ
	keywordRF.prototype.keySelectFullDown = function(obj){	
		
		var fullDownSRL = document.getElementById('fullDownSRL');
		var total_row = fullDownSRL.getElementsByTagName("div").length;
		
		for(i=1; i<total_row; i++){
			selRow = fullDownSRL.getElementsByTagName("div").item(i);			
			if(selRow == obj){
				selRow.style.backgroundColor = "#e3ecf5";
				this.selObj = obj;
				this.keyPos = (i-1);
				document.sform.qt.value = obj.value;
			}else{
				selRow.style.backgroundColor = "#FFFFFF";
			}
		}
	}	// end keySelectFullDown function


	// ¼¿¼±ÅÃÈÄ keyPressFullDown
	keywordRF.prototype.keyPressFullDown = function(obj, e, kCode){


		// Å°ÀÌº¥Æ®
		if(kCode){
			var keyCode = kCode;			
		}else{
			var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
		}

		if(keyCode == 37 || keyCode == 39 || keyCode == 8){

			var fullDownSRL = document.getElementById('fullDownSRL');
			var total_row = fullDownSRL.getElementsByTagName("div").length;
			for(i=0; i<total_row; i++){
				selRow = fullDownSRL.getElementsByTagName("div").item(i);
				selRow.style.backgroundColor = "#FFFFFF";
			}

			this.selObj = null;
			document.sform.qt.focus();
		}
		

		// ¹æÇâÅ° »ó
		if(keyCode == 38){
			ux = this.keyPos - 1;
			if(this.keyPos == 0){
				this.keyPos = -1;
				obj.style.backgroundColor = "#FFFFFF";
				document.sform.qt.focus();
			}else{
				document.getElementById('fullDownSRL').scrollTop = ux * 20;
				uxObj = document.getElementById("keyID_"+ux);
				this.keySelectFullDown(uxObj);
			}
		}

		// ¹æÇâÅ° ÇÏ
		if(keyCode == 40){
			dx = this.keyPos + 1;
			if(dx != this.keyCount){
				document.getElementById('fullDownSRL').scrollTop = dx * 20;
				dxObj = document.getElementById("keyID_"+dx.toString());
				this.keySelectFullDown(dxObj);
				//alert();
			}
		}
		
		// °Ë»ö¾î ¼±ÅÃ½Ã
		if(keyCode == 13){
			document.sform.qt.value = obj.value;
			document.sform.submit();
		}
	}	// end keyPressFullDown function


	// °Ë»ö ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
	keywordRF.prototype.ocFullDown = function(act){
		saveCookie = this.getCookieFD('fullDownCK');
		if(saveCookie != 'off'){
			extImg = 'on';
		}else{
			extImg = 'off';
		}

		document.getElementById('fullDownOpen').src = '/images/web_standard/main/fulldown_'+ act +'_'+ extImg +'.gif';	
	}	// end ocFullDown function


	// È®Àå°Ë»ö ¼û±è
	keywordRF.prototype.openFullDown = function(){
		saveCookie = this.getCookieFD('fullDownCK');
		menuCookie = this.getCookieFD('fullDownMN');
		fdBool = document.getElementById('fullDown').style.display;

		// ´ÝÇôÀÖ´Â»óÅÂ
		if(!fdBool || fdBool == 'none'){
			document.getElementById('fullDown').style.display = "block";
			if(saveCookie == 'off'){
				this.ocFullDown('close');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ				
				this.stateFullDown('off');
			}else{
				// »ç¿ëÀÚ °Ë»ö ±â·Ï
				if(menuCookie == 'myKey'){
					this.ocFullDown('close');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
					this.qtSearch(event);
					
				// RF È®Àå°Ë»ö
				}else{
					if(this.keyCount != 0){
						this.ocFullDown('close');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
						this.qtSearch(event);
					}else{
						this.ocFullDown('close');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
						this.stateFullDown('on');
					}
				}

			}
		}else{
			this.ocFullDown('open');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
			document.getElementById('fullDown').style.display = 'none';
		}
	}	// end openFullDown function


	// È®Àå°Ë»ö on, off ¼³Á¤
	keywordRF.prototype.turnFullDown = function(act){
		this.setCookieFD('fullDownCK', act);
		this.ocFullDown('open');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
		document.getElementById('fullDown').style.display = "none";
		this.clearFullDown();

		if(act == 'on'){
			this.qtSearch(event);		
		}
	}	// end turnFullDown function


	// ¸Þ´º ¼±ÅÃ(RFKey, myKey)
	keywordRF.prototype.menuChange = function(mn){
		this.setCookieFD('fullDownMN', mn);	// ¸Þ´º Á¤º¸ ÄíÅ° set
		qt = document.sform.qt.value;
		
		if(mn == 'RFKey' && qt == ''){
			this.ocFullDown('open');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ
			this.stateFullDown('on');
		}else{
			this.qtSearch(null);
		}
	}	// end menuChange function


	// on »óÅÂÀÇ È®Àå°Ë»ö Á¤º¸ Ãâ·Â
	keywordRF.prototype.infoFullDown = function(){
		menuCookie = this.getCookieFD('fullDownMN');	// ¼±ÅÃµÈ ¸Þ´º°ª
		var fullDownSRL = document.getElementById('fullDownSRL');

		row = document.createElement("div"); 
		fullDownSRL.appendChild(row);
		row.style.position="relative";
		row.style.width = this.wordWidth+"px";
		row.style.height = "26px";
		row.style.margin="0px";
		row.style.padding="0px";
		row.style.top = "0px";
		row.style.left = "0px";
		row.style.backgroundColor = "#f4f6fb";
		row.style.borderLeft="1px solid #7795c9";
		row.style.borderRight="1px solid #7795c9";
		row.style.backgroundColor = "#f4f6fb";

		var menuTxt;

		// ¸Þ´º ¼³Á¤
		if(menuCookie == 'myKey'){
    		menuTxt = "<a href='#fullDownSRL' onclick=\""+this.objName+".menuChange('RFKey');\" onkeypress=\""+this.objName+".menuChange('RFKey');\">È®Àå°Ë»ö</a>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<strong color='#666666'>³»°Ë»ö±â·Ï</strong>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<a href='#fullDownSRL' onclick=\""+this.objName+".turnFullDown('off');\" onkeypress=\""+this.objName+".turnFullDown('off');\">±â´É²ô±â</a>";
		}else{
			menuTxt = "<strong color='#666666'>È®Àå°Ë»ö</strong>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<a href='#fullDownSRL' onclick=\""+this.objName+".menuChange('myKey');\" onkeypress=\""+this.objName+".menuChange('myKey');\">³»°Ë»ö±â·Ï</a>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<a href='#fullDownSRL' onclick=\""+this.objName+".turnFullDown('off');\" onkeypress=\""+this.objName+".turnFullDown('off');\">±â´É²ô±â</a>";
		}

		// Ã¹¹øÂ° ¼¿
		cell = document.createElement("span");
		row.appendChild(cell);
		cell.style.position="absolute";
		cell.style.fontFamily = "µ¸¿ò";
		cell.style.fontSize = "12px";
		cell.style.top = "5px";
		cell.style.left = "10px";
		cell.style.textAlign = "left";
		cell.style.verticalAlign = "middle";
		cell.style.color = "#000000";
		cell.innerHTML = menuTxt;
	}	// end infoFullDown function


	// off »óÅÂ È®ÀåÁ¤º¸ Ãâ·Â
	keywordRF.prototype.stateFullDown = function(state){
		this.clearFullDown();
		var titleText = document.getElementById('titleText');
		
		var stateInfo;	// »óÅÂ Á¤º¸(RF»ç¿ë¾ÈÇÔ)
		var stateTxt;	// »óÅÂ ³»¿ë
		var actBtn;		// »óÅÂ°ª¿¡ µû¸¥ ¹öÆ° º¯°æ

		if(state == 'off'){
			stateTxt = "È®Àå°Ë»ö ±â´ÉÀ» ÀÌ¿ëÇØ º¸¼¼¿ä";
			actBtn = "<strong color='#666666'>È®Àå°Ë»ö</strong>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<a href='#' style='cursor:hand;' onclick=\""+this.objName+".turnFullDown('on');\" onkeypress=\""+this.objName+".turnFullDown('on');\">±â´ÉÄÑ±â</a>";			
		}else{
			stateTxt = "È®Àå°Ë»öÀ» »ç¿ëÇÏ°í °è½Ê´Ï´Ù";
			actBtn = "<strong color='#666666'>È®Àå°Ë»ö</strong>&nbsp;&nbsp;<font color='#cccccc'>|</font>&nbsp;&nbsp;<a href='#' style='cursor:hand;' onclick=\""+this.objName+".turnFullDown('off');\">±â´É²ô±â</a>";	
		}

		document.getElementById('fullDown').style.display = "block";
		var row1 = document.createElement("div"); 
		titleText.appendChild(row1);
		row1.style.position="absolute";
		row1.style.width = this.wordWidth+"px";
		row1.style.height = "26px";
		row1.style.margin="0px";
		row1.style.padding="0px";
		row1.style.top = "0px";
		row1.style.left = "0px";
		row1.style.backgroundColor = "#f4f6fb";
		row1.style.borderLeft="1px solid #7795c9";
		row1.style.borderRight="1px solid #7795c9";
		
		var row1_1=document.createElement("span");		
		row1.appendChild(row1_1);
		row1_1.style.position="absolute";
		row1_1.style.backgroundColor = "#f4f6fb";
		row1_1.style.fontFamily = "µ¸¿ò";
		row1_1.style.fontSize = "12px";
		row1_1.style.color = "#000000";
		row1_1.style.top = "5px";
		row1_1.style.left = "10px";
		row1_1.style.textAlign = "left";
		row1_1.style.verticalAlign = "middle";
		row1_1.innerHTML = stateTxt;

		row2 = document.createElement("div"); 
		titleText.appendChild(row2);
		row2.style.position="absolute";
		row2.style.width=this.wordWidth+"px";
		row2.style.height = "28px";
		row2.style.margin="0px";
		row2.style.padding="0px";
		row2.style.top = "26px";
		row2.style.left = "0px";
		row2.style.backgroundColor = "#FFFFFF";
		row2.style.borderLeft="1px solid #7795c9";
		row2.style.borderRight="1px solid #7795c9";
		row2.style.borderBottom="1px solid #7795c9";
		
		var row2_1=document.createElement("span");	
		row2.appendChild(row2_1);	
		row2_1.style.position="absolute";
		row2_1.style.fontFamily = "µ¸¿ò";
		row2_1.style.fontSize = "12px";
	    row2_1.style.color = "#000000";
		row2_1.style.top = "7px";
		row2_1.style.left = "10px";
		row2_1.style.textAlign = "left";
		row2_1.style.verticalAlign = "middle";
		row2_1.innerHTML = actBtn;
	}	// stateFullDown function


	// fullDownÃß°¡
	keywordRF.prototype.addFullDown = function(){
		this.clearFullDown();	
		saveCookie = this.getCookieFD('fullDownCK');	// È®Àå°Ë»ö on ? off
		menuCookie = this.getCookieFD('fullDownMN');	// È®Àå°Ë»ö ¸Þ´º
		
		// È®Àå °Ë»ö »ç¿ë(off»óÅÂ°¡ ¾Æ´Ò°æ¿ì¸¸)
		if(saveCookie != "off"){
			
			this.ocFullDown('close');	// ÅØ½ºÆ® ¹Ú½º ÀÌ¹ÌÁö º¯°æ			
			this.infoFullDown();	// on È®Àå°Ë»ö Á¤º¸	
			
			qtKeyword = this.docXML_FD.getElementsByTagName("qtKeyword");
			qtKeyinfo = this.docXML_FD.getElementsByTagName("qtKeyinfo");

			this.keyCount = qtKeyword.length;

			// °Ë»ö¼ö°¡ 5°³ ÀÌ»óÀÏ°æ¿ì ½ºÅ©·Ñ »ý±è
			/*
			if(this.keyCount >= 5){
				document.getElementById('fullDownSRL').style.height = "100px";
			}else{			
				document.getElementById('fullDownSRL').style.height = "0px";
			}
			*/
			
			document.getElementById('fullDownSRL').style.height = "0px";
			
			for(i=0; i<this.keyCount; i++){
				KeyWord = qtKeyword.item(i).firstChild.nodeValue;
				KeyInfo = qtKeyinfo.item(i).firstChild.nodeValue;
				this.addRowFullDown(KeyWord, KeyInfo, menuCookie, i);
			}

		}
	}	// end addFullDown function


	// °Ë»ö¾î row Ãß°¡
	keywordRF.prototype.addRowFullDown = function(key, keyInfo, mn, idx){
		var eventExt = this;
		var fullDownSRL = document.getElementById('fullDownSRL');
		var srhKey = document.sform.qt.value;

		row = document.createElement("div"); 
		row.id="keyID_"+idx.toString();
		fullDownSRL.appendChild(row);
		row.style.position="relative";
		row.style.width = this.wordWidth+"px";
		row.style.margin="0px";
		row.style.padding="0px";
		row.style.borderLeft="1px solid #7795c9";
		row.style.borderRight="1px solid #7795c9";
		if (idx==(this.keyCount-1)) {
		    row.style.borderBottom="1px solid #7795c9";
		    row.style.height = "23px";
	    } else {
		    row.style.height = "20px";
	    }
		row.style.backgroundColor = "#FFFFFF";	
		row.style.cursor = "pointer";
		row.value = key;
		row.onclick = function(){eventExt.mouseClickFullDown(this)};
		row.onkeydown = function(){eventExt.keyPressFullDown(this, event, null)};
		row.onmouseover = function(){eventExt.mouseOverFullDown(this)};
		row.onmouseout = function(){eventExt.mouseOutFullDown()};

		// °Ë»ö¾î ¼¿
		cell = document.createElement("span");
		row.appendChild(cell); 	
		cell.style.position="absolute";	
		cell.style.fontFamily = "±¼¸²";
		cell.style.fontSize = "12px";
		cell.style.color = "#333333";
		cell.style.top = "4px";
		cell.style.left = "12px";
		cell.style.width = this.wordWidth+"px";
		cell.style.textAlign = "left";
		cell.style.verticalAlign = "middle";	
		cell.style.display="block";
		cell.innerHTML = key.replace(srhKey, "<font color='#ff6600'>"+srhKey+"</font>");

		// »ç¿ëÀÚ °Ë»ö Å°¿öµå
		if(mn == "myKey"){		
			// °Ë»öºóµµ ÀÌ¹ÌÁö
			cellBar = document.createElement("span");
			row.appendChild(cellBar); 

		    cellBar.style.position="absolute";	
			cellBar.style.fontFamily = "±¼¸²";
			cellBar.style.fontSize = "12px";
			cellBar.style.color = "#666666";
			cellBar.style.top = "4px";
			cellBar.style.left = (this.wordWidth-75)+"px";
			cellBar.style.width = "65px";
			cellBar.style.verticalAlign = "middle";
			cellBar.style.textAlign = "right";
			cellBar.innerHTML = keyInfo;
		// RF°Ë»ö Å°¿öµå
		}else{
			// °Ë»öºóµµ ÀÌ¹ÌÁö
			cellBar = document.createElement("span");
			row.appendChild(cellBar); 

		    cellBar.style.position="absolute";	
			cellBar.style.top = "4px";
			cellBar.style.left = (this.wordWidth-75)+"px";
			cellBar.style.width = "65px";
			cellBar.style.verticalAlign = "middle";
			cellBar.style.textAlign = "right";
			cellBar.innerHTML = "<img src='/images/web_standard/main/fulldown_level_"+ keyInfo +".gif' border='0' width='34' height='13' alt=\"\">";
		}
	}	// end addRowFullDown function

	// °Ë»ö¾×¼Ç °ü·Ã ltrim
	keywordRF.prototype.ltrim = function ( s ) {
		return s.replace( /^[\ ]+/g , "" );
	}	// end ltrim function
	// °Ë»ö¾×¼Ç °ü·Ã rtrim
	keywordRF.prototype.rtrim = function( s ) {
		return s.replace( /[\s*$ ]+$/g, "" );
	}	// end rtrim function
	// °Ë»ö¾×¼Ç °ü·Ã trim
	keywordRF.prototype.trim = function ( s ) {
		return this.rtrim(this.ltrim(s));
	}	// end trim function
	// °Ë»ö¾×¼Ç °ü·Ã Æ¯¼ö¹®ÀÚ Á¦°Å
	keywordRF.prototype.fieldValSet = function(obj) {
		obj.value = this.trim(obj.value);
		obj.value = obj.value.replace('`', '');
		return ;
	}	// end fieldValSet function
	// °Ë»ö ¿äÃ»
	keywordRF.prototype.selectAction = function(f) { 
		var  obj= f.qt;
		if(!obj.value) {
			location.href('/search/');
			return false;
		} else {
			this.fieldValSet(obj);
			return true;
		}
	}	// end selectAction function


	this.ocFullDown('open');

	// Æ÷Ä¿½º°¡ ´Ù¸¥°÷À¸·Î ÀÌµ¿ÇÒ°æ¿ì °Ë»ö³»¿ª »èÁ¦
	keywordRF.prototype.blurFullDown = function(e){
		// °Ë»ö ¿µ¿ª ºÎºÐÀº Á¦¿Ü
		fdBool = document.getElementById('fullDown').style.display;		

		if(fdBool != 'none'){
			setTimeout("keywordRF.blurFullDownAct()",500);
		}
	}	// end function blurFullDown

	// Æ÷Ä¿½º°¡ ´Ù¸¥°÷À¸·Î ÀÌµ¿ÇÒ°æ¿ì °Ë»ö³»¿ª »èÁ¦
	keywordRF.prototype.blurFullDownAct = function(){
		// °Ë»ö ¿µ¿ª ºÎºÐÀº Á¦¿Ü	
		document.getElementById('fullDown').style.display = "none";
		this.ocFullDown('open');
	}	// end function blurFullDownAct

}	//	end keywordRF Class