function logindb_profile() {
  window.open('http://www.schwarzpharma.com/login_e/profil.html','logindb_profile','width=700,height=550' );
}

function logindb_reminder() {
  window.open('http://www.schwarzpharma.com/login_e/reminder.php','logindb_reminder','width=700,height=550' );
}

function printThis() {
	window.print();
}

function setFontSize(fs) {
	if (fs >= 1 && fs <= 1.6) {
		document.body.style.fontSize=fs+"em";
		setcookie('nitratesrr_font_size', fs, 365, '/');
		//	window.location.reload();
	}
}

function setcookie(name, value, days, path, domain, secure) {
	var expires = -1;
	if(typeof days == "number" && days >= 0) {
		var d = new Date();
		d.setTime(d.getTime()+(days*24*60*60*1000));
		expires = d.toGMTString();
	}
	value = escape(value);
	document.cookie = name + "=" + value + ";" + (expires != -1 ? " expires=" + expires + ";" : "") + (path ? "path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "; secure" : "");
}
			
function delcookie(name) {
	setcookie(name, "-", 0);
}

function getcookie(name) {
	var idx = document.cookie.indexOf(name+'=');
	if(idx == -1) {
		return 1.2; /* default value, wenn kein cookie */
	}
	value = document.cookie.substring(idx+name.length+1);
	var end = value.indexOf(';');
	if(end == -1) {
		end = value.length;
	}
	value = value.substring(0, end);
	value = unescape(value);
	return value;
}

function modFontSize(diff) {		
	var str_os = getcookie('nitratesrr_font_size');
	var os = Math.round(parseFloat(str_os)*100)/100;
	var ns = os+diff;	
	setFontSize(ns);
}