/* This Library processes the cookie named "lingua2", which can be set to one of 3 values (see bellow) *//*  NEW - it processes also the cookie named "webtrends_id", used  by the 'Webtrends' application      *//*  MODIFIED BY Pavel/absi 03/11/2004/*  MODIFIED BY PHP 04/12/2008 - DR1404/*************************************************************************************************************************/// var langcookname = "lingua2"; plus necessaire - DR1404// 3 possible langue cookie values :var frval = "fr", nlval = "nl", enval = "en";var webcookname = "webtrends_id";// cookie's persistence (years) :var persist = 10;function computeID() {	// The Form must content the "Remote_Addr" CGI hidden field!	var userIP = document.forms[0].Remote_Addr.value;	var milisec = new Date().getTime();	return ( userIP + "-" + milisec );}function setCookie( cname, cval, addyears ) {// the cookie will expire after the period of "addyears" years	var expirdat = new Date();	expirdat.setYear( expirdat.getFullYear() + addyears );	document.cookie = cname + "=" + escape( cval ) + "; path=/" + ( addyears ? "; expires=" + expirdat.toGMTString() : "" );}function getCookie( cname ) {// gets the cookie value	if ( document.cookie ) {		var cook = document.cookie;		var begin = cook.indexOf( cname + "=" );		if ( begin != -1 ) {			begin += cname.length + 1;			var end = cook.indexOf( ";", begin );			if ( end == -1 ) { end = cook.length; }			return unescape( cook.substring( begin, end ) );		}	}	return( "" );}function cookVerif( lang ) {// "lang" argument must be one of these 3 lowercase values :  "fr" or "nl" or "en"// This function is called by HomePages' onLoad event , with the "lang" value equal to the page language!	var cookval = getCookie( webcookname );	if ( !cookval ) { setCookie( webcookname, computeID(), persist ); }//  'suppressed PHP 04/12/2008 - DR1404	//	cookval = getCookie( langcookname );//	if ( lang == enval && !cookval ) {//		setCookie( langcookname, enval, persist );//		return;//	}//	switch ( cookval ) {//		case enval ://			if ( lang != enval ) { window.location = document.forms[0].HomeUrl.value + "/HomePageEn(Visitor)?OpenForm"; }//			return;//		case frval ://			if ( lang != frval ) { window.location = document.forms[0].HomeUrl.value + "/HomePageFr(Visitor)?OpenForm"; }//			return;//		case nlval ://			if ( lang != nlval ) { window.location = document.forms[0].HomeUrl.value + "/HomePageNl(Visitor)?OpenForm"; }//			return;//	}}function redirect( lang ) {// "lang" argument must be one of these 3 lowercase values :  "fr" or "nl" or "en"// This function is called by language links in the HomePages left top section// modif PHP 04/12/08 - DR1404 - suppress cookie lingua	switch ( lang ) {		case enval ://			setCookie( langcookname, enval, persist ); suppressed DR1404			window.location = document.forms[0].HomeUrl.value + "/HomePageEn(Visitor)?OpenForm";			return;		case frval ://			setCookie( langcookname, frval, persist ); suppressed DR1404			window.location = document.forms[0].HomeUrl.value + "/HomePageFr(Visitor)?OpenForm";			return;		case nlval ://			setCookie( langcookname, nlval, persist ); suppressed DR1404			window.location = document.forms[0].HomeUrl.value + "/HomePageNl(Visitor)?OpenForm";			return;	}}function openpage( name ) {	window.location = name;}function opensyntab( lang, log ) {// log expected: 0 or 1	var frm = document.forms[0];	var view = ( lang == "fr" ) ? "/TRiskFr" : ( lang == "nl" ) ? "/TRiskNl" : "/TRiskEn";	var login = log ? "&Login" : "";	window.location = frm.HomeUrl.value + view + "?OpenView&StartKey=A&Count=300&Expand=1" + login;}function openWinCen( mypage, w, h, scroll ) {	var win = null;	var winl = ( screen.width - w ) / 2;	var wint = ( ( screen.height - h ) / 2 ) - 30;	settings = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl;	settings = settings + ",scrollbars=" + scroll + ",toolbar=no,location=no,";	settings = settings + "status=no,menubar=no,resizable=yes,dependent=no";	win = window.open( mypage, "CenteredWindow", settings );	if ( parseInt( navigator.appVersion ) >= 4 ) { win.window.focus(); }}