////////////////////////////////////////////////////////////////////////////////
//Filename: common.js
//Purpose:  Javascript functions that should be available across all blog pages.
//Author:   Michael Kirkland
//Date:     June, 2008
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
//Function:  fancy_value_click
//Purpose:   Onclick function which, when paired with fancy_value_unclick in
//           onblur, allows us to put lables in textboxen that disappear when
//           clicked on, and reappear when focus is removed only if the textbox
//           hasn't been changed.
//Arguments:
//obj:       The object we're labeling. Should generally be passed in as 'this'.
//label:     Text that we want to use as a label.
//Author:    Michael Kirkland
//Date:      June, 2008
////////////////////////////////////////////////////////////////////////////////
function fancy_value_click(obj, label)
{
  if(obj.value == label)
  {
    obj.value = '';
  }
}

////////////////////////////////////////////////////////////////////////////////
//Function:  fancy_value_unclick
//Purpose:   Onblur function which, when paired with fancy_value_click in
//           onclick, allows us to put lables in textboxen that disappear when
//           clicked on, and reappear when focus is removed only if the textbox
//           hasn't been changed.
//Arguments:
//obj:       The object we're labeling. Should generally be passed in as 'this'.
//label:     Text that we want to use as a label.
//Author:    Michael Kirkland
//Date:      June, 2008
////////////////////////////////////////////////////////////////////////////////
function fancy_value_unclick(obj, label)
{
  if(obj.value == '')
  {
    obj.value = label;
  }
}

