// Written 2007-2010 by Frank Blechschmitt, FBIS
//
function s2d_antispam_decode(text) {
	var dtxt=''; var txtc=0; var txtl=text.length;
	for(var i=0; i<txtl; i+=2) {
		txtc=parseInt(text.substr(i,2),16);
		dtxt+=String.fromCharCode(txtc);
	}
	return dtxt;
}
function s2d_openwindow(url, title, win_width, win_height, scrollbars) {
	var x,y;
	
	if(win_width==0) {
		win_width = 800;
	}
	if(win_height==0) {
		win_height = 600;
	}
	x = (screen.width / 2) - (win_width / 2);
	y = (screen.height / 2) - (win_height / 2);

	window.open(url,title,'resizable,width='+win_width+',height='+win_height+',top='+y+',left='+x+',toolbar=no,status=no'+(scrollbars ? ',scrollbars=yes':''));
}
function s2d_setcookie(name, value) {
	document.cookie = name+'='+escape(value)+';'
}
function s2d_getcookie(name) {
  var results = document.cookie.match('(^|;) ?'+name+'=([^;]*)(;|$)');
  if (results) 
    return unescape(results[2]);
  else
    return null;
}
window.onload = function() {
	var fontsize = s2d_getcookie('fontsize');
	if(fontsize != null) { document.body.style.fontSize = fontsize; }
}
