function RadioToText (feld, delimiter) {
	var wert='';
	for (var i = 0; i < feld.length; i++) {
		if (feld[i].checked) {
			if (wert!='') {
				wert += delimiter + feld[i].value;
			} else {
			 	wert = feld[i].value;
			}
		}
	}

	return(wert);
}
function isInteger ( input ) {
	var inputStr = input.toString();
	for (var i = 0; i< inputStr.length;i++) {
		var oneChar = inputStr.charAt(i);
		if (oneChar < "0" || oneChar > "9") {
			return false;
		}
	}
	return true;
}

function validateForm(formular) {
	var msg = new Array(0);
	var counter=0;
	var result = true;

	
if (RadioToText(formular.reply_radio_1)=='') {
 			 	msg[counter] = '- Frage Nr. 1';

 				counter = counter + 1;
 			}

if (RadioToText(formular.reply_radio_13)=='') {
 			 	msg[counter] = '- Frage Nr. 2';

 				counter = counter + 1;
 			}

if (RadioToText(formular.reply_radio_3)=='') {
 			 	msg[counter] = '- Frage Nr. 3';

 				counter = counter + 1;
 			}


	if (msg.length>0) {
	 	alert('Folgende Daten müssen noch eingegeben werden: ' + String.fromCharCode(10) + msg.join(String.fromCharCode(10)));
	}

	if (counter>0) {
		result=false;
	}

	return (result);
}

function setPointer(theRow, thePointerColor)
{
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }

    return true;
} 


