function swaptopmenu(active) 
{
	var overColor = '#0095B6';
	var outColor = '#000000';
	var border = '#FFDB58';
	var list = ['reg', 'comm', 'site'];
	var alist = ['rega', 'comma', 'sitea'];
	var index = -1;
	for (var i=0; i<list.length; i++) 
	{
		if (list[i] == active) index=i;
		document.getElementById(list[i]).style.color = outColor;	//aa00ff
		document.getElementById(alist[i]).style.color = outColor;	//aa00ff
		document.getElementById(list[i]).style.borderBottom = 'none'; 
	}
	if (index < 0) return;
	if (active)
	{
	document.getElementById(active).style.color = overColor;
	document.getElementById(alist[index]).style.color = overColor;
	document.getElementById(active).style.borderBottom = '2px solid ' + border; 
	}
}
function swapbottommenu(active) 
{
	var overColor = '#0095B6';
	var outColor = '#000000';
	var border = '#FFDB58';
	var list = ['footerleft', 'footerright'];
	var alist = ['footerlefta', 'footerrighta'];
	var index = -1;
	for (var i=0; i<list.length; i++) 
	{
		if (list[i] == active) index=i;
		document.getElementById(list[i]).style.color = outColor;	//aa00ff
		document.getElementById(alist[i]).style.color = outColor;	//aa00ff
		document.getElementById(list[i]).style.borderBottom = 'none'; 
	}
	if (index < 0) return;
	if (active)
	{
	document.getElementById(active).style.color = overColor;
	document.getElementById(alist[index]).style.color = overColor;
	document.getElementById(active).style.borderBottom = '2px solid ' + border; 
	}
}
function swapbgin(active) 
{	
	var overColor = '#0095B6';
	var outColor = '#FFDB58';
	document.getElementById(active).style.backgroundColor = overColor;
	return true;
}
function swapbgout(active) 
{	
	var overColor = '#0095B6';
	var outColor = '#FFDB58';
	document.getElementById(active).style.backgroundColor = outColor;
	return true;
}
function swapbg(active,outColor) 
{	
	document.getElementById(active).style.backgroundColor = outColor;
	return true;
}
function ecRequest(reqform)
{
	with(reqform)
	{
		document.getElementById("econtact_name").innerHTML = '';
		document.getElementById("ecompany").innerHTML = '';
		document.getElementById("eemail").innerHTML = '';
		document.getElementById("ephone").innerHTML = '';
		document.getElementById("elocation").innerHTML = '';

		if (contact_name.value.length < 2)
		{
			document.getElementById("econtact_name").innerHTML = 'please enter your name';
			return false;
		}
		if (company.value.length < 2)
		{
			document.getElementById("ecompany").innerHTML = 'please enter your company<br>';
			return false;
		}

		if (email.value.length < 2)
		{
			document.getElementById("eemail").innerHTML = 'please enter your email address<br>';
			return false;
		}
		else
		{
			atpos = email.value.indexOf("@");
			dotpos = email.value.lastIndexOf(".");
			lastpos = email.value.length-1;
			if (atpos<1 || dotpos-atpos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				document.getElementById("eemail").innerHTML = 'the email you entered is not correct<br>';
				return false;
			}
		}
		if (phone.value.length < 8)
		{
			document.getElementById("ephone").innerHTML = 'please enter your phone number<br>';
			return false;
		}
		if (location.value.length < 5)
		{
			document.getElementById("elocation").innerHTML = 'please enter your event location<br>';
			return false;
		}
		
	}
	return true;
}
