function setInput(cookieName) {
myCookie = Cookie.read(cookieName);
if (myCookie != null) {
  arrCookie = myCookie.split('/');
  for (a=0;a<arrCookie.length;a++) {
    if (arrCookie[a]!='' && arrCookie[a].indexOf('loesung')!=-1) {
      myAntwort = arrCookie[a].split('=');
      if (document.getElementsByName(myAntwort[0])[0].type == 'text') {
        document.getElementsByName(myAntwort[0])[0].value = myAntwort[1];
      } else {
        document.getElementsByName(myAntwort[0])[myAntwort[1]].checked = true;
      }
    }
  }
}
}
function sendGS(cookieName) {
antwortCookie = '';
antwort = '';
for (i=1;i<=anzAntwort;i++) {
  antwortName = "GS_loesung_"+i;
  arrAntwort = document.getElementsByName(antwortName);
  if (arrAntwort[0].type == 'text') {
    antwort = antwortName + '=' + arrAntwort[0].value;
  } else {
    for (a=0;a<arrAntwort.length;a++) {
      if (arrAntwort[a].checked) {
        antwort = antwortName + '=' + a;
      }
    }
  }
  antwortCookie = (antwortCookie=='') ? antwort:antwortCookie + '/' + antwort;
}
document.cookie = cookieName + "=" + antwortCookie + "; path=/;";
}
