
// Script permettant de déclencher l ouverture
// d une popup au bout de x secondes

	var secondes = 570
    var y = 1
    
    function startClock()
    {
    	secondes = secondes-y
    	//document.frm.clock.value = secondes
    	setTimeout("startClock()", 1000)
    	if(secondes==0)
    	{
    		newWindow('../PopupTimeOut.htm', 'SessionTimeOut', 200, 250, 'no');
       	}
	}

	function initStartClock()
	{
		secondes = 570;		
	}
	
	function putFocus(formInst, elementInst) 
 	{
  		if (document.forms.length > 0) 
  		{
  			 document.forms[formInst].elements[elementInst].focus();
  		}
 	}

	function newWindow(mypage, myname, w, h, scroll) 
 	{
		winprops = 'height='+h+',width='+w+',scrollbars='+scroll+',resizable=no'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) 
		{ 
			win.window.focus(); 
		}
	}

	function startClockAndPutFocus(formInst, elementInst)
	{
		putFocus(formInst, elementInst);		
		startClock();
	}
	
	function enregistrement()
	{
 	    document.forms[0].elements["enregistrer"].value="oui";
	}
	
	function validation()
	{
 	    document.forms[0].elements["enregistrer"].value="non";
	}
	function vosRessources()
	{
	 	document.forms[0].elements["autres"].value="non";
	    document.forms[0].submit();	
	}
	function ressourcesAutres()
	{
	 	document.forms[0].elements["autres"].value="oui";
	    document.forms[0].submit();	
	}