<script language=JavaScript>

function lesen() {

var text = form.ein.value;

text = text + " ";

form.aus.value = "";

for (var i=0; i<50; i++) {

wort = "";

n = text.indexOf(" ");

wort = text.substring(0,n);

innen = wort.substring(1,n-1);

form.aus.value += wort.charAt(0) + vertausche(innen) + wort.charAt(n-1) + " ";

text = text.substring(n+1,text.length);

}

}

function vertausche(w) {

var neu="";

var n = w.length;

var zufall;

for (var i=0; i<n; i++) {

zufall = Math.floor((n-i)*Math.random());

neu = neu + w.charAt(zufall);

w = w.substring(0,zufall)+w.substring(zufall+1,n);

}

return neu;

}

</script>


Jürgen Giesen