

// Script permettant de déclencher l ouverture
// d une popup au bout de x secondes

    	var secondes = 150
    	var y = 1
    
    	function startClock(page)
    	{
    		secondes = secondes-y
    		//document.frm.clock.value = secondes
    		setTimeout("startClock()", 1000)
    		if(secondes==0)
    		{
    			newWindow(page, 'SessionTimeOut', 200, 250, 'no');
       		}
    	}
	
	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=yes,menubar=yes'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) 
		{ 
			win.window.focus(); 
		}
		return false;
	}
	
	function startClockAndPutFocus(formInst, elementInst, page)
	{
		putFocus(formInst, elementInst);		
		startClock(page);
	}
	

 
