
   function doClick(buttonName,e)
   {
      //the purpose of this function is to allow the enter key to 
      //point to the correct button to click.
      var key;

     if(window.event)
        key = window.event.keyCode;     //IE
     else
        key = e.which;     //firefox
            
     if (key == 13)
     {
        //Get the button the user wants to have clicked
        var btn = document.getElementById(buttonName);
        if (btn != null)
        { //If we find the button click it
            btn.click();
            event.keyCode = 0
        }
     }
   }

   function WatermarkFocus(txtElem, strWatermark) 
   {
      if (txtElem.value == strWatermark)
      { 
         txtElem.value = '';
         txtElem.style.color = 'Black';
      }
   }

   function WatermarkBlur(txtElem, strWatermark) 
   {
      if (txtElem.value =='') 
      {
         txtElem.value = strWatermark;
         txtElem.style.color = 'gray';
      }
   }



function Search()
{

window.location="http://www.fhshealth.org/SearchResults.aspx?terms=" + document.getElementById('txtssearch').value;

}

function emailForm()
{

    //var daReferrer = document.referrer;
    //var email = "yours@email.com";
    var URL_loc = window.location.href;
    var subject = "A Link to FHS's Website";
    var body_message = "I think you might enjoy this story from Franciscan Health System. Please click on the link below to see the story! "+URL_loc;

    var mailto_link = 'mailto:?subject='+subject+'&body='+body_message;

    win = window.open(mailto_link,'emailWindow');
    if (win && win.open &&!win.closed) win.close();
} 

function newWindow() 
{

popupWindow = window.open('popup.html','popUpWindow','height=450,width=550,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes');
}
