

	subject_id = '';
	function handleHttpResponse() {
		if (http.readyState == 4) {
			if (subject_id != '') {
				document.getElementById(subject_id).innerHTML = http.responseText;
			}
		}
	}
	function getHTTPObject() {
		var xmlhttp;
		/*@cc_on
		@if (@_jscript_version >= 5)
			try {
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
			}
		@else
		xmlhttp = false;
		@end @*/
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
			} catch (e) {
				xmlhttp = false;
			}
		}
		return xmlhttp;
	}
	var http = getHTTPObject(); // We create the HTTP Object

	function getScriptPage(div_id,content_id)
	{
		
		subject_id = div_id;
		content = document.getElementById(content_id).value;
		http.open("GET", "script_page.php?content=" + escape(content), true);
		http.onreadystatechange = handleHttpResponse;
		http.send(null);
		if(content.length>0)
			box('1');
		else
			box('0');

	}	

	function highlight(action,id)
	{
	  //alert(action);
	  if(action)	
		document.getElementById('word'+id).bgColor = "#fbea75";
	  else
		document.getElementById('word'+id).bgColor = "#ffffb8";
	}
	function display(word)
	{
		//alert(word);
		document.getElementById('customer').value = word;
				
		//document.getElementById('hdIndi').value = document.getElementById('cusid'+word).value;
		document.getElementById('box').style.display = 'none';
		document.getElementById('customer').focus();
	}
	function box(act)
	{
	  if(act=='0')	
	  {
		document.getElementById('box').style.display = 'none';

	  }
	  else
		document.getElementById('box').style.display = 'block';
	}
	
	//classification
	
	function getScriptPage2(div_id,content_id)
	{
		
		subject_id = div_id;
		content = document.getElementById(content_id).value;
		http.open("GET", "script_page2.php?content=" + escape(content), true);
		http.onreadystatechange = handleHttpResponse;
		http.send(null);
		if(content.length>0)
			box2('1');
		else
			box2('0');

	}	
	
	
	//keyword
		
	function getScriptPage3(div_id,content_id)
	{
		
		
		subject_id = div_id;
		content = document.getElementById(content_id).value;
		http.open("GET", "script_page3.php?content=" + escape(content), true);
		http.onreadystatechange = handleHttpResponse;
		http.send(null);
		if(content.length>0)
		
		box3('1');
		else
			box3('0');

	}	
	
	
	function search_suggest(div_id,content_id)
	{
		
		subject_id = div_id;
		content = document.getElementById(content_id).value;
		http.open("GET", "search_suggest.php?content=" + escape(content), true);
		http.onreadystatechange = handleHttpResponse;
		http.send(null);
		if(content.length>0)
		
		box8('1');
		else
			box8('0');

	}	
	
	
	
	
function display2(word)
	{
		document.getElementById('classification').value = word;
		document.getElementById('box2').style.display = 'none';
		document.getElementById('classification').focus();
	}
	
	
	// Key
	
	
	function display3(word)
	{
		if(document.getElementById('collect').value!="")
			document.getElementById('collect').value = document.getElementById('collect').value+";"+word;
		else	
			document.getElementById('collect').value = word;
			
		document.getElementById('box3').style.display = 'none';
		document.getElementById('collect').focus();
	}
	
	
	
	function box2(act)
	{
	  if(act=='0')	
	  {
		document.getElementById('box2').style.display = 'none';

	  }
	  else
		document.getElementById('box2').style.display = 'block';
	}
	
	//keyword
	function box3(act)
	{
	  if(act=='0')	
	  {
		document.getElementById('box3').style.display = 'none';

	  }
	  else
		document.getElementById('box3').style.display = 'block';
	}
	
	
/*	//customer
	function display8(word)
	{
		document.getElementById('ypsearch').value = word;
		document.getElementById('box').style.display = 'none';
		document.getElementById('ypsearch').focus();
	}
	*/
	
/*		function display8(word)
	{
		
		if(document.getElementById('ypsearch').value!="")
			document.getElementById('ypsearch').value = document.getElementById('ypsearch').value+";"+word;
		else	
			document.getElementById('ypsearch').value = word;
			
		document.getElementById('box8').style.display = 'none';
		document.getElementById('ypsearch').focus();
	}*/
	
	
	function display8(word)
	{
		document.getElementById('ypsearch').value = word;
		document.getElementById('box8').style.display = 'none';
		document.getElementById('ypsearch').focus();
	}
	
	
	
	function box8(act)
	{
		
	  if(act=='0')	
	  {
		document.getElementById('box8').style.display = 'none';

	  }
	  else
		document.getElementById('box8').style.display = 'block';
	}