/*function emailthispage(link, title, langid) {
	window.open('/sendurl.php?pageurl='+link+'&pagetitle='+title+'&l='+langid,'sendlnk','width=460,height=400')
}*/

function emailthispage() {
	window.open('/sendurl.php?pageurl='+escape(window.location)+'&pagetitle='+escape(document.title),'sendlnk','width=460,height=400');
}

function writeemail(name, domain)
{
	document.write('<a href="mailto:');
	writeemailaddress(name, domain);
	document.write('">');
}

function writeemailaddress(name, domain)
{
	document.write(name);
	document.write('@');
	document.write(domain);
}


function protectmail()
{
	document.write('@');
}

function transformEmails() {
	var rMailtoRegexp = /^protect\:([a-zA-Z0-9\._\-]+)\/([a-zA-Z0-9\._\-]+)/;
	for (i=0; i<document.links.length; i++) {
		if (document.links[i].href) document.links[i].href= document.links[i].href.replace(rMailtoRegexp, 'mailto:$2@$1');
	}
}