function putEmail ( )
{
	emailUser = arguments[0];
	emailServer = arguments[1];
	if ( arguments.length > 2 )
		lang = arguments[2];
	else
		lang = "pl";
	
	//email = emailUser + '@' + emailServer;
	//document.write ( '<a href="mailto:' + email + '">' + email + '</a>' );
	switch ( lang )
	{
		case "en":
			emailText = "click here to see the e-mail address";
			break;
		default:
			emailText = "click here to see the e-mail address";
			
	}
	document.write ( '<a href="javascript:void(0);" onclick="return unhideEmail(this,\''+ emailUser + '\',\''+ emailServer + '\')">' + emailText + '</a>' );
}

function unhideEmail ( object, emailUser, emailServer )
{
	email = emailUser + '@' + emailServer;

	if ( object.innerHTML == email )
		return true;

	object.href = "mailto:" + email;
	object.innerHTML = email;
	object.blur();
	return false;
}

function img_popUp(URL,width,height) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left = 20,top = 20');");
}

function setDivHeight ( page ) {
	if (!document.getElementsByTagName) return;

	var h1=parseInt(document.getElementById('leftnav').offsetHeight);
	var h2=parseInt(document.getElementById('content').offsetHeight);

	if ( page == 'home' )
	{
		var h3=parseInt(document.getElementById('rightnav').offsetHeight);

		if ( h3 > h2 )
		{
			document.getElementById('content').style.height=h3+"px";
		}
		if ( h1 > h3 )
		{
			document.getElementById('content').style.height=h1+"px";
		}
	}
	else
	{

		if ( h1 > h2 )
		{
			document.getElementById('content').style.height=h1+25+"px";
		}
	}
}

function printVersion ( parameters )
{
	window.open ( 'http://www.mises.org.pl/en/js/print.php' + parameters, "newWindow", "width=635,height=500,scrollbars" );	
}


function recommend ( recommendedSite )
{
	window.open ( 'http://www.mises.pl/site/recommend_form.php?url=' + recommendedSite, "newWindow", "width=400,height=228,scrollbars" );
}
