	function lookup(inputString, thisname) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('div[class^=suggestionsBox]').hide();
		} else {
			// post data to our php processing page and if there is a return greater than zero
			// show the suggestions box
			$.post("/prj/AcDsTagging/string_search.php", {mysearchString: ""+inputString+"" ,barcode_name: ""+thisname+""}, function(data){
				if(data.length >0) {
					switch(thisname)
						{
							case "barcode1":
								$('div[name=suggestionsBox1]').show();
       								$('div[name=suggestionList1]').html(data);
								break;

							 case 'barcode2':
                                                                $('div[name=suggestionsBox2]').show();
                                                                $('div[name=suggestionList2]').html(data);
                                                                break;
					
							 case 'barcode3':
                                                                $('div[name=suggestionsBox3]').show();
                                                                $('div[name=suggestionList3]').html(data);
                                                                break;

							 case 'barcode4':
                                                                $('div[name=suggestionsBox4]').show();
                                                                $('div[name=suggestionList4]').html(data);
                                                                break;

							 case 'barcode5':
                                                                $('div[name=suggestionsBox5]').show();
                                                                $('div[name=suggestionList5]').html(data);
                                                                break;
							
							 case 'barcode6':
                                                                $('div[name=suggestionsBox6]').show();
                                                                $('div[name=suggestionList6]').html(data);
                                                                break;

							 case 'barcode7':
                                                                $('div[name=suggestionsBox7]').show();
                                                                $('div[name=suggestionList7]').html(data);
                                                                break;

							 case 'barcode8':
                                                                $('div[name=suggestionsBox8]').show();
                                                                $('div[name=suggestionList8]').html(data);
                                                                break;

							 case 'barcode9':
                                                                $('div[name=suggestionsBox9]').show();
                                                                $('div[name=suggestionList9]').html(data);
                                                                break;
							
							case 'barcode10':
                                                                $('div[name=suggestionsBox10]').show();
                                                                $('div[name=suggestionList10]').html(data);
                                                                break;




						}
	
				}
			});
		}
	} //end
	
	// if user clicks a suggestion, fill the text box.
	function fill(thisValue,thisname) {
		
		switch(thisname)
			{
				case 'barcode10':
                                         $('input[name=barcode10]').val(thisValue);
                                         break; 
				case 'barcode1':
					 $('input[name=barcode1]').val(thisValue);
					 break;	
				case 'barcode2':
                                         $('input[name=barcode2]').val(thisValue);    
					 break;
				case 'barcode3':
                                         $('input[name=barcode3]').val(thisValue);    
					 break;
				case 'barcode4':
                                         $('input[name=barcode4]').val(thisValue);    
					 break;
				case 'barcode5':
                                         $('input[name=barcode5]').val(thisValue);    
					 break;
				case 'barcode6':
                                         $('input[name=barcode6]').val(thisValue);    
					 break;
				case 'barcode7':
                                         $('input[name=barcode7]').val(thisValue);    
					 break;
				case 'barcode8':
                                         $('input[name=barcode8]').val(thisValue);    
					 break;
				case 'barcode9':
                                         $('input[name=barcode9]').val(thisValue);    
					 break;

			}
		setTimeout("$('div[class^=suggestionsBox]').hide();", 50);		
	}







