function supports_placeholder() {
    var i = document.createElement('input');
    return 'placeholder' in i;
}

window.onload = function(){
    
    if(!supports_placeholder()) {
    
        inputs = document.getElementsByTagName('input');

        for(var i=0; i<inputs.length; i++){

            try {
    
                if(inputs[i].placeholder !== undefined) {
                    if(inputs[i].value == ""){
                        inputs[i].value = inputs[i].placeholder;
                    }

                    inputs[i].onclick = function(){
                        if(this.value == this.placeholder) {
                           this.value = '';
                        }
                    }
                    
                    inputs[i].onblur = function(){
                        if(this.value == ""){
                            this.value = this.placeholder;
                        }
                    }
                }
    
    
            } catch (exception) { 
    
            }
               
        }   
        
    }
    
}

fbox_opts = {overlayColor: '#000', centerOnScroll: true, padding: 0};


function trim(string)
{
    return string.replace(/(^\s+)|(\s+$)/g, "");
}


