var util = {
    isIE6 : null,
    
    init: function() {
        util.isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
        //if(util.isIE6) {
        //   util.swapPng();
        //}       
        util.conditionalClear();
    },
    
    /*
    swapPng : function() {
        $('.png').each(function() {
            //var filter = $('this').attr('src');
            $(this).attr('src','images/s.gif');                
            //$(this).css('filer','progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + filter + "'))");                
        });
    },
    */
    conditionalClear : function() {
        var theInputs = document.getElementsByTagName('input');
        if(theInputs) {
            for (var i = 0, totalInputs = theInputs.length; i < totalInputs; i++) {
            theInputs[i].number = theInputs[i].value;                                   
                theInputs[i].onfocus = function() {                                                
                    if(this.value == this.number) {
                        this.value = '';                                                       
                    }                    
                }
                theInputs[i].onblur = function() {
                    if(this.value == '') {
                        this.value = this.number
                    }
                }                        
            } 
        }       

    }
}


$(document).ready(function(){        
    util.init();   
});

function doLogin() {
    var theURL = $('#onlineBankSelect').val();
    if (theURL == "") {
        alert("Please select an account type!");
    }
    else {
        window.location = theURL;
    }
}
function doSearch() {
    if ($('#searchField').val() == "Search" || $('#searchField').val() == ""){
        $('#searchField').val("");
        $('#searchField').focus();
        return;
    }
    else {
         window.location = "http://www.thefsb.com/searchResults.aspx?q=" + $('#searchField').val().replace(" ","+");
    }
}

