function TransClick(lang){
	var sUrl = "http://www.systranlinks.com/trans?systran_lp=en_zz&systran_url=" + ThisPageFullURL;
		sUrl = sUrl.replace("zz",lang).replace(".cgi",".htm");
	if(lang == "en")
		{window.location = ThisPageFullURL;}
	else 
		{window.location = sUrl;}
}

function emailPage()
{
	var pageURL = window.location.href.replace(/&/g,"|");
	if(pageURL.indexOf("search.lef.org") != -1 && ThisPageFullURL != null)
	{
	  pageURL = ThisPageFullURL.replace(/&/g,"|");
	}
	emailWindow = window.open( WebSiteBaseURL + "/lefcms/aspx/SendEmail.aspx?refer=" + pageURL, "emailWindow", "width=394,Height=515,scrollbars");
	emailWindow.focus();
}

function printPage()
{	
	var url = window.document.location.href; 
	//page not in printer version so put in printer version
	if( url.indexOf('print=1') == -1 )
	{	
		//page contains CMS placeholder
		if(document.getElementById("LEFPlaceHolder1"))
		{
		    //content placeholder contains HTML so pop up dialog	
			if(document.getElementById("LEFPlaceHolder1").innerHTML.length != 0)
			{	
				printWindow = window.open( WebSiteBaseURL + "/lefcms/aspx/PrintVersion.aspx", "printWindow", "width=800,Height=600,scrollbars");
			}
			//content placeholder contains no HTML, so adjust table width
			else
			{
				sendPrint(url, url.indexOf('?'));
			}
			
		}
		//page contains CMS Item place holder, for items
		else if(document.getElementById("LEFItemPlaceHolder1"))
		{	
			//content placeholder contains HTML so pop up dialog	
			if(document.getElementById("LEFItemPlaceHolder1").innerHTML.length != 0)
			{	
				printWindow = window.open( WebSiteBaseURL + "/lefcms/aspx/PrintVersion.aspx", "printWindow", "width=800,Height=600,scrollbars");
			}
			//content placeholder contains no HTML, so adjust table width
			else
			{
				sendPrint(url, url.indexOf('?'));
			}
			
		}
		//no content holder, so change the template width
		else
		{
			sendPrint(url, url.indexOf('?'));
		}
	}
	//in print mode,so toggle page out of print mode
	else
	{	
		if( url.indexOf('?print=1') == -1)
		{
			window.document.location.href = url.replace("&print=1", "");		
		}
		else
		{
			window.document.location.href = url.replace("?print=1", "");
		}
		
	}
}

function sendPrint(url, beginQuerystring)
{	
	alert("This functionality has been disabled temporarily for your internet browser");
	/*
	//no querystring information present so append to URL		
	if(beginQuerystring == -1)
	{
		window.document.location.href = url + "?print=1";
	}
	//querystring information present so append name/value pair
	else
	{
		window.document.location.href = url + "&print=1";
	}
	*/
}