g_win = null; 

function popup(html, width, height) 
{
  var additional_settings = ""; 
  if (document.body.clientWidth)
    additional_settings = "left=" + ((document.body.clientWidth - width) / 2) + ", "; 
  
  if (g_win) 
    g_win.close(); 
    
  // open popup window 
  g_win = window.open(html, 'popup', additional_settings + 'width=' + width+ ',height=' + height + ',scrollbars=1, resizing=0'); 
  
  if (!g_win) alert("The page can't be opened as it is probably being blocked by your browser. To view the page please switch off the popup blocker."); 
}

function AntiSpam() 
{ 
}


/**  
 * 
 *
 */ 
AntiSpam.LinkFromEncoded = function(e) { 
	location = 'mailto:' + AntiSpam.Decode(e); 
}

/**  
 * 
 *
 */ 
AntiSpam.Decode = function(e) { 
	decoded = ''; 

	for (i = 0; i < e.length; i++) 
		decoded +=  String.fromCharCode(e.charCodeAt(i) + 1);

	return decoded; 		
}

/**  
 * 
 *
 */ 
AntiSpam.Encode = function(e) { 
	encoded = ''; 
		
	for (i = 0; i < e.length; i++)  
		encoded +=  String.fromCharCode(e.charCodeAt(i) - 1);
	
	return encoded; 
}
