﻿/*****************************************
 *   Script Written by: Matthew N Ruggio *
 *   For: Titcomb Law                    *
 *   Date: 05/01/2009                    *
 *****************************************/
 
 function activateTextBox(txtObj)
 {
    if (txtObj.value == 'Your Name' || txtObj.value == 'Email Address' || txtObj.value == 'Phone Number' || txtObj.value == 'Tell us about your case' )
        txtObj.value = '';
        
    txtObj.style.color = 'Black';
 }
 
 function deactivateTextBox(txtObj)
 {
    if (txtObj.value == '')
    {
        txtObj.value = txtObj.title;
        txtObj.style.color = '#878787';
    }
    
 }
 
function getQueryString(key)
{
  var default_="";
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
} 