/*--------------------------------------*/
function setLocations1()
{
var ChainSelector = document.getElementById('Chain1');
var SelectedChain = ChainSelector.options[ChainSelector.selectedIndex].value;
var url = "/contact/SetLocations1.cfm?Chain=" + SelectedChain;
url += "&CacheBuster=" + parseInt(Math.random()*99999);
// code for IE
if (window.ActiveXObject)
	{
	xmlhttp1=new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp1.onreadystatechange=setTheLocations;
	xmlhttp1.open("GET",url,true);
	xmlhttp1.send();
	}
// code for Mozilla, etc.
else
	{
	xmlhttp1=new XMLHttpRequest();
	xmlhttp1.onreadystatechange=setTheLocations;
	xmlhttp1.open("GET",url,true);
	xmlhttp1.send(null);
	};
};
/*--------------------------------------*/
function setTheLocations()
{
// if xmlhttp shows "loaded"
if (xmlhttp1.readyState==4)
	{
	// if "OK"
	if (xmlhttp1.status==200)
		{
		document.getElementById('StoreSelector1').innerHTML=xmlhttp1.responseText;
		}
	else
		{
		document.getElementById('StoreSelector1').innerHTML=xmlhttp1.responseText;
		};
	};
};
/*--------------------------------------*/
function setLocations2()
{
var ChainSelector = document.getElementById('Chain2');
var SelectedChain = ChainSelector.options[ChainSelector.selectedIndex].value;
var url = "/contact/SetLocations2.cfm?Chain=" + SelectedChain;
url += "&CacheBuster=" + parseInt(Math.random()*99999);
// code for IE
if (window.ActiveXObject)
	{
	xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp2.onreadystatechange=setTheLocations2;
	xmlhttp2.open("GET",url,true);
	xmlhttp2.send();
	}
// code for Mozilla, etc.
else
	{
	xmlhttp2=new XMLHttpRequest();
	xmlhttp2.onreadystatechange=setTheLocations2;
	xmlhttp2.open("GET",url,true);
	xmlhttp2.send(null);
	};
};
/*--------------------------------------*/
function setTheLocations2()
{
// if xmlhttp shows "loaded"
if (xmlhttp2.readyState==4)
	{
	// if "OK"
	if (xmlhttp2.status==200)
		{
		document.getElementById('StoreSelector2').innerHTML=xmlhttp2.responseText;
		}
	else
		{
		document.getElementById('StoreSelector2').innerHTML=xmlhttp2.responseText;
		};
	};
};
/*--------------------------------------*/
function setInfo()
{
var StoreSelector = document.getElementById('StoreID2');
var SelectedStore = StoreSelector.options[StoreSelector.selectedIndex].value;
var url = "/contact/SetInfo.cfm?StoreID=" + SelectedStore;
url += "&CacheBuster=" + parseInt(Math.random()*99999);

// code for IE
if (window.ActiveXObject)
	{
	xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp3.onreadystatechange=setTheInfo;
	xmlhttp3.open("GET",url,true);
	xmlhttp3.send();
	}
// code for Mozilla, etc.
else
	{
	xmlhttp3=new XMLHttpRequest();
	xmlhttp3.onreadystatechange=setTheInfo;
	xmlhttp3.open("GET",url,true);
	xmlhttp3.send(null);
	};
};
/*--------------------------------------*/
function setTheInfo()
{
// if xmlhttp shows "loaded"
if (xmlhttp3.readyState==4)
	{
	// if "OK"
	if (xmlhttp3.status==200)
		{
		document.getElementById('StoreInfoBlock').innerHTML=xmlhttp3.responseText;
		}
	else
		{
		document.getElementById('StoreInfoBlock').innerHTML=xmlhttp3.responseText;
		};
	};
};
/*--------------------------------------*/
function setFirst()
{
var ChainSelector = document.getElementById('Chain2');
var SelectedChain = ChainSelector.options[ChainSelector.selectedIndex].value;
var url = "/contact/SetFirst.cfm?Chain=" + SelectedChain;
url += "&CacheBuster=" + parseInt(Math.random()*99999);
// code for IE
if (window.ActiveXObject)
	{
	xmlhttp4=new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp4.onreadystatechange=setFirstInfo;
	xmlhttp4.open("GET",url,true);
	xmlhttp4.send();
	}
// code for Mozilla, etc.
else
	{
	xmlhttp4=new XMLHttpRequest();
	xmlhttp4.onreadystatechange=setFirstInfo;
	xmlhttp4.open("GET",url,true);
	xmlhttp4.send(null);
	};
};
/*--------------------------------------*/
function setFirstInfo()
{
// if xmlhttp shows "loaded"
if (xmlhttp4.readyState==4)
	{
	// if "OK"
	if (xmlhttp4.status==200)
		{
		document.getElementById('StoreInfoBlock').innerHTML=xmlhttp4.responseText;
		}
	else
		{
		document.getElementById('StoreInfoBlock').innerHTML=xmlhttp4.responseText;
		};
	};
};
/*--------------------------------------*/
function ClearBlank()
{
var TS = document.getElementById('Chain1');
if (TS[0].value == 0)
    {
   	TS.remove(0);
    }
};
/*--------------------------------------*/
function FlipDiv(Which)
{
if (Which=='Club')
	{
	document.getElementById('ContactDiv').style.display='none';
	document.getElementById('CommentDiv').style.display='none';
	document.getElementById('ClubDiv').style.display='block';
	document.getElementById('PrivacyDiv').style.display='none';
	}
else if(Which=='Comment')
	{
	document.getElementById('ContactDiv').style.display='none';
	document.getElementById('CommentDiv').style.display='block';
	document.getElementById('ClubDiv').style.display='none';
	document.getElementById('PrivacyDiv').style.display='none';
	}
else if(Which=='Contact')
	{
	document.getElementById('ContactDiv').style.display='block';
	document.getElementById('CommentDiv').style.display='none';
	document.getElementById('ClubDiv').style.display='none';
	document.getElementById('PrivacyDiv').style.display='none';
	}
else if(Which=='Privacy')
	{
	document.getElementById('ContactDiv').style.display='none';
	document.getElementById('CommentDiv').style.display='none';
	document.getElementById('ClubDiv').style.display='none';
	document.getElementById('PrivacyDiv').style.display='block';
	}
};
/*--------------------------------------*/
function FlipDiv2(Which)
{
if (Which=='Map')
	{
	document.getElementById('skeetersB').style.display='block';
	document.getElementById('skeetersA').style.display='none';
	}
else if(Which=='Info')
	{
	document.getElementById('skeetersB').style.display='none';
	document.getElementById('skeetersA').style.display='block';
	}
};
/*--------------------------------------*/
function FlipDiv3(Which)
{
if (Which=='Map')
	{
	document.getElementById('tiosB').style.display='block';
	document.getElementById('tiosA').style.display='none';
	}
else if(Which=='Info')
	{
	document.getElementById('tiosB').style.display='none';
	document.getElementById('tiosA').style.display='block';
	}
};
/*--------------------------------------*/
