/*
    Clear whitespace in textarea tags.
    We do this because the XSLT processor refuse to leave our
    textarea elements alone when they are empty. This causes
    the processor to close them XML style, like this <textarea/>,
    which obviously does not work.
*/
function ClearTextareaWhitespace(){

    var elems = document.getElementsByTagName("textarea");

    for(i = 0; i < elems.length; i++){
        
        var content = elems[i].value;
        if(content == " "){

            elems[i].value = "";

        }

    }

}

/*
    Mask emailaddresses
*/
function Masked(user, server, text1, text2, text3){

    document.write("<a href=" + "mail" + "to:" + user +"@" + server + ">" + text1 + text2 + text3 + "</a>")

}