﻿

var sESL = "";

function showwidgetform(datestring,locationstring)
{
  document.getElementById("_asm_fr04Date").value = datestring;
  document.getElementById("_asm_fr03Location").value = locationstring;
  
  sESL = "MHNewstart:" + locationstring + ":" + datestring + ":" + sPT;
  servicerequest(sESL, "enc", "setsubject");
  
  document.getElementById("widgetdatelist").style.display = "none";
  document.getElementById("widgetform").style.display = "block";
  
  //document.getElementById("_asm_t01").disabled = true;
  document.getElementById("_asm_t50").disabled = true;
  document.getElementById("_asm_t51").disabled = true;
  document.getElementById("_asm_t52").disabled = true;
  document.getElementById("_asm_t53").disabled = true;
  document.getElementById("_asm_t54").disabled = true;
  document.getElementById("_asm_t56").disabled = true;

  if(locationstring.toString().search("Texas Medical Center") != -1)
  {
      document.getElementById("_asm_t51").disabled = false;
  }
  if (locationstring.toString().search("The Woodlands") != -1)
  {
      document.getElementById("_asm_t52").disabled = false;
  }
  if(locationstring.toString().search("Memorial City") != -1)
  {
      document.getElementById("_asm_t53").disabled = false;
  }
  if(locationstring.toString().search("Southeast") != -1 || locationstring.toString().search("SE -") != -1 || locationstring.toString().search("Southeast Suburbs -") != -1)
  {
      document.getElementById("_asm_t50").disabled = false;
  }
  if(locationstring.toString().search("Katy") != -1)
  {
      document.getElementById("_asm_t54").disabled = false;
  }
  if(locationstring.toString().search("Online") != -1)
  {
      document.getElementById("_asm_t56").disabled = false;
  }
}
function showwidgetdate()
{
  document.getElementById("widgetdatelist").style.display = "block";
  document.getElementById("widgetform").style.display = "none";
}
function cleardateerror()
{
  document.getElementById(sErrorMessageID).innerHTML = '';
}
function showwidgetthanks()
{
  document.getElementById("widgetdatelist").style.display = "none";
  document.getElementById("widgetform").style.display = "none";
  document.getElementById("widgetthankyou").style.display = "block";
}
function asmSuccess()
{
  showwidgetthanks();
  
  //Added Google Analytics Event Track
  _gaq.push(['_trackEvent', 'conversion', 'seminar-submit']);

}
function setsubject(sInputString)
{
  document.getElementById('_asm_s').value = sInputString;
}

