// JavaScript Document
//setmin=parseInt(mins);
//var  minall=<% =fall_time %>; 
//secDisplay(minall,60);
function  secDisplay(mins,secnum)
{    
  var i=0;
  for(var i=secnum;i>=0;i--) 
  { 
     window.setTimeout('doUpdate('+mins+','+i+')', (secnum-i) * 1000); 
  }
			 
}

function doUpdate(minnum,secnum) 
{ 
  var getsec;
  document.getElementById('mymin').innerHTML ='<font color=red><strong>'+minnum+'</strong></font>';
  document.getElementById('mysec').innerHTML ='<font color=red><strong>'+secnum+'</strong></font>' ;
  getsec=parseInt(secnum);
			  
  if (getsec<=0) 
  {
	 minall=minall-1;
		         				
	if (minall<0)
	{
		instant_submit();	//立即提交，不提示，提交submit_ssele_answer.asp------------------------
	}
	if (minall==0)
	{
		 document.getElementById('endmin').innerHTML='<font size=-1 color=#ff0000>'+'最后1分钟将自动交卷！'+'</font>';	
		 secDisplay(minall,60);
	}		
	if (minall>0)
	{
		secDisplay(minall,60);
	}		
			  
  }  
  
}