





		
// JavaScript Document
$(document).ready(function() {
	document.getElementById('page-wrapper').style.display = 'none';
	if(!readCookie("de-disclaimer")) {
		showDisclaimer();
	}
	else {
		showContent();
	}
});

/* Adding the disclaimer div dynamically and then fading it in */
function showDisclaimer() {
	var newdiv = document.createElement('div');
	newdiv.innerHTML = '<div id="popup-wrapper-2" style="discplay: none;"><div id="content-wrapper"><div id="popup"><p>The information on the offered funds contained on the following pages is only directed to investors who have its place of business or who are domiciled in the Fed. Rep. of Germany.</p><p>My place of business is Germany. / I am domiciled in Germany.</p><p align="center"><input onclick="javascript:cookiedDiv();" type="button" value="Yes" name="Agree" />&nbsp;<input onclick="javascript:window.location=\'/de/en/mfg/index.htm\';" type="button" value="No" name="Cancel" /></p></div></div><div id="footer-wrapper"></div></div>';
	document.body.appendChild(newdiv);
	$('#popup-wrapper-2').fadeIn('slow');
}

/* Swap the active divs when the user clicks OK */
function cookiedDiv() {
	createCookie('de-disclaimer','true','1');
	$('#popup-wrapper-2').hide();
	$('#page-wrapper').fadeIn('slow');
}

function showContent() {
	$('#page-wrapper').fadeIn();
}

/* Cookie cutter */
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function showDisclaimerButtons() {
	if( document.getElementById('chk_adviser').checked ) {
		document.getElementById('div_close').style.display='none';
		document.getElementById('div_proceed').style.display='block';
	}
	else {
		document.getElementById('div_close').style.display='block';
		document.getElementById('div_proceed').style.display='none';
	}
}
