
/**
 * 删除赛程
 */
function onDeleteSchedule(scheduleID){
	Ext.MessageBox.show({
		msg: "是否删除？",
		buttons: Ext.MessageBox.OK,
		fn:function(btn, text){
   			if(btn=="ok"){
		       GoRun({
					url:'/score/schedule!delete.shtml' ,
					params:{scheduleID:scheduleID},
					fns:[function(){
						window.location.reload();
					}]
				});
			}
   		}
	});
}

/**
 * 同步赛程
 */
function onRenovateSchedule(scheduleID){
	Ext.MessageBox.show({
		msg: "是否同步赛程号：" + scheduleID ,
		buttons: Ext.MessageBox.OK,
		fn:function(btn, text){
   			if(btn=="ok"){
		       GoRun({
					url:'/synch/renovate!analyzesSchedule.shtml' ,
					params:{scheduleID:scheduleID},
					fns:[function(){
						window.location.reload();
					}]
				});
			}
   		}
	});
}


/**
 * 删除某赛程匹配的公司
 */
function onDeleteCompany(matchingID){
	Ext.MessageBox.show({
		msg: "是否执行删除",
		buttons: Ext.MessageBox.OK,
		fn:function(btn, text){
   			if(btn=="ok"){
		       GoRun({
					url:'/take/matching!updateScheduleID.shtml' ,
					params:{matchingID:matchingID},
					fns:[function(){
						document.getElementById("matching_"+matchingID).style.display = "none";
					}]
				});
			}
   		}
	});
}