var DEF_VAL   = "TT.MM.JJJJ"; // Default Value

run();
function run()
{
    var oldOnload = window.onload; // window.onload will be overwritten, so save the old value
    if (typeof(window.onload) != "function") {
        window.onload = init;
    } else {
        window.onload = function() {
            oldOnload();
            init();
        }
    }
}

function init() {
    if (!document.getElementById) return;
    var theFieldFrom = document.getElementById('txbDurationFrom');
    var theFieldTo = document.getElementById('txbDurationTo');
    
    if(theFieldFrom)
    {
        // doing the "Search this Site..."-Displaying- & -Hiding-Stuff
        theFieldFrom.onfocus    = focusSearch;
        theFieldFrom.onblur     = blurSearch;
        
        theFieldTo.onfocus    = focusSearch;
        theFieldTo.onblur     = blurSearch;
        
        if (theFieldFrom.value=='') theFieldFrom.value = DEF_VAL;
        if (theFieldTo.value=='') theFieldTo.value = DEF_VAL;
    }
    
}

function focusSearch() {
    if (this.value==DEF_VAL) {
        this.value = '';
    }
}
function blurSearch() {
    if (this.value=='') {
        this.value = DEF_VAL;
    }
}

function openPopup(theURL,winName,features)
{
    window.open(theURL,winName,features);
}
