function filter_list(listname, inputfilter, col_filter){
	var rows_count, tr_obj, td_obj, filter_string;
	rows_count = document.getElementById(listname).rows.length;
	filter_string = document.getElementById(inputfilter).value.toUpperCase();
	for (i=0; i<rows_count; i++){
		tr_obj = document.getElementById(listname).rows(i);
		td_obj = tr_obj.children(col_filter);
		list_string = td_obj.innerText.toUpperCase();
		td_obj.style.display = '';
		if (list_string.search(filter_string)==-1){
			td_obj.style.display = 'none';
		}
	}
}
function tab_show(objid){
	try{
	var tabcount=document.getElementById('tabparent').childNodes.length;
	for(var i=1; i<=tabcount; i++){
		document.getElementById('tab'+i).style.display='none';
		document.getElementById('tabbutton'+i).className='tab_button';
	}
	objid.className='tab_button_active';
	document.getElementById(objid.getAttribute('tab')).style.display='';
	}catch(e){
		return false;
	}
}

var xmlHttp;
var globCombo;

function clearCombo(combo){
	while(combo.length > 0){
		combo.remove(0);
	}
}

function checkstat_combo(){
	String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
	if(xmlHttp.readyState==4){
		var response = xmlHttp.responseText.trim();
		if(response == ''){
			globCombo[0] = new Option('','');
		}
		else {
			var myArr = eval(response);
			
			//globCombo[0] = new Option('','');
			for(var i = 0;i<myArr.length;i++){
				globCombo[i] = new Option(myArr[i][1],myArr[i][0]);
			}
		}
    	
    }
}

function send_request_combo(page, affected_combo){

  //check for browser capabilities
  try{    // Firefox, Opera 8.0+, Safari    
	xmlHttp=new XMLHttpRequest();    
  }
  catch (e){    // Internet Explorer    
	try{      
	  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
	 }
    catch (e){      
		try{
		   xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
		}
      catch (e){        
	  	alert("Your browser does not support AJAX!");        
		return false;        
	  }
	}    
  } 
  //build request
  clearCombo(affected_combo);
  globCombo = affected_combo;
  
  xmlHttp.onreadystatechange = checkstat_combo;
  xmlHttp.open("GET",page,true);
  xmlHttp.send(null); 
}	