<%

Function Get_Image_Height_Width_By_Lodging_Item(Item_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Lodging_Item @Item_ID='" & Item_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Session("Image_Height") = RSImage("Image_Height") 
		Session("Image_Width") = RSImage("Image_Width") 
	Else
		Session("Image_Width") = "300"
		Session("Image_Height") = "200"
	End If

	Get_Image_Height_Width_By_Lodging_Item = ""

End Function


Function Get_Image_By_Lodging_Item(Item_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Lodging_Item @Item_ID='" & Item_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
	End If

	Get_Image_By_Lodging_Item = "<img src=""" & Image_Dir & Image_File & """ alt=""" & Image_Alt & """>"

End Function


Function Get_Image_By_Group(Group_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Group @Group_ID='" & Group_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
	End If

	Get_Image_By_Group = "<img src=""" & Image_Dir & Image_File & """ alt=""" & Image_Alt & """>"

End Function


Function Get_Image_By_Group_No_Str(Group_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Group @Group_ID='" & Group_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
		Get_Image_By_Group_No_Str = "<img src=""" & Image_Dir & Image_File & """ alt=""" & Image_Alt & """ border=0>"
	Else
		Get_Image_By_Group = ""
	End If


End Function

Function Get_Image_By_Entity(Entity_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Entity @Entity_ID='" & Entity_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
		Get_Image_By_Entity = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """>"
	Else
		SQLImage = "Get_Image_Brand_By_Entity @Entity_ID='" & Entity_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
		Set RSImage = Conn.Execute(SQLImage)
	
		If Not RSImage.EOF Then
			Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
			Image_Alt = RSImage("Image_Alt")
		Else
			Image_File = "blank.gif"
			Image_Alt = ""
		End If
	
		Get_Image_By_Entity = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"
	End If


End Function


Function Get_Image_Brand_By_Entity(Entity_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_Brand_By_Entity @Entity_ID='" & Entity_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
		Get_Image_Brand_By_Entity = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"
	Else
		SQLImage = "Get_Image_By_Entity @Entity_ID='" & Entity_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
		Set RSImage = Conn.Execute(SQLImage)
	
		If Not RSImage.EOF Then
			Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
			Image_Alt = RSImage("Image_Alt")
		Else
			Image_File = "blank.gif"
			Image_Alt = ""
		End If

		Get_Image_Brand_By_Entity = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"
	End If



End Function


Function Get_Image_By_Event(Event_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Event @Event_ID='" & Event_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
	End If

	Get_Image_By_Event = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"

End Function


Function Get_Image_By_Event_No_Str(Event_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_By_Event @Event_ID='" & Event_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
		Get_Image_By_Event_No_Str = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
		Get_Image_By_Event_No_Str = ""
	End If

End Function


Function Get_Image_Sponsor_By_Event(Event_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_Sponsor_By_Event @Event_ID='" & Event_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
	End If

	Get_Image_Sponsor_By_Event = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"

End Function



Function Get_Image_Sponsor_By_Event_No_Str(Event_ID, Image_Type_ID)

	Dim Image_Dir, Image_File, Image_Alt
	Image_Dir = "/dimages/"

	Dim SQLImage, RSImage
	SQLImage = "Get_Image_Sponsor_By_Event @Event_ID='" & Event_ID & "', @Image_Type_ID='" & Image_Type_ID & "'"
	Set RSImage = Conn.Execute(SQLImage)

	If Not RSImage.EOF Then
		Image_File = RSImage("Image_ID") & "." & RSImage("Image_Ext")
		Image_Alt = RSImage("Image_Alt")
		Get_Image_Sponsor_By_Event_No_Str = "<img src=""" & Image_Dir & Image_File &	""" alt=""" & Image_Alt & """ align=""center"">"
	Else
		Image_File = "blank.gif"
		Image_Alt = ""
		Get_Image_Sponsor_By_Event_No_str = ""
	End If

End Function




%>