IF EXISTS ( SELECT  * FROM    dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Report_CycleAnbar]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Report_CycleAnbar]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CycleAvgAnbar]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[CycleAvgAnbar]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CycleFullAvg]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[CycleFullAvg]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[LESS_Mojodi]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[LESS_Mojodi]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Cycle_Anbar]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[Cycle_Anbar]
