function trim(vString){
    return vString.replace(/^\s+|\s+$/ig, '');
}
 
function clickInText(obj){
    var valorinicial = trim(obj.getAttribute('valorInicial'));
    if ( trim(obj.value) == valorinicial ) {
        obj.value = '';     
    }
}
 
function clickOutText(obj){
    var valorinicial = trim(obj.getAttribute('valorInicial'));
    if ( trim(obj.value) == '' ) {
        obj.value = valorinicial;     
    }
}
 
function clickInPass(obj1, obj2){
    var valorinicial = trim(obj1.getAttribute('valorInicial'));
    if ( trim(obj1.value) == valorinicial ) {
        obj1.style.display = 'none';
        obj2.style.display = 'inline';
        obj2.value = '';
        obj2.focus();
    }
}
 
function clickOutPass(obj1, obj2){
    var valorinicial = trim(obj1.getAttribute('valorInicial'));
    if ( trim(obj2.value) == '' ) {
        obj2.style.display = 'none';
        obj1.value = valorinicial;
        obj1.style.display = 'inline';
    }
}