// 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 JavaMessage(x){alert(x);}

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 newpage()
	{
		var orig = "http://officeexpressstrauss.com/review/alpha.php"; //CHANGE THIS TO MATCH THE WEBSITE
		var page = document.getElementById('newpage').value;	
		parent.window.location.href = orig + "?newpage=" + page;
		
	}


function tr(location) //time redirect
	{
		setTimeout('location.href="'+location+'",3000');
	}

function maxChar(maxC)
	{
		var show = document.getElementById('left');
		var comment = document.getElementById('comment');
		show.value = maxC - comment.value.length;
	}