// changes the HTML in the main window of the page
function changeDisplay(loadPage){

	// sets the page to load in displayCell
	var displayPage;
	
	// load photo services information and menu
	if (loadPage == "portraits"){
		displayPage = portraits;
		document.getElementById('menu').innerHTML = encodeHTML(priceMenu);
		}
		

		
	// displays a form to contact photographer
	else if (loadPage == "contact")
		displayPage = contact;
		
	
		
	// displays the information page and menu
	else if (loadPage == "info"){
		displayPage = main;
		document.getElementById('menu').innerHTML = encodeHTML(infoMenu);
		}
		
	// displays the main photo page and menu
	else if (loadPage == "menu"){
		displayPage = main;
		document.getElementById('menu').innerHTML = encodeHTML(menu);
		}


	// changes HTML code in main section
	document.getElementById('displayCell').innerHTML = encodeHTML(displayPage);

}// end changeDisplay

// changes string from urlencode in php to HTML
function encodeHTML(sourceCode){

	// removes the + separator added by php
	var newString = sourceCode.split("+");
	
	// joins newString together with spaces instead of the +	
	// then changes the string to HTML format
	sourceCode = unescape(newString.join(" "));
	
	return sourceCode;
}// end encodeHTML
