// JavaScript Document
// funkcija koja dekodira postu i otvara program za slanje mail-a
// respectly borrowed from fer.hr
/*
function hide_mail(prije,poslije,id) {
	temp="";
	temp2="";
	
	for (i=0;i<prije.length;i+=2)
		temp = temp + String.fromCharCode(parseInt("0x"+prije.substr(i,2),16));
	for (i=0;i<poslije.length;i+=2)
		temp2 = temp2 + String.fromCharCode(parseInt("0x"+poslije.substr(i,2),16));
  
  if (id == 1) 
  	 location = "mailto:"+temp+"@"+temp2;
	else 
		 document.getElementById(id).title = ""+temp+"@"+temp2;
}
*/

function protect_mail(enc_add, elem_id){
	dec_add = "";
	for(i=0; i<enc_add.length; i+= 2)
		dec_add += String.fromCharCode(parseInt("0x" + enc_add.substr(i,2),16));
	if (elem_id == 1) 
  	 location = "mailto:" + dec_add;
	else 
		 document.getElementById(elem_id).title = ""+ dec_add;
}
