// JavaScript Document
<!-- START AJAX FUNCTIONS
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxUpdateSection(myValue,myFormName)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("SECTION_OPTIONS").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("SECTION_OPTIONS").innerHTML = "<img src='images/common/loading_small.gif' alt='Loading Data' />Loading Data";
	  }
    }
  xmlHttp.open("GET","ajax_section_options.php?v="+myValue+"&form="+myFormName,true);
  xmlHttp.send(null);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxUpdateLinkSection(myValue,myFormName)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("ADD_LINK_SECTION_OPTIONS").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("ADD_LINK_SECTION_OPTIONS").innerHTML = "<img src='images/common/loading_small.gif' alt='Loading Data' />Loading Data";
	  }
    }
  xmlHttp.open("GET","ajax_section_options.php?v="+myValue+"&form="+myFormName,true);
  xmlHttp.send(null);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxDisplayLinkCode(myValue,myFormName,mySection)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("ADD_LINK_CODE").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("ADD_LINK_CODE").innerHTML = "<img src='images/common/loading_small.gif' alt='Loading Data' />Loading Data";
	  }
    }
  xmlHttp.open("GET","ajax_display_link_code.php?v="+myValue+"&form="+myFormName+"&section="+mySection,true);
  xmlHttp.send(null);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxLoadImage(myValue)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("IMAGE_DISPLAY").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("IMAGE_DISPLAY").innerHTML = "<div align='center'><img src='images/common/loading.gif' alt='Loading Image' /></div>";
	  }
    }
  xmlHttp.open("GET","ajax_image_loader.php?i="+myValue,true);
  xmlHttp.send(null);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxCalendarChange(recreation,Business,government)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("CALENDAR_HOME").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("CALENDAR_HOME").innerHTML = "Loading Calendar Events";
	  }
    }
  xmlHttp.open("GET","ajax_calendar_change.php?r="+recreation+"&b="+Business+"&g="+government,true);
  xmlHttp.send(null);
}

function ajaxLoadFormOptions(myValue)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById("AJAX_OPTIONS").innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById("AJAX_OPTIONS").innerHTML = "<img src='images/loading_small.gif' />Loading Data";
	  }
    }
  xmlHttp.open("GET","ajax_fieldDataOptions.php?v="+myValue,true);
  xmlHttp.send(null);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxLoadFormOptionsEditInPlace(myValue,divId)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
      if(xmlHttp.readyState==4)
      {
      	document.getElementById(divId).innerHTML = xmlHttp.responseText;
      }
	  else
	  {
		document.getElementById(divId).innerHTML = "<img src='images/loading_small.gif' />Loading Data";
	  }
    }
  xmlHttp.open("GET","ajax_EditInPlaceOptions.php?v="+myValue+'&d='+divId,true);
  xmlHttp.send(null);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function ajaxSetEditInPlace(myValue,divId)
{
	var valueFromInput=document.getElementById(myValue).value;
	var outputText = valueFromInput;
	outputText+='<br /><a href="javascript: ajaxLoadFormOptionsEditInPlace(\'editInPlace\',\''+divId+'\')">Edit</a>';
   	document.getElementById(divId).innerHTML = outputText;
	
	//<div id="'+uniqueFieldID+'" class="tdPadding"><a href="javascript:ajaxLoadFormOptionsEditInPlace(\'editInPlace\',\''+uniqueFieldID+'\')">Edit</a>
}

//-->