<!--
// mdiamond, Oct 2003, encoding of input values to prevent XSS detection in SiteMinder
// for mroe information see the write-up at
// http://viper.verity.com/pi/secgw/neteg/NetegXSS.doc
// if you are not a Verity employee, and want this document, ask your local
// account team
function encode(form,inputnames) {

    for (var i=0; i<inputnames.length; i++) {
        var input = match(form,inputnames[i]);
        if (input != null) {
            var origval = input.value;
            input.value = encodestr(origval);
            //alert(origval+' enc='+input.value);
        }
    }
    return true;
}

function encodestr(s) {
    s = ('' + s)
    s = s.replace(/;/g,'!sc!'); 
    s = s.replace(/&/g,'!am!');
    s = s.replace(/</g,'!lt!');
    s = s.replace(/>/g,'!gt!');
    s = s.replace(/"/g,'!dq!');
    s = s.replace(/'/g,'!sq!');
  
    return s;
}

function match (form,inputname) {
    for (var i = 0; i < form.length; i++){
        if (form.elements[i].name == inputname) {
               return form.elements[i];
        }
    }
    return null;
}
    
//-->