// Initialize
window.onload = function()
	{
	if(document.getElementById)
		{
	
// Show/hide optional fields in contact form
	var optionSwitch = document.getElementById('optionSwitch');
	
	if(optionSwitch != null)
	{
	var switcheroo = optionSwitch.appendChild(document.createElement('a'));
	switcheroo.href = '#';
	switcheroo.appendChild(document.createTextNode('Show only required fields?'));
	switcheroo.onclick = function()
	{
	var chooseText = this.firstChild.nodeValue;
	this.firstChild.nodeValue = (chooseText == 'Show only required fields?') ? 'Show all fields?' : 'Show only required fields?';
	
	var grabElement = document.getElementsByTagName('div');
	for (var i=0;i<grabElement.length;i++)
	{
	if(grabElement[i].className == 'optional' || grabElement[i].className == 'optional field' || grabElement[i].className == 'optional field pad')
	{
	grabElement[i].style.display = (grabElement[i].style.display == 'none') ? 'block' : 'none';
	}
	}
	return false;
	}
	}


}
}
