﻿
var objAjaxReq = null;
if(window.XMLHttpRequest){ //기타브라우저
	   objAjaxReq = new XMLHttpRequest();
 }else if(window.ActiveXObject){ //IE 브라우저
	   objAjaxReq = new ActiveXObject("Microsoft.XMLHTTP");
 }

/**
*  Description: 사용설정저장
**/
var numAcUsed = 1; //자동완성:0(미사용),1(사용)
var numAcDrt = 0; //앞(0)/뒤(1) 단어 맞춤

function initAcOption(){
	if(numAcUsed!=1) tac.close();
	numAcUsed = parseInt(checkNull(getSrchCookie("acUsed"), 1, "1"));
	numAcDrt = parseInt(checkNull(getSrchCookie("acDrt"), 1, "0"));	
}

function setAcUsed(numType){
	setSrchCookie("acUsed", numType, "100"); //쿠키저장
	numAcUsed = parseInt(numType);
	initAcOption();
}

function setAcDrt(numType){
	setSrchCookie("acDrt", numType, "100"); //쿠키저장
	numAcDrt = parseInt(numType);
	tac.get($F('qt'));
	initAcOption();
}


var thumbModelArray=new Array(); 
var thumbImgArray=new Array(); 
var thumbUrlArray=new Array(); 

function buildAcWordListJson(_classBank, autoxml){

	parentEl = _classBank.wordListWrap;
	parentEl.style.height = (_classBank.height+4)+"px";
	query = _classBank.qt.value.toLowerCase();
	var len = acListLength = autoxml.xpersearch.length;
	//len = acListLength =(window.netscape) ? len +1 : len ;
	
	var returnValue="";
	while(parentEl.childNodes.length > 0) {
			parentEl.removeChild(parentEl.childNodes[0]);     
	}
		
	if(len > 0){
		
		//자동완성 화면출력
		
		var mistakeQuery = "";
		
		if(query.charCodeAt(0) < 127) mistakeQuery = assembleHangul(query);
		
		var ulEl = document.createElement("UL");
		    ulEl.style.padding = "0px 1px 5px 1px";
			  ulEl.style.height="120px";
		for(i = 0; i < len; i++){
			value = autoxml.xpersearch[i].TT;
			
			
			value = value.toLowerCase().replace(/^\s*/, "").replace(/\s*$/, "");
			var tempValue = replaceRegExp(value, query, _classBank.G_AC_START_HL_TAG + query + _classBank.G_AC_END_HL_TAG);
			if(mistakeQuery.length > 0) tempValue = replaceRegExp(tempValue, mistakeQuery, _classBank.G_AC_START_HL_TAG + mistakeQuery + _classBank.G_AC_END_HL_TAG);
			
			var liEl = document.createElement("LI");
				liEl.style.color = "#494a4d";
				liEl.style.fontWeight = "";
				liEl.style.fontfamily = "tahoma";
				liEl.style.height = "20px";
				liEl.style.margin = "0 0 0px 0";
				liEl.instance = _classBank;
				liEl.img = "img"+i;
				liEl.url = "url"+i;
				liEl.onmouseover = function(){this.instance.imageOn(this.img,this.url);this.instance.setAcWordFocus(this, 1);}
				
				liEl.onmouseout = function(){this.instance.setAcWordFocus(this, 0);}
				
			var aEl = document.createElement("A");
				aEl.href = "#";
				aEl.innerHTML	= "<span style='font-size:"+_classBank.Auto.fontSize+"'>"+tempValue+"</span>";	
				aEl.instance = _classBank;
		 		aEl.onclick = function(e){ this.instance.qt.value = this.innerHTML.stripTags().strip();this.instance.displayoutLayer2(); this.instance.searchInstance.get();};
				aEl.style.fontSize = _classBank.Auto.fontSize;
				aEl.style.letterSpacing = "-1px";
				liEl.appendChild(aEl);
				liEl.appendChild(document.createElement("BR"));
				ulEl.appendChild(liEl);
				
		}
		parentEl.appendChild(ulEl);
		_classBank.acListPos = -1;

	}else{
		tac.close();
	}
	return returnValue;
}


var TAutoComplete = Class.create();
var classBank = null;
TAutoComplete.prototype = {
	initialize: function(initVar,tSearch) 
	{	
		this.G_AC_WORD_LENGTH = 40;
		this.G_AC_START_HL_TAG = "<font color=#ef5811><b>";
		//this.G_AC_START_HL_TAG = "<font color=red><b>";
		this.G_AC_END_HL_TAG = "</b></font>";
		this.G_AC_BG_COLOR = "#EFEFEF";
		this.xmlSrc = 'autoJson.jsp';

		 this.lastQuery = "";
		 this.obj = new String();
		 this.Auto = initVar; 
		
		 //자동완성관련정보 초기화
		 this.searchInstance = tSearch;
		 this.observeAutoArea=0; // 자동완성검색어 레이어 display 상태 값을 저장
		 this.observeimgArea =0;
		 this.observeAutoOnOff = 10;
	 
		 this.scrollTop = 0;
		 this.acListPos = 0;
		 this.scrollTopId = 0;
 		 this.scrollBottomId = this.Auto.listSize-1;
		 this.height = this.Auto.listSize * 20;
		
		 this.onOffAuto = true;
		
		
		if(!this.initQt())  //검색어 input 개체 세팅
		 		alert("search input setting fail");
		
		 if(!this.createAutoWap())  //리스트가 뿌려질 div 생성
		 		alert("list div Wrap create fail");
		
		this.displayoutLayer();
		
		
		/*
		this.onOffExecImg1.style.top = 32 ;
		this.onOffExecImg2.style.top = 32;
		this.onOffExecImg1.style.left = 380;
		this.onOffExecImg2.style.left = 380;
		*/
		
		this.onOffExecImg1.style.top = 8;
		this.onOffExecImg2.style.top = 8;
		this.onOffExecImg1.style.left = 295;
		this.onOffExecImg2.style.left = 295;
		
	 	
		
	
		this.get();	
		
	},
	createObj: function(_objNm){
		try{
			var tmpObj = document.getElementById(_objNm);
			if(!tmpObj)
				alert(_objNm+" id를 가진 개체가 없습니다. 다시 확인 해 주세요");
				
			return tmpObj
		}catch(e){
			alert(e);
			return false;
		}
	},
	createAutoWap: function(){
		
		try{
			//자동완성 리스트 레이어 생성
			this.autoCompleteWrap = document.createElement("DIV");
			this.autoCompleteWrap.style.display = "none";
			this.autoCompleteWrap.style.position = "absolute";
			this.autoCompleteWrap.style.top = "-15px";
			this.autoCompleteWrap.style.left = "257px";
			this.autoCompleteWrap.style.zIndex = "99999";
			this.autoCompleteWrap.style.padding = "0 0 0px 0";
			this.autoCompleteWrap.style.margin = "-2px 0 0 0px";
			this.autoCompleteWrap.style.border = "0px solid #D0D0D0";
			this.autoCompleteWrap.style.borderTop = "none";

			
			
			this.wordListWrap = document.createElement("DIV");
			this.wordListWrap.style.background = "#fff no-repeat 0 0"
			this.wordListWrap.style.borderBottom = "1px solid #f2f2f2";
			this.wordListWrap.style.padding = "1px";
			this.wordListWrap.style.overflowY = "auto";
			this.wordListWrap.style.lineHeight = "18px";
			
			this.wordListWrap.style.height = (this.height+4)+"px";
			this.wordListWrap.style.padding = "1px";
			this.wordListWrap.style.overflowX = "hidden";
			this.wordListWrap.style.border = "1px solid #D0D0D0";
			this.wordListWrap.style.borderBottom = "0px solid #D0D0D0";
			this.wordListWrap.style.scrollbarFaceColor = "#FFFFFF";
			this.wordListWrap.style.scrollbar3dLightColor = "#C6C6C6";
			this.wordListWrap.style.scrollbarHighlightColor = "#C6C6C6";
			this.wordListWrap.style.scrollbarShadowColor = "#C6C6C6";
			this.wordListWrap.style.scrollbarDarkShadowColor = "#FFFFFF";
			this.wordListWrap.style.scrollbarTrackColor = "#F5F3F3";
			this.wordListWrap.style.scrollbarArrowColor = "#C6C6C6";


			this.autoCompleteWrap.appendChild(this.wordListWrap);
			
			if(this.Auto.imageTF == true){
				this.imageWrap = document.createElement("DIV");
				this.imageWrap.style.borderBottom = "0px solid #f2f2f2";
				this.imageWrap.style.padding = "0px";
				this.imageWrap.style.width = 150+"px";
				this.imageWrap.style.top = "0px";
				this.imageWrap.style.height = (this.height+4)+"px";
				this.imageWrap.style.position = "absolute";
				this.imageWrap.style.border = "0px solid #D0D0D0";
			
				this.autoCompleteWrap.appendChild(this.imageWrap);
			}
			this.onOffWrap = document.createElement("DIV");
			this.onOffWrap.style.borderBottom = "1px solid #f2f2f2";
			this.onOffWrap.style.padding = "1px";
			this.onOffWrap.style.textAlign = "right";
			this.onOffWrap.style.top = "0px";
			this.onOffWrap.style.height = 20+"px";
			this.onOffWrap.style.background = "#EFEFEF no-repeat 0 0"
			this.onOffWrap.style.border = "1px solid #a9a9a9";
			this.aLinkOnOffWrap = document.createElement("font");
			this.aLinkOnOffWrap.instance = this;
			this.aLinkOnOffWrap.onclick = function(){this.instance.offAuto();};
			this.aLinkOnOffWrap.style.cursor="pointer";
			this.aLinkOnOffWrap.style.cursor="hand";
			this.aLinkOnOffWrap.innerHTML = "기능끄기";
			this.onOffWrap.appendChild(this.aLinkOnOffWrap);
			this.autoCompleteWrap.appendChild(this.onOffWrap);
			
			
			this.onOffExecImg1 = document.createElement("img");
			this.onOffExecImg1.src = "../image/welchon/common/header_search_more.gif";
			this.onOffExecImg1.style.display = ""; 
			//this.onOffExecImg1.style.position = "relative";
			this.onOffExecImg1.style.cursor="pointer";
			this.onOffExecImg1.style.cursor="hand";
			this.onOffExecImg1.width="24";
			this.onOffExecImg1.height="25";
			this.onOffExecImg1.alt="자동완성";
			this.onOffExecImg1.className="autoword";
			this.onOffExecImg1.onclick = function(){document.getElementById("qt").autoIntance.openAutoWrap();};
			
			
			this.onOffExecImg2 = document.createElement("img");
			this.onOffExecImg2.src = "../image/welchon/common/header_search_more_on.gif";
			this.onOffExecImg2.style.display = "none"; 
			//this.onOffExecImg1.style.position = "relative";
			this.onOffExecImg2.style.cursor="pointer";
			this.onOffExecImg2.style.cursor="hand";
			this.onOffExecImg2.width="24";
			this.onOffExecImg2.height="25";
			this.onOffExecImg2.alt="자동완성";
			this.onOffExecImg2.className="autoword";
			this.onOffExecImg2.onclick = function(){document.getElementById("qt").autoIntance.closeAutoWrap();};
			
			
			
			this.onOffExecImgWrap = document.createElement("A");
			//this.onOffExecImgWrap.style.position = "relative";
			this.onOffExecImgWrap.appendChild(this.onOffExecImg1);
			this.onOffExecImgWrap.appendChild(this.onOffExecImg2);
			
			//var parent = document.getElementsByTagName("BODY")[0];
			var parent = document.getElementsByTagName("div")[0];
			
			parent.insertBefore(this.autoCompleteWrap, parent.firstChild);
			this.qt.parentNode.insertBefore(this.onOffExecImg1, this.qt.parentNode.firstChild);
			this.qt.parentNode.insertBefore(this.onOffExecImg2, this.qt.parentNode.firstChild);
			this.wordListWrap.style.display = "none";
			this.autoCompleteWrap.style.display = "none";
			this.autoCompleteWrap.instance = this;
			this.autoCompleteWrap.onmouseover =function(){this.instance.observeAutoArea=1};
			this.autoCompleteWrap.onmouseout = function(){this.instance.observeAutoArea=0};
		
			return true;
		}catch(e){
			alert(e);
			return false;
			
		}
		
	},
	initQt: function(){ //검색어 입력 input 개체 관련 세팅
		try{
			 this.qt = this.createObj(this.Auto.autoKeywordInputId); // 검색어 Input
			 this.qt.AutoComplete = "off";
			 this.qt.autoIntance = this;
			
			if(this.qt.onkeydown){ 
				addEvent(this.qt, 'keydown', function(e){this.autoIntance.open(e , 1)});  
			}else{
				this.qt.onkeydown =  function(e){this.autoIntance.open(e , 1)};
			}
			 this.qt.onkeyup = function(e){this.autoIntance.open(e , 0)};
			 this.qt.onblur = function(e){this.autoIntance.displayoutLayer()};
			 this.qt.onfocus = function(e){this.autoIntance.clearVal()};
		
			
			 
			 return true;
			 
		}catch(e){
			alert(e);
			return false;
		}
	},
	openAutoWrap : function(){
	
		this.onOffExecImg2.style.display = ""; 
		this.onOffExecImg1.style.display = "none"; 
		
		if(this.wordListWrap.childNodes.length == 0 && this.onOffAuto == true){
			this.wordListWrap.style.height = 20+"px";
			this.wordListWrap.innerHTML = "<ul style='height=120'><li>현재 자동완성을 사용하시고 계십니다.</li></ul>";
		}else if(this.onOffAuto == false){
			while(this.wordListWrap.childNodes.length > 0) {
				this.wordListWrap.removeChild(this.wordListWrap.childNodes[0]);     
			}
			this.wordListWrap.style.height = 40+"px";
			this.wordListWrap.innerHTML = "<ul style='height=120'><li>검색어 자동완성 기능을 사용해보세요. 한글자만 입력하면 찾고자 하는 검색어를 추천해드립니다.</li></ul>";
			
		}
		
		this.wordListWrap.style.display = "";
		this.autoCompleteWrap.style.display = "";
		
		
	},
	closeAutoWrap : function(){
		 
		this.displayoutLayer();
	},	
	offAuto : function(){
		
		this.onOffAuto = false;
		this.aLinkOnOffWrap.innerHTML = "기능켜기";
		this.observeAutoArea = "0"; 
		this.observeimgArea = "0";
		
		this.aLinkOnOffWrap.onclick = function(){this.instance.onAuto();};
		
		this.closeAutoWrap();
		
		
	},
	onAuto : function(){
		
		this.onOffAuto = true;
		this.aLinkOnOffWrap.innerHTML = "기능끄기";
		this.aLinkOnOffWrap.onclick = function(){this.instance.offAuto();};
		this.observeAutoArea = "0"; 
		this.observeimgArea = "0";
		this.closeAutoWrap();
		while(this.wordListWrap.childNodes.length > 0) {
				this.wordListWrap.removeChild(this.wordListWrap.childNodes[0]);     
			}
		this.get();
		
	},
	imageOn : function(img, url){
		
		if(this.Auto.imageTF == true){
			while(this.imageWrap.childNodes.length > 0) {
				this.imageWrap.removeChild(this.imageWrap.childNodes[0]);     
			}
			if(img != ""){
				var tmpA = document.createElement("a");
				tmpA.href = url;
				tmpA.target = "_blank";
				tmpA.instance = this;
				tmpA.onclick = function(){this.instance.displayoutLayer2()};
				var tmpImg = document.createElement("img");
				tmpImg.src = img;
				tmpImg.style.width = this.Auto.imageWidth;
				tmpImg.style.height = this.Auto.imageHeight;
				tmpA.appendChild(tmpImg);
				
				this.imageWrap.appendChild(tmpA);
			
			}else{
				this.imageOff();
			}
		}
	},
	imageOff : function(){
		
		if(this.Auto.imageTF == true){
			while(this.imageWrap.childNodes.length > 0) {
				this.imageWrap.removeChild(this.imageWrap.childNodes[0]);     
			}
		}
	},
	get: function()
	{	
		if(this.Auto.imageTF == true){
			
			this.autoCompleteWrap.style.width = eval(this.qt.offsetWidth) + eval(this.Auto.imageWidth) + "px";
			//this.autoCompleteWrap.style.left = getRealOffsetLeft(this.qt);
			this.autoCompleteWrap.style.left = "285px";
			//this.autoCompleteWrap.style.top = eval(getRealOffsetTop(this.qt) + 37)+"px";
			this.autoCompleteWrap.style.top = "146px";
			this.wordListWrap.style.width = this.qt.offsetWidth;
			this.onOffWrap.style.width = this.qt.offsetWidth;
			this.imageWrap.style.left = this.qt.offsetWidth;
			this.imageOff(); 
		}else{
			this.autoCompleteWrap.style.width = eval(this.qt.offsetWidth)-5 + "px";
			//this.autoCompleteWrap.style.left = getRealOffsetLeft(this.qt)+5;
			this.autoCompleteWrap.style.left = "285px";
			//this.autoCompleteWrap.style.top = eval(getRealOffsetTop(this.qt) + 37)+"px";
			this.autoCompleteWrap.style.top = "146px";
		}
		value = this.qt.value.replace(/^\s*/, "").replace(/\s*$/, "");
		
		if(value == "" || this.observeAutoOnOff == 0){
			 this.displayoutLayer();
		    return;
		}
		
			
		
		if(this.lastQuery==value || this.onOffAuto == false) return;
		
		if(value==""){
			this.lastQuery = value;
			this.wordListWrap.style.display = "none";
			this.autoCompleteWrap.style.display = "none";
			return;
		}
		
		this.lastQuery = value;
		var url = this.xmlSrc;
		//var pars = 'query=' + disassembleHangul2(value, numAcDrt) + "&sort=0&colName=AUTOCOMPLETE&pg=1&lc=10";
		var pars = 'qt=' + value+ '&repQuery='+toKorean(value)+"&lc=10"; 
		
		
		
		
		classBank = this; 
		//createXMLHttpRequest();
	    
    objAjaxReq.open("POST", url, true);
    objAjaxReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=uft-8");
    objAjaxReq.setRequestHeader("Accept","text/xml");
    objAjaxReq.onreadystatechange = setXmlAuto;
    objAjaxReq.send(pars);
	
	  initAcOption();
	},
		
	open: function(e, arg)
	{
		
		var key = window.ActiveXObject ? window.event.keyCode : e.which;
		
		switch (key) {
			case 13:
				 this.displayoutLayer();
			break;
			case 27:
				this.close();
				break;
			case 38:
			case 37:
				if(acListLength > 0 && parseInt(arg) == 1) this.setPosAcword(-1,this.wordListWrap);
				break;
			case 40:
			case 39:
				
				if(acListLength > 0 && parseInt(arg) == 1) this.setPosAcword(1,this.wordListWrap);
				break;
			default:
				if( parseInt(arg) == 0 && key != 229){
					this.get();
					
					}
			break;
	
				
		}
		
	},
	displayoutLayer: function(){
		
	    chkBlur = 1;
		this.onOffExecImg1.style.display = ""; 
		this.onOffExecImg2.style.display = "none";
		if((this.wordListWrap && this.observeAutoArea == "0" && this.observeimgArea == "0"))
		{	
			this.wordListWrap.style.display = "none";
			this.autoCompleteWrap.style.display = "none";
			this.imageOff();
		}
	},
	displayoutLayer2 : function (){
		
			this.wordListWrap.style.display = "none";
			this.autoCompleteWrap.style.display = "none";
			this.imageOff();
			
		
	},
	clearVal: function(){
		var inputQr =this.qt;
		if(inputQr.value=="Enter a Keyword" || inputQr.value=="Enter a Keyword" ){
			inputQr.value="";
			
		}
	},
	chkAutoOnOff : function (){
	    if(this.obj.checkAutoObj.checked == true){
	        this.observeAutoOnOff = 1;
	        setSrchCookie("autoOnOff", this.observeAutoOnOff, 1);
	        layerOnOff(this.observeAutoOnOff);
	        this.displayoutLayer2();
	        this.open("","");
	        
	    }else{
	        this.observeAutoOnOff = 0;
	        setSrchCookie("autoOnOff", othis.observeAutoOnOff, 1);
	        
	        this.displayoutLayer2();
	        layerOnOff(this.observeAutoOnOff);
	        this.open("", "");
	        
	    }
	    
	},
	chkAutoOpen: function(){
	    
	      this.observeAutoOnOff = getSrchCookie("autoOnOff");
	      this.autoCompleteWrap.style.display="";
	      
	       layerOnOff(this.observeAutoOnOff);
	       this.open("","");  
	},
	setPosAcword: function(value, tmpListSection){

		try{
			var acListPosLast = this.acListPos;
			this.acListPos += parseInt(value);
			
			if(this.acListPos < 0){
				this.acListPos = -1;
				
				this.displayoutLayer();
			}else{
			  	var tmpLi = tmpListSection.childNodes[0].childNodes[this.acListPos];
			  
				if(this.acListPos >= acListLength - 1) this.acListPos = acListLength - 1;
				this.qt.value = tmpLi.childNodes[0].innerHTML.stripTags().strip();
				if(acListPosLast >= 0) this.setAcWordFocus(tmpListSection.childNodes[0].childNodes[acListPosLast],  0 , "");
				this.setAcWordFocus(tmpLi, 1, this.acListPos);
				this.imageOn(tmpLi.img)
				if(this.autoCompleteWrap.style.display == "none"){
			          this.wordListWrap.style.display = "";
			          this.autoCompleteWrap.style.display = "";
			          
			    }
			     
				if(value > 0 ){
				    
					if(this.acListPos > this.scrollBottomId){
						
						this.scrollTopId = this.scrollTopId + 1;
						this.scrollBottomId = this.scrollBottomId + 1;
						
						this.wordListWrap.scrollTop = this.acListPos * 20 - (this.height - 20);
						//alert("top:"+(acListPos * 20 - 120));
						
					}
				}else{
					
					if(this.acListPos < this.scrollTopId){
						this.scrollTopId = this.scrollTopId - 1;
						this.scrollBottomId = this.scrollBottomId - 1;
						this.wordListWrap.scrollTop = this.wordListWrap.scrollTop - 20;
					}
				}
				
			}
		}catch(e){
			//alert(e);
		}
	},
	close: function(){
		if(this.listSection.style.display == "" ){
			this.wordListWrap.style.display = "none";
		}
	},
	setAcWordFocus: function(_li,numType, i){
		_li.style.backgroundColor = (parseInt(numType) > 0)? this.G_AC_BG_COLOR : "";
	}
		
};


function setXmlAuto(){

	  if(objAjaxReq.readyState == 4) {
	      if(objAjaxReq.status == 200 || objAjaxReq.status == 0) {
			  	autoxml =  eval('(' + objAjaxReq.responseText + ')');

			    if( objAjaxReq.responseText && autoxml.xpersearch.length > 0){
			  	//if( objAjaxReq.responseText){
			  	  buildAcWordListJson(classBank,autoxml);
			  	  classBank.openAutoWrap();
			  	}else{
		  			classBank.wordListWrap.style.display = "none";
		  			classBank.autoCompleteWrap.style.display = "none";
			  	}
			  }else{
			  	alert(objAjaxReq.status );
			  }
			}
	}



function chkAutoOpen(_obj,_autoKeywordDisplayId,_autoKeywordParentDisplayId, _tac){
    
       observeAutoOnOff = getSrchCookie("autoOnOff");
      document.getElementById(_autoKeywordParentDisplayId).style.display="";
      
       layerOnOff(observeAutoOnOff);
       _tac.open("","");  
}

function layerOnOff(_observeAutoOnOff){
    
//    if(_observeAutoOnOff == 1){
//        //document.getElementById(autoOn).style.display = "";
//        //document.getElementById(autoOff).style.display = "none";
//       // document.getElementById(checkAuto).style.display = "";
//        document.getElementById(checkAutoOn).style.display = "none";
//        document.getElementById(checkAuto).checked = true;
//        document.getElementById(checkAutoOn).checked = false;
//    }else{
//        //document.getElementById(autoOn).style.display = "none";
//        //document.getElementById(autoOff).style.display = "";
//       // document.getElementById(checkAuto).style.display = "none";
//       
//        document.getElementById(checkAutoOn).style.display = "";
//        document.getElementById(checkAuto).checked = false;
//        document.getElementById(checkAutoOn).checked = false;
//    }
}


/***************************************************************************************/
/*	검색어 자동완성 Ver 1.0(Pure javascript)																			
/*	제 작 일 : 2008/11/27
/*	제	 작: 연구2팀 최제홍
/*	Copyright ⓒ 2008. EXPERNET AND 최제홍. All rights Reserved
/***************************************************************************************/
{
//	var qt1 = new String();
//	
//	 qt1.fontSize="12px"; // 자동완성 폰트크기
//	 qt1.listSize="7";
//	 qt1.autoKeywordInputId = "qt"; // 검색박스 id
//	
//	 qt1.thumbDiv = "thumbDiv";
//	 qt1.checkAuto = "checkAuto"; //자동완성 보기기능 체크박스
//	 qt1.checkAutoOn = "checkAutoOn"; //자동완성 보기기능 체크박스
//	
//	 qt1.autoOpen = "autoOpen"; // 열기버튼
//	 qt1.autoOn = "autoOn"; // 열기버튼
//	 qt1.autoOff = "autoOff"; // 열기버튼
}




	 
//var autoInit =  function(){
//		
//	 	new TAutoComplete(qt1, tSearch);
//}
//addEvent(window, 'load', autoInit);  


