
function selectAllInSelect(id){
	sel = document.getElementById(id);
	for ( i = 0; i < sel.options.length; i++ ){
		sel.options[i].selected = true;
	}
}

function removeSelectedFromSelect(id){
	sel = document.getElementById(id);
	for ( i = sel.options.length - 1; i >= 0; i-- ){
		if (sel.options[i].selected){
			sel.remove(i);
		}
	}
}

function getSelectedValue(id){

    sel = document.getElementById(id);
    
    return sel.options[sel.selectedIndex].value;
}