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


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