var times = [ 
'7' , '7:00以后' , 
'9' , '9:00以后' , 
'11' , '11:00以后' , 
'13' , '13:00以后' , 
'15' , '15:00以后' , 
'17' , '17:00以后' , 
'19' , '19:00以后' , 
'21' , '21:00以后' , 
'23' , '23:00以后'
] ; 

function time_cell ( code , value , layer_id) { 
	document.write ( "<tr><td style='font-size:9pt;'" + 
	" onmouseover=\"this.style.color='white';this.style.backgroundColor='navy';\" " +
	" onmouseout=\"this.style.color='black';this.style.backgroundColor='white';\" " + 
	" onclick='set_time(\"" + code + "\" , \"" + value + "\" , \"" + layer_id + "\");'>" +
	value + 
	"</td></tr>" ) ; 
}

function time_panel_setup ( pos , left_pos , layer_id ) {  
	document.write ( 
	"<div id='" + layer_id + 
	"' style='position: absolute; left:" + left_pos + 
	"; top: " + pos + 
	"; visibility: hidden; background-color:white; z-index:9999; '>" + 
	"<table width=70 style='border-style:solid; border-width:1; border-color:black'>" ) ; 
	var ai = 0 ; 
	for ( var tm=0; tm < times.length/2; tm++ ) { 
		time_cell ( times[tm*2] , times[tm*2+1] , layer_id) ; 
	}
	document.write ( "</table></div>" ) ; 
}

function set_time ( code , vl , layer_id) { 
    if(layer_id == "dtime-panel")
	{
		document.getElementById ( "dtimehid" ) . value  = code ;  
		document.getElementById ( "dtime" ) . value  = vl ;  
	}
	if(layer_id == "btime-panel")
	{
		document.getElementById ( "btimehid" ) . value  = code ;  
		document.getElementById ( "btime" ) . value  = vl ;  
	}
}