
/*
// JavaScript Library regions.js ("Varianten setzen und wählen")
// Created by C. Gensler, c_gensler@icaros.de, (C) 2005-2010 by I.C.A.R.O.S. GmbH, Hamburg/Ostheim, Germany, http://www.icaros.de/ and Alcan Composites
// This script may not be used without author's written permission!
*/
function selectVariant(website,variant,forward) {
	var conf_arr=cg_config_website.split("~");
	var cgi_sep=cg_config_common.split("~")[1];
	var view=conf_arr[3];
	var url="../"+(view.split("#").join(variant))+cg_lang+"/index.htm";
	//alert(website+" / "+variant+" / "+view+" / "+cg_lang+" / "+url+" / "+cg_qs);
	if (forward) {
		url=url+cgi_sep+cg_qs.split("&p="+cg_page+"&").join("&").split("&fwp=").join("&p=");
	} else {
		// Add a parameter to prevent notes 5.0.12's command cache from using it's cache,
		// while nevertheless adding a "expires" header to the delivered page!
		// (It has a strange behaviour here: URLs with a QueryString are treated cachable with
		// "DominoCacheValid" options set properly, and are cached by notes. But they will never be
		// really re-used from cache, even within the expiry time! The headers, in fact, are set properly,
		// so this option is useful to prevent the browsers from requesting the page again. If they would,
		// there would be no change on server's side, the page would be rendered again instead of being
		// fetched from the command cache - but the browsers _do not_ ask the server again, and proxies
		// can handle the requests as "hits"!)
		url=url+cgi_sep+"Open&v="+variant;
	};
	//alert(url);
	document.cookie="variant_selected_"+website+"="+variant+"; path=/";
	window.parent.document.location=url;
};
function redirectToVariant(force) {
	var variant = getCookie("variant_selected_"+cg_site);
	//alert(cg_site+" / "+variant);
	if (variant!="") window.parent.document.location="index.htm";
};

// End of JavaScript Library regions.js ("Varianten setzen und wählen")
