/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function removeHTML(InputString){
    InputString = InputString.replace(/&(lt|gt);/g, function (strMatch, p1){
        return (p1 == "lt")? "<" : ">";
    });
    var CleanString = InputString.replace(/<\/?[^>]+(>|$)/g, "");
    return CleanString;
}

function trimSatz(InputString,Anzahl){
    var target = "";
    var pieces = explode(".", strip_tags(InputString));
    for (i = 0; i < Anzahl; i++) {
        target += pieces[i]+".";
    }
    return target;
}

function trimWords(InputString,Anzahl){
    var target = "";
    var pieces = explode(" ", strip_tags(InputString));
    for (i = 0; i < Anzahl; i++) {
        target += pieces[i]+" ";
    }
    return target;
}

