function lookup(inputString,what) {
	var selcntry,nam1,  nam2,selactivity;
	//nam1 = document.getElementsByName('nameexclude').item(0).checked;	
	    //alert(nam1);
		if(inputString.length == 0){
			// Hide the suggestion box.
			$('#suggestions').hide();
			$('#suggestions_act').hide();			
		} else {
			switch(what){
				case 1:
					$.post("selectcountry.php", {queryString: ""+inputString+"",nameexclude:""+nam1+""}, function(data){
						if(data.length >0) {
							$('#suggestions').show();
							$('#autoSuggestionsList').html(data);
						}
					});																												 																											
				break;
				
				case 2:
					selcntry = document.getElementById("activity").value;	
					//alert('im here');
					$.post("selectactivity.php", {queryString: ""+inputString+"",cntry:""+selcntry+""}, function(data){
						if(data.length >0) {
							$('#suggestions_act').show();
							$('#autoSuggestionsList2').html(data);
						}
					});																												
				break;
				
				case 3:
					selcntry = document.getElementById("cc").value;
					selactivity = document.getElementById("act").value;					
					
					//alert('im here');
					$.post("selectname.php", {queryString: ""+inputString+"",cntry:""+selcntry+"",activity:""+selactivity+""}, function(data){
						if(data.length >0) {
							$('#suggestions_name').show();
							$('#autoSuggestionsList3').html(data);
						}
					});																												
				break;				
				
			}//switch

		}//else
	} // lookup


	function fill(thisValue,cvalue,where) {
		switch(where){
			case 1:
			$('#cntry').val(thisValue);
			$('#cc').val(cvalue);			
			break;
			case 2:
			$('#activity').val(thisValue);
			$('#act').val(cvalue);						
			break;			
			case 3:
			$('#companyname').val(thisValue);
			$('#clc').val(cvalue);						
			break;
		}
		setTimeout("$('#suggestions').hide();", 200);
		setTimeout("$('#suggestions_act').hide();", 200);
		setTimeout("$('#suggestions_name').hide();", 200);
	}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

