
var section;

function loadHighlightedImage()
{
	// assign variable to DIV tag named section which contains section name
	var sectionName = document.getElementById('section');
	// gets innerhtml of section  which contains navigation button id
	section = sectionName.innerHTML;
	
	
	// gets the hyperlink reference with matching section name
	var button = document.getElementById(section);

	// moves background up to a button
	if(button!=undefined){
		button.style.backgroundPosition = "0px -107px";
		button.style.color = "#276D82";
	}
	

}



function adjustTopPlacement()
{
	
	if(window.innerHeight!=undefined){
		var moveInterface = (window.innerHeight - 661);
	}
	else{
		var moveInterface = (document.documentElement.clientHeight - 661);
	}

	moveInterface = moveInterface/2;

	if(moveInterface<=10)
		moveInterface=0;
	
	/* for testing */		
	var movecontainer = document.getElementById('container');
//	myTest.innerHTML = window.innerHeight  +  " " + moveInterface + "px";
	movecontainer.style.top = (moveInterface + "px");
}


function testing()
{
	var tester = document.getElementById('test');
	tester.innerHTML = document.URL;
	tester.style.visibility = "visible";
	
	var urlVarPattern = new RegExp(".*xmlFile=.*section=.*");
	tester.innerHTML = urlVarPattern.test(document.URL);
	
	var thisURL = document.URL;
}


// randomly rotates left side image
function rotateImage()
{
	var myRandomNumber=1;
	
	if(!section.match('home'))
	{
		myRandomNumber = Math.ceil((Math.random() * 3));
	}
	
	var leftColumn = document.getElementById('leftSide');
	
	if(leftColumn!=undefined){
		leftColumn.style.backgroundImage = "url(/images/graphic_intro" + myRandomNumber + ".jpg)";
	}
	
	
}


function introAdjustement(){
	
	var adjustDiv = document.getElementById('lowerNav');
	adjustDiv.style.backgroundImage = "url(/images/mm_lowerpart_intro.jpg)";
	adjustDiv.style.height = "36px";
	
}