function clearPrompt(elemName, prompt) 
{
    var e = document.getElementById(elemName);
    if (e.value == prompt) 
    {
      e.value = "";
      e.style.color = 'black';
    }
}
  
function setPrompt(elemName, prompt) 
{
    var e = document.getElementById(elemName);
    if (e.value == "") 
    {
      e.value = prompt;
      e.style.color = 'grey';
    }
}


function searchWipe(objectId,text)
{
    object = document.getElementById(objectId)
    
    if(object.value == text)
    {
        object.value = '';
    }
}


function maxHeightOfElements(selector){
  return Math.max.apply(Math, jQuery.makeArray(jQuery(selector).map( function(){ return $(this).height();})));
}
function resizeSelector(selector)
{
    $(selector).height(maxHeightOfElements(selector));
}
 
function addLoadEvent(func) 
{
      var oldonload = window.onload;
      if (typeof window.onload != 'function') 
      {
        window.onload = func;
      }
      else 
      {
        window.onload = function() 
        {
          if (oldonload) 
          {
            oldonload();
          }
          func();
        }
      }
}





