/*
+----------------------------------------------------------------
|				Microsoft France 2007
+----------------------------------------------------------------
*/
		var _SurveyLayerWidth = 400;
		var _SurveyLayerHeight = 300;

		var _SurveyIsNS = (document.layers) ? true : false;
		var _SurveyIsIE = (document.all) ? true : false;
		var _SurveyIsDOM = (document.getElementById) ? true : false;
		var _SurveyRate;
		
		if (_SurveyIsIE) 	_SurveyIsDOM = false;
			
		var _IsMAC = (navigator.platform) && (navigator.platform.toUpperCase().indexOf("MAC") >= 0);

		function WriteLn(pStr)
		{
			document.writeln(pStr);
		}
		
		function GetObject(pID)
		{
			if (document.getElementById)
			{ return document.getElementById(pID); }
			else if (document.all) 
			{ return document.all(pID); }
			return null;
		}

		function ShowObject()
		{
			if ((lObject = GetObject('SurveyLayer')) == null) return;
		
			if (_SurveyIsIE) 
			{
				lObject.style.left = ((document.body.clientWidth  - _SurveyLayerWidth) / 2)  +"px";
				lObject.style.top  = ((document.body.clientHeight - _SurveyLayerHeight) / 2)+"px";
			} 
			else if ((_SurveyIsNS) || (_SurveyIsDOM)) 
			{
				lObject.style.left = ((window.innerWidth  - _SurveyLayerWidth) / 2)  +"px";
				lObject.style.top  = ((window.innerHeight - _SurveyLayerHeight) / 2)+"px";
			} 
			
			if (_SurveyIsNS)
				lObject.visibility="show";
			else
				lObject.style.visibility="visible";
		}
		
		function ClosePopup()
		{
			if (_SurveyIsNS)
			{ document.SurveyLayer.visibility="hide";			   }	 
			else if (_SurveyIsIE || _SurveyIsDOM)
			{ GetObject('SurveyLayer').style.visibility ="hidden"; }
		}
		
		function PopupSurvey(pURL, pAttribs)
		{
			var lPopupSurvey = window.location.href = pURL;
			ClosePopup();
		}

		function PopupCookieCheck(pCookie)
		{
			if (document.cookie.indexOf(pCookie) < 0) 
				return false;
		}

		function PopupCookieSetValue(pCookie)
		{
			var  lExpireDate, lDate;
			var  lValue;
			
			lExpireDate		= new Date();
			lDate			= new Date();
			
			lExpireDate.setTime(lDate.getTime() + (90 * 1000 * 60 * 60 * 24));
			
			setCookie(pCookie, "1", lExpireDate, null, null, null);
		}
		
		function PopupDisplay(pTexteHaut, pTexteBas, pURLSurvey, pCookie)
		{
			if (PopupCookieCheck(pCookie) == false)
			{
				var gCurrItem = Math.random();
				
				if (isNaN(_SurveyRate)) _SurveyRate = 0.40;
				
				if (gCurrItem < _SurveyRate)
				{
					PopupCookieSetValue(pCookie);

					ShowObject();
				}
			}
		}
		
		function setCookie(name, value, expires, path, domain, secure) {
	        var curCookie = name + "=" + escape(value) +
		        ((expires) ? "; expires=" + expires.toGMTString() : "") +
		        ((path) ? "; path=" + path : "") +
		        ((domain) ? "; domain=" + domain : "") +
		        ((secure) ? "; secure" : "");
	        document.cookie = curCookie;
        }

        function eraseCookie(name)
        {
            var date = new Date();
            date.setTime(date.getTime()-(24*60*60*1000));

            setCookie(name, "", date, null, null, null);
        }