<!--
function TextGetVal(elem){
return elem.value;}
function SelGetVal(elem){
var k=elem.options[elem.selectedIndex];
if(k.value) return k.value; else return k.text;}
function MultGetVal(elem){
var v="";
for(var i=0;i<elem.options.length;i++){
if(elem.options[i].selected){
v+=",";
if(elem.options[i].value) v+=elem.options[i].value;
else v+=elem.options[i].text;}}
if(v=="") return null;
return v.substring(1,v.length);}
function RadioSelectedIndex(elem){
for(var i=0;i<elem.length;i++){
if(elem[i].checked) return i;}
return -1;}
function RadioGetVal(elem){
var k=RadioSelectedIndex(elem);
return (k==-1)?null:elem[k].value;}
function CheckboxGetTF(elem){
return elem.checked;}
function CheckboxGetVal(elem){
return (elem.checked)?elem.value:null;}
function GenericGetVal(elem){
var t=(elem.type)?elem.type:elem[0].type;
if(t=="checkbox") return CheckboxGetVal(elem);
if(t=="hidden"||t=="password"||t=="text"||t=="textarea") return TextGetVal(elem);
if(t=="radio") return RadioGetVal(elem);
if(t=="select-one") return SelGetVal(elem);
if(t=="select-multiple") return MultGetVal(elem);
return null;}
//-->
