// JavaScript Document

function mail(mid)
{

var erp = new Array;
erp[0] = 1868981865;
erp[1] = 1667580008;
erp[2] = 1633905509;
erp[3] = 1915580517;
erp[4] = 1952805485;
erp[5] = 1634627118;
erp[6] = 1635008062;
erp[7] = 1044134972;
erp[8] = 1868981865;
erp[9] = 1667580008;
erp[10] = 1633905509;
erp[11] = 1915580517;
erp[12] = 1952805485;
erp[13] = 1634627118;
erp[14] = 24948;
var em = '';
var tmp;
for(i=0;i<erp.length;i++){
	tmp = erp[i];
	if(Math.floor((tmp/Math.pow(256,3)))>0){
		em += String.fromCharCode(Math.floor((tmp/Math.pow(256,3))));
	};
	tmp = tmp - (Math.floor((tmp/Math.pow(256,3))) * Math.pow(256,3));
	if(Math.floor((tmp/Math.pow(256,2)))>0){
		em += String.fromCharCode(Math.floor((tmp/Math.pow(256,2))));
	};
	tmp = tmp - (Math.floor((tmp/Math.pow(256,2))) * Math.pow(256,2));
	if(Math.floor((tmp/Math.pow(256,1)))>0){
		em += String.fromCharCode(Math.floor((tmp/Math.pow(256,1))));
	};
	tmp = tmp - (Math.floor((tmp/Math.pow(256,1))) * Math.pow(256,1));
	if(Math.floor((tmp/Math.pow(256,0)))>0){
		em += String.fromCharCode(Math.floor((tmp/Math.pow(256,0))));
	};
};
var tmp = new Array;
tmp = em.split('>>><<<');
em = tmp[0];
var an = tmp[1];
var mailId = 'mail'+mid;
var styleId = 'adress'+mid;

var nl = document.createElement('a');
nl.setAttribute('id', mailId);
nl.setAttribute('href', 'mailto:' + em);

document.getElementById(mid).appendChild(nl);
document.getElementById(mailId).innerHTML = an;
document.getElementById(mailId).setAttribute('className', styleId);
document.getElementById(mailId).setAttribute('class', styleId);
}

