function sidebar_init() {
  initLabel('frmloginUser-username');
  initLabel('frmloginUser-password');
  initLabel('frmquickRequest-from');
  initLabel('frmquickRequest-to');
}

function initLabel(field) {
  if(typeof(field) == 'string') field = document.getElementById(field);
  if(!field) return;
	try {
	  field.oldtype = field.type;
		field.type = "text"
		field.title = field.value;
		field.style.color = '#B28544';
	} catch (e) {
		field.value = "";
	}
}

function hideLabel(field) {
  if (field.value == field.title) {
        field.style.color = '#000';
		field.value = '';
		try {
			field.type = field.oldtype;
		} catch (e) {}
	}
}

function showLabel(field) {
  if (field.value == '') {
        field.style.color = '#B28544';
		field.value = field.title;
		try {
			field.type = "text";
		} catch (e) {}
	}
}

