function applyDefaultValue(elem, val) {
  elem.style.color = '#bbb';
  elem.value = val;
  elem.onfocus = function() {
    if(this.value == val) {
      this.style.color = '';
      this.value = '';
    }
  };
  elem.onblur = function() {
    if(this.value == '') {
      this.style.color = '#bbb';
      this.value = val;
    }
  };
}


