// JavaScript Document

//Function to call a pop up window
function popUpwindow(theURL, winName, features)	{	window.open(theURL, winName, features);	}

//Function to quickly check elements in form


//Function to show and hide elements
function toggleHidden(x)
{
	if (document.getElementById(x).style.display == 'none')	
		{document.getElementById(x).style.display = 'block';}
	else 
		{document.getElementById(x).style.display = 'none';}
}



function setMenu()
{
	var nav_links = document.getElementById('nav').getElementsByTagName('a');
	
		for (var i=0; i < nav_links.length; i++)
			{
				if(document.URL.indexOf(nav_links[i].href) > -1)
					{
						nav_links[i].setAttribute('class', 'selected');
						nav_links[i].setAttribute('className', 'selected');
					}
				
			}
}


function jMenu()
{
	var jumper = document.getElementById('quickNav').value;
	if(jumper != 1)
	{
		location.href= jumper;	
	}
	
	
}

function checkPolls()
{
	var mForm = document.getElementById('voteFor');
	
	if(!mForm.a1.checked && !mForm.a2.checked && !mForm.a3.checked && !mForm.a4.checked)
	{
		alert('You must choose an option before voting.');
		return false;
	}
}

//_________________________________________________________________________________________________________________________________-
