
function $(id){
    return document.getElementById(id);
}

function value(id){
    var type = $(id).type;
    if(type == "select"){
	return $(id).options[$(id).selectedIndex];
    }else if(type == "checkbox"){
	return $(id).checked;
    }else{
	return $(id).value;
    }
}
