agent = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(agent, "Build/")>0 And InStr(agent, "; wv")>0 Then
is_app="mobileapp"
ElseIf InStr(agent, "iPhone")>0 or InStr(agent, "iPod")>0 Then
app_num=InStr(agent, "Mobile/")
full_num=Len(agent)
If CDbl(full_num-app_num)<20 then
is_app="mobileapp"
End if
End If