function openDisclaimerLayer(linkobj) {
	var el_body = document.getElementsByTagName("body")[0];
	var el_layer = document.createElement("div");
	el_layer.id = 'disclaimerlayer';
	el_layer.className = 'disclaimer_bg ';
	
	
	var scrollToPos = window.scrollY;
	if(scrollToPos==undefined) scrollToPos = document.documentElement.scrollTop;

	scrollToPos+=30;
	
	el_layer.innerHTML = "<div class=\"background\"></div><div class=\"disclaimer\" style=\"position:relative; top:"+scrollToPos+"px;\"><p class=\"header\">Hinweis</p><p class=\"text\">Mit Klick auf diesen Link verlassen Sie die Coca-Cola GmbH Website. Coca-Cola übernimmt keine Verantwortung für Inhalte externer Websites.</p><p class=\"buttons\"><a href=\"#\" onclick=\"closeDisclaimerLayer(); return false;\">Abbrechen</a><a href=\""+linkobj.href+"\" onclick=\"closeDisclaimerLayer();\" target=\"_blank\">Weiter</a></p></div>";
	
	var arrayPageSize = getPageSize();
	el_layer.style.height = (arrayPageSize[1] + 'px');
	
	
	el_layer.style.display = 'block';
	
	el_body.appendChild(el_layer);
}
function openDisclaimerLayerFromFlash(mylink) {
	var el_body = document.getElementsByTagName("body")[0];
	var el_layer = document.createElement("div");
	el_layer.id = 'disclaimerlayer';
	el_layer.className = 'disclaimer_bg ';
	
	var scrollToPos = window.scrollY;
	if(scrollToPos==undefined) scrollToPos = document.documentElement.scrollTop;

	scrollToPos+=30;
	
	el_layer.innerHTML = "<div class=\"background\"></div><div class=\"disclaimer\" style=\"position:relative; top:"+scrollToPos+"px;\"><p class=\"header\">Hinweis</p><p class=\"text\">Mit Klick auf diesen Link verlassen Sie die Coca-Cola GmbH Website. Coca-Cola übernimmt keine Verantwortung für Inhalte externer Websites.</p><p class=\"buttons\"><a href=\"#\" onclick=\"closeDisclaimerLayer(); return false;\">Abbrechen</a><a href=\""+mylink+"\" onclick=\"closeDisclaimerLayer();\" target=\"_blank\">Weiter</a></p></div>";
	
	var arrayPageSize = getPageSize();
	el_layer.style.height = (arrayPageSize[1] + 'px');
	
	
	el_layer.style.display = 'block';
	
	el_body.appendChild(el_layer);
}
function closeDisclaimerLayer() {
	var el_body = document.getElementsByTagName("body")[0];
	el_body.removeChild(document.getElementById("disclaimerlayer"));
}

function getPageSize(){
	var scroll_x, scroll_y;
	
	if (window.innerHeight && window.scrollMaxY) {	
		scroll_x = document.body.scrollWidth;
		scroll_y = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		scroll_x = document.body.scrollWidth;
		scroll_y = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		scroll_x = document.body.offsetWidth;
		scroll_y = document.body.offsetHeight;
	}
	
	var window_width, window_height;
	if (self.innerHeight) {	// all except Explorer
		window_width = self.innerWidth;
		window_height = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		window_width = document.documentElement.clientWidth;
		window_height = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		window_width = document.body.clientWidth;
		window_height = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(scroll_y < window_height){
		page_height = window_height;
	} else { 
		page_height = scroll_y;
	}
	
	// for small pages with total width less then width of the viewport
	if(scroll_x < window_width){	
		page_width = window_width;
	} else {
		page_width = scroll_x;
	}
	
	array = new Array(page_width,page_height,window_width,window_height) ;
	return array;
}