function setById(id,val){
  d=document;
  if(x=d.getElementById(id)){ 
 	if(x.value=val) {};
  };
}

function getValueById(id){

 d=document;
  if(x=d.getElementById(id)){ 
 	if(x.value) { return x.value};
  };

}


function submitById(id){
  d=document;
  if(x=d.getElementById(id) ){ 
  	if(x.submit()) {};
  };
}


 function changeOrderWay(fld){
 	if(fld!=document.flds.orderfield.value){
 		document.flds.orderfield.value=fld;
 		return true;
 	}
 	if(document.flds.orderway.value=='DESC')
 		document.flds.orderway.value='ASC'
 	else{
 		document.flds.orderway.value='DESC'; 		
 	    }	
}; 			

 function changeOrderWayId(fld,id){
  d=document;
  if(x=d.getElementById(id) ){ 
 	if(fld!=x.orderfield.value){
 		x.orderfield.value=fld;
 		return true;
 	}
 	if(x.orderway.value=='DESC')
 		x.orderway.value='ASC'
 	else{
 		x.orderway.value='DESC'; 		
 	    }	
  };	    
};
