function metropolasia_essayPrint ()
{
	var content = "<div id='printLogo'><img src='loadedFiles/logo.png' /></div>" + document.getElementById("topMotto").innerHTML +
				  "<div id='printText'>" + 
					  document.getElementById("essayTitle").innerHTML +
					  document.getElementById("essayText").innerHTML  +
				  "</div>";

	var html = "<html dir='ltr'>" +
				   "<head>" +
						"<title>Metropolasia - Print</title>" +
					    "<link href='css/layouts.css' rel='stylesheet' type='text/css'>" +
					    "<link href='common.css' rel='stylesheet' type='text/css'>" +
					"</head>" +
					"<body onload='window.print();window.close()'>" +
						"<div align='left' id='printPage'>" + 
							content + "<br/>" + 
						"</div>" +
					"</body>" +
				"</html>";

	win = window.open  ('', '_blank');
	win.document.open  ();
	win.document.write (html);
	win.document.close ();
}

function metropolasia_submitForwardForm ()
{
	var formValidator = new Validator("forwardForm");
			
	formValidator.clearAllValidations ();
	formValidator.addValidation("toName",		"required",		"Please enter friend name");
	formValidator.addValidation("toEmail",		"required",		"Please enter friend e-Mail");
	formValidator.addValidation("toEmail",		"email",		"Please enter a valid e-Mail");
	formValidator.addValidation("myName",		"required",		"Please enter your name");
	formValidator.addValidation("myEmail",		"required",		"Please enter your e-Mail");
	formValidator.addValidation("myEmail",		"email",		"Please enter a valid e-Mail");

	if (formValidator.validate ())
	{
		metropolasia_showHideForwardForm ();
		alert ("Thank you! Your recommendation has been sent");
		return true;
	}

	return false;
}

function metropolasia_showHideForwardForm ()
{

	var forwardBox = document.getElementById("forward");

	if (forwardBox.style.display == "")
		forwardBox.style.display = "none";
	else
		forwardBox.style.display = "";
}

